LCD RW signal grounded and avrlib

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Progressing on making all bricks working together (serial,I2C,LCD,....).
My Mega128 board has LCD interface pre-cabled. Unfortunately, the RW signal is grounded so most libraries are not compatible. I have tried to add this possibility in the avrlib code (procyon) (#define RW_GROUNDED), but it is not working yet. Has anybody did this before ? I'm afraid I'll have to add delays and see how it behaves....
Any hints ?

V.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm afraid I'll have to add delays and see how it behaves...

You could use a timer. At the end of each operation, place a value in a timer such that the timer will overflow when the LCD is ready for another operation.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You'll have to add delays! I've just done that in a 4 bit interface configuration. As avrlib needs the busy signal, that you cant read it as the RW is 0, you will have to add delays instead of the calls to lcdBusyWait().

I've rewrote most of the lib (and got rid of most of it too, as I didnt want to recode things I wouldnt use) to fit the new GCC syntax, instead of the deprecated outp, inp, etc. I've also include an option to use any 4 pins you want for the data lines, as in my board, the data lines are in PB2..5, instead of the usual PB0..3 or PB4..7. I havn't heavily tested the library, but for now it didn't misbehaved to me :D

PS: If you find any bugs, please tell me so!

Attachment(s): 

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks. I finally stripped the original for RW references, and added large delays. It work pretty well now. Anyway, I'll wire the RW signal somewhere else, so I get something cleaner. I'll just adapt the lib so signals can be split among several ports.
I'll post it once I have something working.

Vincent