LCD Display string problems
-
- Posts: 4
- Joined: Thu Jan 18, 2007 7:43 pm
LCD Display string problems
In a school project with a PIC16F877 we have connected an LCD display, that is hd44780 compliant to port A. The display is almost working, but some of the strings are showing up wrong. The first character in some of the strings is wrong i.e. "5nter keycode:" instead of "enter keycode" and "enlocking door" instead of "unlocking door". We first thought that the problem occured because of electrical noise, but the error is exactly the same for a certain flowcode macro. Another group, which also use port A has the exactly same problem, while the group using port B has no problem at all. What could possibly be wrong?
-
- Posts: 4
- Joined: Thu Jan 18, 2007 7:43 pm
A pullup resistor on bit 4 doesnt solve the problem.
The weird thing is, that we have two blocks in flowcode, that both writes "enter keycode:" to the display. When the first block is executed it shows up as it is supposed to, but the second one shows up as "5nter keycode", and there are no typos in flowcode. Other examples are:
"enlocking door"
"toor unlocked"
"1ccess granted"
"1ccess denied"
The weird thing is, that we have two blocks in flowcode, that both writes "enter keycode:" to the display. When the first block is executed it shows up as it is supposed to, but the second one shows up as "5nter keycode", and there are no typos in flowcode. Other examples are:
"enlocking door"
"toor unlocked"
"1ccess granted"
"1ccess denied"
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Hello,
I have just tried this again with a 1k pullup resistor to 5V and it works fine. This is using our EB-006 multiprogrammer E-Block and our EB-005 LCD E-Block.
Without the resistor, our display displays 2onjour (and sometimes "onjour). With the resistor it correctly displays bonjour.
The problem is definitely a hardware issue due to the open-collector nature of pin A4. If you use the display on PortB, then you should not receive this problem.
I guess that the reason it works in your first block of code is either due to a previous instruction to the LCD, or due to residual voltage on the lines to the LCD display due to capacitive effects of the circuit. When I try, I can get the second "onjour every time by placing my finger on the A4 pin!
I have just tried this again with a 1k pullup resistor to 5V and it works fine. This is using our EB-006 multiprogrammer E-Block and our EB-005 LCD E-Block.
Without the resistor, our display displays 2onjour (and sometimes "onjour). With the resistor it correctly displays bonjour.
The problem is definitely a hardware issue due to the open-collector nature of pin A4. If you use the display on PortB, then you should not receive this problem.
I guess that the reason it works in your first block of code is either due to a previous instruction to the LCD, or due to residual voltage on the lines to the LCD display due to capacitive effects of the circuit. When I try, I can get the second "onjour every time by placing my finger on the A4 pin!
-
- Posts: 4
- Joined: Thu Jan 18, 2007 7:43 pm