HOME | PRODUCT | SHOP ONLINE | Sample Code | DOWNLOAD | SHIPPING | POLICY | CONTACT | ||
Using SC1602/SC2004 Serial LCD with Microcontroller | ||
Writing microcontroller code for SC1602 / SC2004 Serial LCD Module is both easy and space saving. Most of the code otherwise required by normal parallel LCD module is embedded on the SC1602/SC2004 controllers. Serial LCD interface with microcontroller through its UART ports. In most applications, only one pin is required. See wiring diagram for details. Interface can be either RS232 or TTL logic. If RS232 is used then the microcontroller board should has the RS232 transceiver chip. The serial LCD TTL port works on both 3V and 5V logic. By default, LCD serial port is set at 9600 bps, 8 data bits, no parity and one stop bit. Microcontroller program flow should look like this:
Unlike parallel LCD, you do not need to add delay for consecutive commands. For example; if you clear the LCD screen and write a character to the LCD screen. Parallel
LCD need 1.6 ms to clear the display and 40us to write a character to
the screen. For coding simplicity, we have provide an api c code containing all functions required to control SC1602/SC2004. The api varies slightly for different mcu architecture. We provides examples for ZiLOG,Atmel,Microchip and MSP430 Download the api summary here : slcdxxAPI.pdf Usage example: #include "slcdapi.h" char txbuff[20] = "LCD Demo"; main() LCD_print(); This will cause LCD Demo to be displayed on LCD LCD_Command_2(BACKLIGHT_ON); This will turn on The LCD Backlight LCD_Command(NEXT_LINE); This will move the cursor to the next line on LCD } |
||
Zilog Encore! XP The API : EncoreXP.zip Code Example: SLCDXP1.zip Hardware : SC1602 and Z8F041 Compiler : ZDSII V4.9.5 ATMEL AVR The API : slcdavrapi.zip Code Example: slcdavr1.zip Hardware : SC1602 and AT90S2313 Compiler : WinAVR |
Microchip PIC The API : slcdpicapi.zip Code Example : slcdpic1.zip Hardware : SC1602 and PIC16F877 Compiler : MPLAB and PICC Lite C Compiler Texas Instruments MSP430 The API : slcdmspapi.zip Code Example : slcdmsp1.zip Hardware : SC1602 and MSP430F133 Compiler : Code Composer Essential |
|
Note: Some microcontroller does not has an UART, however there are a lot of application note on software UART which works just as fine with our Serial LCD. |
||
Main | Shop | Download | Links | Webmaster Copyright © SILICON CRAFT 2006 |