TTL Communication Issues with GLK 12232-25-SM LCD
Posted: Mon Mar 29, 2010 8:09 pm
Hello,
I am currently trying to communicate with my GLK 12232-25-SM Rev 1.4 LCD screen using a 18F2550 PIC chip using a C18 compiler (essentially programming in C). I am in TTL mode on the LCD screen (removed RS232 connections and created new solder connections on TTL pads in accordance with the manual) but when I try to send a simple "Clear Display" command nothing happens. When I tried to send letters to the display I got random characters (ie. I tried to send "SP" to display and "%" was displayed)
The baud rates of the LCD screen and the PIC chip are both 19200 baud and the PIC chip is set to the following
Signal: Asynchronous Serial
Baud Rate: 19200
Start Bits: 0
Stop Bits: 1
Parity: None
Flow Control: Off
Data: Hexadecimal values
I have included some code below but when looking at the output signal on the oscilloscope it seems to be transmitting properly with both a start bit and a stop bit.
OpenUSART(USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE & USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_HIGH, 25); // Initializes serial output to asynchronous, 8 bit, 19200 baud signal
WriteUSART(0xFE); // Writes 255 in Hex to serial output buffer
WriteUSART(0x58); // Writes 88 in Hex to serial output buffer
//nothing happens
WriteUSART(0x53); // Writes "S" to serial buffer
WriteUSART(0x54); // Writes "P" to serial buffer
// "%" displayed on LCD screen
Am I sending the commands correctly? Or am I doing something else wrong? Is there some sample code that I can base my programming off of?
Thank you in advance for your help,
Jason
I am currently trying to communicate with my GLK 12232-25-SM Rev 1.4 LCD screen using a 18F2550 PIC chip using a C18 compiler (essentially programming in C). I am in TTL mode on the LCD screen (removed RS232 connections and created new solder connections on TTL pads in accordance with the manual) but when I try to send a simple "Clear Display" command nothing happens. When I tried to send letters to the display I got random characters (ie. I tried to send "SP" to display and "%" was displayed)
The baud rates of the LCD screen and the PIC chip are both 19200 baud and the PIC chip is set to the following
Signal: Asynchronous Serial
Baud Rate: 19200
Start Bits: 0
Stop Bits: 1
Parity: None
Flow Control: Off
Data: Hexadecimal values
I have included some code below but when looking at the output signal on the oscilloscope it seems to be transmitting properly with both a start bit and a stop bit.
OpenUSART(USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE & USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_HIGH, 25); // Initializes serial output to asynchronous, 8 bit, 19200 baud signal
WriteUSART(0xFE); // Writes 255 in Hex to serial output buffer
WriteUSART(0x58); // Writes 88 in Hex to serial output buffer
//nothing happens
WriteUSART(0x53); // Writes "S" to serial buffer
WriteUSART(0x54); // Writes "P" to serial buffer
// "%" displayed on LCD screen
Am I sending the commands correctly? Or am I doing something else wrong? Is there some sample code that I can base my programming off of?
Thank you in advance for your help,
Jason