| ??? 11/23/00 02:53 Read: times |
#6689 - RE: Lcd program |
Hans
Here is some of the email to Craig Steiner reporting the tutorial problem. I also volunteered to give him a copy of my LCD routines. Let me say that I'm not an LCD expert, I never worked with LCD's prior to about 2-3 months ago. Lots of confusing data out there most are incomplete or don't work. I started working with the tutorial, that was my first choice, but never did get it to work. I gave up on it and looked for other data. I came up with my routine by piecing together a little from everything I found on the internet on this subject. My routines work perfectly in every LCD mode, character by character, complete terminated strings, billboard moving text, single line, double line, loading and using user designed characters and 4 bit/8 bit data writes, all using the standard P0 8502 type bus plus other control lines. Written in assembly language as a driver. Since the LCD also conflicted with the T2 clock on P0 I used for other routines, I also added some tri state digital switches. The following is the email to Craig Steiner, on one error I found in the tutorial: ***************************************************** >> the "Check Busy Status" command is a special command in that it can be >> executed while the previous instruction is still being executed. As soon >> as RW is set, the results are immediately placed on DB0-DB7. > >I disagree, doing a SETB RW does not put it in READ mode without the EN strobe >going from hi to lo or CLEAR instruction. This routine is entered with an >assumed RW in the NORMAL WRITE mode therefore you MUST first SETB EN which you >do, then SETB RW, which you do, follwed by CLR EN which you don't do and is >necessary to put the device in READ mode. You can't read Bit 7 without being >in READ mode. You can't go to READ MODE without the RW command set and you >can't exicute the command without the EN strobe going from HI to LO. >Therefore your routine cannot READ the Bit 7 BUSY flag. Thats why a dozen or >more new 44780 LCD's wont work with your routine. You placed the CLR EN >outside the READ loop and it hangs the micro. Thanks for the input. I'll have to try the code with some other LCDs in the future. I can only say that the code worked on my project. As always, "mileage may vary." **************************************************** Hope this helps someone. I already sent two of my routines, plus the hardware bus sharing schematic to two others here in this chat room, although I never received any feedback to see if they got their LCD's to work with my routines or circuit. I would think with all this interest in LCD's that maybe the tutorial should be more correct and more complete. I offered to help Craig, but was turned down. Like most software experts, changing what worked for them many moons ago comes very hard for them to accept, change or take seriously, when corrected by a 3 month, self taught, LCD expert (me). I still don't expect any LCD tutorial errors to get corrected, but Hans, you asked and I answered. I'm not flaming Craig, I learned alot here, but since the site said to post any errors found by anyone, I did, but I do agree, it did'nt say any would be corrected. If you run the LCD tutorial exactly as posted your LCD will NOT work. A. Post |
| Topic | Author | Date |
| Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
| RE: Lcd program | 01/01/70 00:00 | |
RE: Lcd program | 01/01/70 00:00 |



