John UK
12-21-2012, 11:16 AM
I have recently set up a small LCD screen to run the pde_inout_v2 sketch.
Everything worked as it said it would in the instructions, so that was good and it spurred me on to think on how I could improve it.
The potentiometer that I have has the standard three pins plus another 4 on the rear of the device. There is a switch in the device as well as the potentiometer function, so the switch is like a on/off volume switch in a radio. It appears that these extra terminals provide a double pole switch. What I am trying to do is to use the potentiometer as a contrast control and as an off/on switch as well.
I have run into a problem. I wired the potentiometer as follows:
The centre wire is wired as in Jims diagram for the pde_inout_v2 sketch. The ground and 5v wires pass through the double pole switch before the potentiometer. All other wiring is as in Jims diagram
The result is that when switched on before the power goes to the board all is well and the display shows the message 'Hi_from_Jim_:)_' and underneath 'Waiting_for_data'. The contrast works and the display can be switched off. When the display is switched on again the message is not there, the display shows a full set of black dots (16 rectangles) on the top line and none on the second line. The same display is shown if the potentiometer is in the off position and turned on after the board is initialized, I don't get the Hi_from... message at all.
I thought this may be as the Hi message is output at the start of the code and not in the looping section, so i copied it to the loop. No difference. I think it must be something else I am doing but I cant think what it is. Its probably something basic I have misunderstood but I cant think what. The good news is that the contrast function seems to work ok whatever I do.
The display is HD44780-compatible. The only way I can regain the message is to disconnect and reconnect the USB lead. The display is USB powered.
Any help would be great!
Everything worked as it said it would in the instructions, so that was good and it spurred me on to think on how I could improve it.
The potentiometer that I have has the standard three pins plus another 4 on the rear of the device. There is a switch in the device as well as the potentiometer function, so the switch is like a on/off volume switch in a radio. It appears that these extra terminals provide a double pole switch. What I am trying to do is to use the potentiometer as a contrast control and as an off/on switch as well.
I have run into a problem. I wired the potentiometer as follows:
The centre wire is wired as in Jims diagram for the pde_inout_v2 sketch. The ground and 5v wires pass through the double pole switch before the potentiometer. All other wiring is as in Jims diagram
The result is that when switched on before the power goes to the board all is well and the display shows the message 'Hi_from_Jim_:)_' and underneath 'Waiting_for_data'. The contrast works and the display can be switched off. When the display is switched on again the message is not there, the display shows a full set of black dots (16 rectangles) on the top line and none on the second line. The same display is shown if the potentiometer is in the off position and turned on after the board is initialized, I don't get the Hi_from... message at all.
I thought this may be as the Hi message is output at the start of the code and not in the looping section, so i copied it to the loop. No difference. I think it must be something else I am doing but I cant think what it is. Its probably something basic I have misunderstood but I cant think what. The good news is that the contrast function seems to work ok whatever I do.
The display is HD44780-compatible. The only way I can regain the message is to disconnect and reconnect the USB lead. The display is USB powered.
Any help would be great!