Hi Steve, The characters look random when displayed. The code uses the 4 bit interface, on port A of the PIC, with 3 port B lines handling RS, R/W & E. It reads the busy flag as part of the "LCD command" / "LCD data" before proceeding with the write to the LCD. Does the auto-increment of the "cursor" position work when addressing CGRAM - the code is relying on this. However I also got the same results when I did a "Set CGRAM address" for each byte (row) sent to the display. I may try inserting an artificial delay between the LCD initilisation and the custom character definition just to allow the LCD to settle. This LCD is not acutally driven by a 44870, but emulates it. It is one of the RS "Powertip" range, but the interface is identical (as far as i can see) to the standard Hitachi chip. Cheers, Andy -----Original Message----- From: Steve Lawther [mailto:SLawther@HUSKY.CO.UK] Sent: 21 February 2000 10:11 To: PICLIST@MITVMA.MIT.EDU Subject: Re: Custom LCD Characters Andy, The pseudo code looks fine - When you display a user character afterwards, is it blank, random, or has it a pattern to it? Does your code check the busy bit from the display, or wait the maximum amount of time in-between writes? Steve Lawther > -----Original Message----- > From: Andy Baker [SMTP:AB@DATCON.CO.UK] > Sent: Monday, February 21, 2000 9:51 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Custom LCD Characters > > Hi all, > > My current project is a pre-amplifier, where a PIC (16F84) is used to > control the switching of the inputs, and to display on an LCD what you are > listening to. This is all working fine. > > For an enhancement, I need some underlined characters for the display, so > set about using the CGRAM feature of the 44870 -style LCD. Trouble is, it > doesn't work. I don't have code here with me, but the the gist of what I'm > doing is below. Anything obvious spring to mind as wrong. I'll post code > tomorrow if I can. > > Alternatively, anyone got any working code I can compare mine against to > spot the bug? > > Thanks, > > Andy > > Immediately after LCD initialisation, This is what I do: > > Set CGRam address (instruction 0x40 sent using known working LCD command > fucntion) > For Character = 0 to 7 > For Row = 0 to 7 > Lookup (Character , Row) in table to get data byte > Write data byte to LCD using known working LCD data write function) > Endfor > Endfor > > -------------------- DISCLAIMER This email and any attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of WPI Husky Technology. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this mail is strictly prohibited.