--- In l..., shawnzyoo@... wrote: >
> Hello,
> I am still fairly new to MCU and experimenting with different projects. Right now I am working on a LCD project. Now I am not too
sure on how to enable the backlight, I am using an ARM 2103 with this
LCD panel > LCD Display - LCD16x2BL
> www.futurlec.com/LED/LCD16x2BL.shtml
Ordinarily, the controller doesn't have anything to do with the
backlight. There are displays where the controller does control the
intensity like the Matrix Orbital LK204 but I don't think this one
those.
The problem is the WIDE variation in LED current depending on color. A
white backlight might require 20 mA and a yellow backlight might
require 120 mA. See this datasheet http://www.jameco.com/Jameco/Products/ProdDS/658988.pdf page 2
Electrical Characteristics.
Note that it is up to the user to provide a current limiting resistor
for the LED. The value R is (Vsupply - Vf) / If
For the white LED at If = 20 mA, Vf = 3.4V, Vsupply = 5.0V, the value
would be 80 ohms.
For the yellow LED at If = 120 mA, Vf = 4.1V, Vsupply = 5.0V, the value
would be 7.5 ohms.
Connect the resistor as shown in the Block Diagram of the referenced
datasheet.
Unfortunately, there is no specification for the LED Vf and If values
for your display. You are on your own!
Reply by shaw...@yahoo.com●June 28, 20072007-06-28
Hello,
I am still fairly new to MCU and experimenting with different projects. Right
now I am working on a LCD project. Now I am not too sure on how to enable the
backlight, I am using an ARM 2103 with this LCD panel
LCD Display - LCD16x2BL
www.futurlec.com/LED/LCD16x2BL.shtml
Interface Pin Connections
Symbol Level Function No. Symbol Level Function
1 Vss GND(OV) 9 DB 2 H/L Data Bit 2
2 VDD VCC(+5V±5%) 10 DB 3 H/L Data Bit 3
3 Vo Contrast ADJ 11 DB 4 H/L Data Bit 4
4 RS H/L Register Select 12 DB 5 H/L Data Bit 5
5 R/W H/L Read/Write 13 DB 6 H/L Data Bit 6
6 E H.H-L Enable Signal 14 DB 7 H/L Data Bit 7
7 DB 0 H/L Data Bit 0 15 A BKL+ Backlght +
8 DB 1 H/L Data Bit 1 16 K BKL- Backlght -
And here is the code I am implementing
/* pototype section */
void lcd_init(); // Initial LCD
void lcd_out_data4(unsigned char); // Strobe 4-Bit Data to LCD
void lcd_write_byte(unsigned char); // Write 1 Byte Data to LCD
void lcd_write_control(unsigned char); // Write Instruction
void lcd_write_ascii(unsigned char); // Write LCD Display(ASCII)
void goto_cursor(unsigned char); // Set Position Cursor LCD
void lcd_print(unsigned char*); // Print Display to LCD
char busy_lcd(void); // Read Busy LCD Status
void enable_lcd(void); // Enable Pulse
void delay(unsigned long int); // Delay Function
/* Main Program Start Here */
int main(void)
{
lcd_init(); // Initial LCD
// Loop Print Message to LCD16 x 2 //
while(1) / Loop Continue
{
goto_cursor(0x00); Set Cursor Line-1
lcd_print(" Team Pegasus "); //Display LCD Line-1
goto_cursor(0x40);
lcd_print(" Game Night ");
delay(10000000); // Display Delay