From: hungupharps@gmail.com
Subject: Re: Cleanest Ada way to do this?
Date: Sun, 22 Jun 2014 23:46:43 -0700 (PDT)
Date: 2014-06-22T23:46:43-07:00 [thread overview]
Message-ID: <543afc17-4c32-4e15-a52f-80fcc1fbeaa6@googlegroups.com> (raw)
In-Reply-To: <lo7rnc$76t$1@dont-email.me>
On Sunday, June 22, 2014 5:17:49 PM UTC-7, Simon Clubley wrote:
>
> There will probably only be one 32 bit port in use for the LCD and only
>
> a small subset of the bits will probably be in use (at least for driving
>
> the LCD if it's the type of LCD I think it is).
>
>
>
> It looks like Mike is implementing the traditional character LCD driver.
>
> Intermixed with the display data will probably be command data including
>
> things like cursor addressing and there will probably be additional I/O
>
> lines for things like Read/Write select and data/command mode.
>
>
>
> However, to reduce the amount of I/O pins you need to wire up, you can
>
> command the LCD module to switch from 8-bit mode to 4-bit mode so you
>
> end up sending each command or data character as two nibbles and that
>
> looks like what Mike has done here.
>
>
>
> My first pass at a design for this would be a 32-bit record type with
>
> the bitfields laid out to correspond with the actual wiring of the I/O
>
> port, so he has separate bitfields for both the R/W and data/command
>
> lines as well as a 4-bit wide field for the above data lines.
Yes, it's that type of LCD. 4 data lines, an E signal and a RS (register select) signal. Hard-wire the R/W line to GND.
Ignoring the control signals (they will just be writes to separate atomic set or reset registers, to avoid a RMW cycle), what might this code look like? I've got a bitfield representing the LCD data lines and I'm trying then to write bits from a Character into it.
next prev parent reply other threads:[~2014-06-23 6:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 16:51 Cleanest Ada way to do this? Mike Silva
2014-06-22 19:07 ` Simon Clubley
2014-06-22 21:20 ` Mike Silva
2014-06-22 21:05 ` Shark8
2014-06-23 0:17 ` Simon Clubley
2014-06-23 6:46 ` hungupharps [this message]
2014-06-23 7:32 ` Georg Bauhaus
2014-06-23 11:48 ` Simon Clubley
2014-06-23 15:40 ` G.B.
2014-06-23 9:02 ` rrr.eee.27
2014-06-23 11:57 ` Simon Clubley
2014-06-23 12:05 ` rrr.eee.27
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox