Shop OBEX P1 Docs P2 Docs Learn Events
Strange behvior with 4x20 LCD **solved** — Parallax Forums

Strange behvior with 4x20 LCD **solved**

Greg LaPollaGreg LaPolla Posts: 323
edited 2010-06-30 20:32 in General Discussion
I am using the Serial LCD driver from obex, which in turn uses simple serial.

I have discovered some strange behavior. Every other cycle through my screen update process the second line of the lcd is overwritten by the forth line, hence the updated value being displayed alternates between what should be on the second line and the fourth line.
The LCD driver is using 19200 baud.

Here is the routine that updates the screen:

PRI SpargeUpdate (_mash,_hlt,_time)

  lcd.home  
  lcd.gotoxy(7, 1)
  lcd.str(num.decf(_mash, 3))
  lcd.gotoxy(7, 2)
  lcd.str(num.decf(_hlt, 3))  
  lcd.gotoxy(7, 3)
  lcd.str(num.decf(_time,3))
  waitcnt(clkfreq / 5 + cnt)





Is this something that is known about ? or am I maybe just feeding the data too fast? an Issue with simple serial? I have dumped the values of the variables being used to pst and they are correct.

Post Edited (Greg LaPolla) : 6/30/2010 9:30:40 PM GMT

Comments

  • kf4ixmkf4ixm Posts: 529
    edited 2010-06-30 20:19
    Alot of ppl have encountered problems using baud rates greater than 9600 on the 4x20 serial lcd, try 9600 or even 4800 and see if the problems go away. I myself have always used 9600.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm just 7*1027 atoms floating through time and space in close formation. -KF4IXM
  • Greg LaPollaGreg LaPolla Posts: 323
    edited 2010-06-30 20:23
    Lowered it to 9600 and 2400 still same issue.
  • Greg LaPollaGreg LaPolla Posts: 323
    edited 2010-06-30 20:32
    I actually just discovered the problem. It was an indent issue and an if statement in the main part of the program was running when it shouldn't have been. It is now running fine at 19200.
Sign In or Register to comment.