Graphic LCD busy flag

Hi,

I am going to interface a KS0108 128x64 graphic LCD using AVR but encounter a big problem. I find that sometimes the program loops and hangs. I then stop the debugger and finds the program counter is looping to check the busy flag of the LCD.

Anyone could help me or give me some hints to solve this?

Thanks!

Reply to
terry
Loading thread data ...

"terry" schreef in bericht news: snipped-for-privacy@posting.google.com...

In theory it should not happen, but it is a bit akward to hang in a loop there. Perhaps you could add a time-out, which is also convenient when you have no LCD attached.

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Reply to
Frank Bemelman

I think adding a timer is not a good method to solve it, as the characters on the LCD will still be wrong.

Reply to
terry

I now suspect it is the problem of LCD and I will try another one of different brand name.

Reply to
terry

Could very well be the case. A few years back I changed from a Batron display to a Clover. They were supposed to have an identical interface and instruction set. On the Clover however, I was unable to read the busy bit. I was never able to sort out through the distributor what could be wrong. I was of course the only customer with a problem with this display etc.etc. So eventually I skipped testing of the busy bit all the way and put small delays in. Although I can see the throughput go severely down on a graphics display. We only did text (16 x 2)....

Meindert

Reply to
Meindert Sprang

Check your bus timing. Most of the LCD Display modules require, VERY slow bus timing. Depending on which AVR you are using you might be able to add wait states. If you are driving the Display via normal I/O pins, then you still might have to add some NOPs to slow down the bus cycle.

Regards Anton Erasmus

Reply to
Anton Erasmus

I delete all the check busy flag loops and find it is OK now.

Reply to
terry

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.