Okay, So I finally got an LCD Module (JHD 162A) ... It has 16 connections, the last two of which is LED+ and LED-. I guess it is for the back light... However, I have not yet found any datasheet for it. Do I have to put a current limiting resistor to these to use the LED or is it buit in?
Well you can look at the module's traces to see for sure, but I think it's safe to assume that it does not. The module mfg would not know what source voltage you planned to use thus would not know the ideal resistance. Too low and you still require the user to add more resistance anyways or it'll blow, too high and it won't work adequately on the available voltage.
Looking at the traces, I see a chip resistor designated as 2R2. Will any additional resistor cause a very dim light or so? Is the backlight independent of the other electonics? I mean, can I use the back light without any other connections?
I believe 2R2 means 200 ohms. You can guess the LED voltage from the color, but the LED current rating is going to be a mystery unless you find the spec. I suspect the LED resistor is sized for proper operation at 5v anyways.
LED is going to be completely independent of other electronics, yes.
2R2 is 2.2 ohms, this is the world standard for labelling resistor values!, by removing the decimal point it makes it far more clear what the value is.
Connect a 220ohm resistor in series with it and measure the voltage across the LED display, if it's near a multiple of 2.2 then it probably doesn't have a a seires resistor, if it's neard the VCC then it probably does.
Assuming 3v(ish) for the LED array and 5V supply then thats 2V drop across a 100R resistor (plus the 2R2 on the PCB!) which would give a current of 2(V)/100(R) = 20MA. a nice safe current for your LCD.
Most LED's are ok up to about 30MA, so you may be able to "ramp it up" a bit so using ohms law (again?!) this give us R(esistance)=V(oltage)/I(Curent) or 2(V)/30(MA) = 66.666666(etc) Ohm's so about 66R
You could use PWM to control the brightness from this max value of 30MA, this will allow you to fade from max to no light.
Oh and no come backs if it goes BOOM!
Here is a link that may help you/others **broken link removed**
I powered the display without the resistors for a few seconds from a +5v source. The backlight lit brightly. Can't say if it was unsually bright or no....
Oznog said:
Do NOT PWM a switching transistor instead of a ballast resistor. That's
No PWM is not!! think about if, if the pic locks up, for any reason, boom/fizz, goodbye backlight PWM is used to control between max and min, that's all.
All good point but how chances you have it happen if everything is correctly design and programmed? If a PIC hang... how are the chance the PWM pin stay high only but not HI-z or LOW?
Well if you only have High or low then it's 50%, if you have High, low or highZ then it's 33%, too close for comfort for me!
The other problem is that I am assuming that the code is not all written, and 100% bug free (is there such a thing?) and so during development and beta-testing, aka product roll-out The chances of anything going wrong goes up considerably.
I suppose an AC coupled circuit could be constructed to trap a "stuck" I/O line and fail-safe in the off postion, but this is going to be more complicated than a resistor!
One other thing If you want to drive the backlight from the PIC the the current availible is only going to be 25MA per I/O, so you would need at least 2, but when these switch on, the peak current may excede the 50MA from 2 I/O ports, this could latch the chip and then destroy the LED backlight and probably the PIC, all to try and save the cost of 1 resistor......