Shop OBEX P1 Docs P2 Docs Learn Events
2x16 LCD (Backlite #27977) Problems — Parallax Forums

2x16 LCD (Backlite #27977) Problems

Michael NagyMichael Nagy Posts: 3
edited 2009-02-20 02:24 in General Discussion
Hi - I am having a heck of a time getting reliable display of data on the subject display.· Most characters display fine, but the display insists on 'skipping' characters every now and then, no matter how slowly they are sent.·

I have it set to·2400 baud, and have verified the data format with a digital scope and see no glitches in the serial datastream at all.· The serial data rate is approximately 3% fast, which should be well within limits.· Supply voltage is bang-on at +5.0v.· I have identical results on two separate LCD units, so if it is a hardware issue it is the same on both units (one·unit first opened today to test this).

I am pretty much at my wits end with this.· Any one else seen anything similar?· The only thing I can remotely imagine at this juncture is power-supply noise, but I am not too hopeful on that score.· I will next take a crack at filtering·that·in any case.

- Michael

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-02-18 21:36
    Can you attach your code? Use the attachment manager (not cut and paste the code).
  • Michael NagyMichael Nagy Posts: 3
    edited 2009-02-18 21:57
    I doubt the code would help - this is interrupt-driven stuff on an Atmel ATmega64. And as I mentioned, I did capture the entire serial datastream on a digital scope and it looks clean. I did try adding a decoupling capacitor directly across +5V/GND on the LCD module itself, and observed no change in symptoms. I am driving the serial line with a push/pull comparitor, which has a very fast rise/fall time. I may try an RC filter on the serial line itself to kill any possible high-frequency issues.

    On thing does occur to me at this point - the documentation is silent on the details of the serial framing format. I assumed 8/N/1 (8 bits, no parity, 1 stop bit). Is the module perhaps requiring 1.5 or 2 stop bits?

    - Michael
  • LeonLeon Posts: 7,620
    edited 2009-02-19 11:46
    3% data rate error might be a bit too much, especially at a low baud rate.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-19 20:09
    The data should be 8N1 format…however, are you using inverted or non-inverted data? The idle state should be high. Also, if you’re clearing the screen with that command you must wait a certain amount of time (I think 5ms) as listed in the documentation before sending any additional data. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Michael NagyMichael Nagy Posts: 3
    edited 2009-02-20 02:24
    Problem solved - it was indeed the serial data rate (Leon nailed it!). I have worked with serial data for a long time, and never considered a 3% rate error to be excessive, but it is what it is. In the past, I have always used crystal resonators with the Atmel parts, and this was never an issue. On this latest design, I decided to save 50 cents and use the built-in RC oscillator on the chip, hence the 3% error. Luckily, the Atmel parts also have the ability to calibrate the internal oscillator with a bit of effort, and that was sufficient to get things working.

    Thanks for you comments, too, Chris. The 8N1 statement really should be in the docs somewhere. It is probably presumed because that is how the PIC parts work, but since I don't use those, it wasn't apparent.

    - Michael
Sign In or Register to comment.