??? 02/28/07 13:40 Read: times Msg Score: -2 -2 Answer is Wrong |
#133930 - did you try... Responding to: ???'s previous message |
There are two things you could do.
1. increase the delay in your program. this code works nicely: mov R1,0 count3: mov R2,0 count2: mov R3,0 count1: djnz R3,count1 djnz R2,count2 djnz R1,count3 What it does is count from 0 to 16777216. The time you need to process an LCD command is between 40uS and 1.7ms. You need to determine how long (using datasheets) that it takes for the system to process an instruction. Then divide 1.7ms by your number, and that is the minimum count your delay needs to go to. The above code should work for many systems, and I used it as good debugging. It may seems to process the LCD characters slowly, but if it works, then you can play with the numbers (Make R1, R2, or R3 higher than 0) until the LCD no longer works. try the LCD alone. Connect +5v to LCD's pin 2 and GND to LCD's pin 1. If you see a row of black squares then your LCD is working. If not, then your LCD may be broken. |