From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.175.173 with SMTP id cb13mr8655345pac.10.1403506004261; Sun, 22 Jun 2014 23:46:44 -0700 (PDT) X-Received: by 10.140.51.18 with SMTP id t18mr7139qga.27.1403506004214; Sun, 22 Jun 2014 23:46:44 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!uq10no5190263igb.0!news-out.google.com!a8ni10892qaq.1!nntp.google.com!w8no10178990qac.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 22 Jun 2014 23:46:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.69.213.73; posting-account=Rkpt4AoAAAB8fHBAe9UIH5TYP1BQ2uA2 NNTP-Posting-Host: 108.69.213.73 References: <7eaee5fc-2045-4bb3-8b16-d757b54760da@googlegroups.com> <6yHpv.55741$G37.7010@fx07.iad> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <543afc17-4c32-4e15-a52f-80fcc1fbeaa6@googlegroups.com> Subject: Re: Cleanest Ada way to do this? From: hungupharps@gmail.com Injection-Date: Mon, 23 Jun 2014 06:46:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:20546 Date: 2014-06-22T23:46:43-07:00 List-Id: On Sunday, June 22, 2014 5:17:49 PM UTC-7, Simon Clubley wrote: >=20 > There will probably only be one 32 bit port in use for the LCD and only >=20 > a small subset of the bits will probably be in use (at least for driving >=20 > the LCD if it's the type of LCD I think it is). >=20 >=20 >=20 > It looks like Mike is implementing the traditional character LCD driver. >=20 > Intermixed with the display data will probably be command data including >=20 > things like cursor addressing and there will probably be additional I/O >=20 > lines for things like Read/Write select and data/command mode. >=20 >=20 >=20 > However, to reduce the amount of I/O pins you need to wire up, you can >=20 > command the LCD module to switch from 8-bit mode to 4-bit mode so you >=20 > end up sending each command or data character as two nibbles and that >=20 > looks like what Mike has done here. >=20 >=20 >=20 > My first pass at a design for this would be a 32-bit record type with >=20 > the bitfields laid out to correspond with the actual wiring of the I/O >=20 > port, so he has separate bitfields for both the R/W and data/command >=20 > 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 s= elect) signal. Hard-wire the R/W line to GND. Ignoring the control signals (they will just be writes to separate atomic s= et or reset registers, to avoid a RMW cycle), what might this code look lik= e? I've got a bitfield representing the LCD data lines and I'm trying then= to write bits from a Character into it.