I have an UNO (equivalent) , a PHI-2 shield, and 20x4 LCD display.
I've read about the BACK LIGHTING resistor and went for the higher value, as it was for a bedside clock.
Anyway, new questions/problems have come to light - no pun intended.
I am about to put an MCP on the setup so I will have more than enough I/O pins to spare, and so pins 16 and 17 have become vacant.
As they are ANALOGUE pins, could I use one of them to adjust the backlight brightness?
My reasoning is this:
(and it gets weird)
For general use the display is ok, and I can read the digits, but:
Lying in bed I can't make out the exact time, and I was thinking: As the night goes on, the display gets darker; to a point. Then as morning starts to come, it gets brighter.
That way if I "wake up" and look at the display, depending on how bright/dark it is, I can get an estimate on the time.
Possible?
I know it will take a fair bit of code, but I am just looking at the idea for now.
I have read that you use the PWM pins, and adjust the duty cycle, but a resistor is analogue. So as I have a "spare" analogue pin, I am biased that way.
Instead of using an internal timer in PWM mode, the SoftPWM uses a timer to generate an interrupt. And in that interrupt the pin (any pin) is toggled. It's like the tone() function, which can generate a tone on any pin this way.
Don't you have a PWM pin free to use? It's much easier to handle than to use SoftPWM. What pins are still available?
The analog pins are analog inputs. The Arduino has no analog outputs but have several pins that have hardware support for PWM which is, in some applications, an alternative to analog output. If you don't have a PWM pin free to use, you can use SoftPWM to emulate the hardware functionality in software but that uses a timer which might posing other problems depending on the software used.
Liudrs Phi Shield has a settable backlight as part of his software but there are several pages of stuff to read to find it. I own 3 or 4 of his LCD backpacks and for the lcd control according to john (Liudr) he used the software for the shield to make his serial backpacks. Impressive little things, control a 20 X 4 and read a keypad as well I think he said the ports could also be used for other control stuff as well. Great product but Extremely poorly documented.
Docedison:
Liudrs Phi Shield has a settable backlight as part of his software but there are several pages of stuff to read to find it. I own 3 or 4 of his LCD backpacks and for the lcd control according to john (Liudr) he used the software for the shield to make his serial backpacks. Impressive little things, control a 20 X 4 and read a keypad as well I think he said the ports could also be used for other control stuff as well. Great product but Extremely poorly documented.
Doc
I wish I could agree.
I am having head ache after head ache.
The back lighting is now done with a resistor. I can't see any software control available.
The shield is badly (to say the least) designed for where the buttons are and use of pins.
But I am getting there. Slowly.If you can find where the software control for the display lighting is, please let me know.
Yes it can I think be found in the PHI big panel display... Here is what I did, you can I think how to use it
mySerial.print("\e[26;255m~"); // set lcd @ 100 % backlight
I used this code with one of his backpacks it is my understanding that your lcd is controlled by a processor on
the the board that the switches are and I think a 3 X 4 or 4 X 4 can be used instead of the switches on an 8
pin sip header I don't know My backpacks do and beyond several conversations with the man that is all I really
know, read all the sketches, that's all the documentation on a complex program. That is where I found the
information I sent you but I had to learn somehow... so I read them well enough to understand about 25%...
and an idea of where to look. there are lcd cursor controls to blink underline solid... and I am sure he
implemented some kind of cursor placement for printing to the lcd in various places as well as the ability to
deal with the 8 programmable characters the LCD can display.
The big number 255 is full and 0 would be none. Out of habit I set that value to 128 or half bright... Looks ok with one of white on blue 4X20 displays.