TTL Communication Issues with GLK 12232-25-SM LCD

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
jwb_555
LCD?
Posts: 2
Joined: Mon Mar 29, 2010 7:09 pm

TTL Communication Issues with GLK 12232-25-SM LCD

Post by jwb_555 » 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

Clark
Matrix Orbital
Matrix Orbital
Posts: 879
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark » Wed Mar 31, 2010 9:41 am

Hi Jason,

I appreciate the info provided and see that you are having trouble getting a command and a couple letters to transmit correctly to your display. Your setup looks good, the display runs an 8N1 protocol with no parity and no flow control at a default 19200 baud. If you're not already, you may want to throw in the manual override jumper to force the unit to 19200 if for some reason it has been changed, just until communication starts working at which point you can save your own settings.

Next, you may want to start with text, again just until communication is successful. This eliminates any compounding errors due to the command not executing correctly.

Anyway, hope that helps get communication started, if not, please post your findings and we'll continue troubleshooting.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

jwb_555
LCD?
Posts: 2
Joined: Mon Mar 29, 2010 7:09 pm

Communication Issues with GLK 12232-25-SM LCD

Post by jwb_555 » Fri Apr 09, 2010 12:17 am

Here is an update on the progress of trying to get my LCD screen to work.

I reset the screen according to your instructions, resoldered the TTL jumpers and reconnected the screen to the PIC chip. This seemed to fix the problem.

The screen worked for approximately a day, was powered down multiple times and powered up, while I tested it. Everything seemed to be going well until today...

In the middle of a testing session the screen stopped functioning. When I tried to send a command to print a letter, the screen printed the incorrect letter, or no letter at all. I tried many more times with the same result. In order to troubleshoot the problem I switched the screen from TTL mode back to RS232 mode by changing the jumpers as outlined in the manual.

When I connected the screen to my computer and did an automatic search for the screen in MODG# the screen was found but had a baud rate of 9600 instead of the 19200 baud rate that had been previously set. I looked over my code and could not find any commands to change the baud rate, so I do not know how this change occurred.

In order to rectify the situation I tried to change the baud rate back to 19200 using MODG# and the RS232 connection to my computer. I was informed that the change had worked so I tried to do another search for the screen in order to make sure. MODG# was unable to locate the screen. I powered down the module and tried to reconnect it to the computer and it was still not found. I then tried to locate the screen on a different computer with the same result.

I tried to manually reset the baud rate as was previously suggested on this thread but that did not work either (I jumped pins 5 and 6 as stated in the manual). I then tried to change the screen to TTL mode hoping that there was a problem with my computer and again the LCD was unable to receive the proper data from the PIC chip. I then tried to find the baud rate by trying different methods with the PIC chip but they all failed.

So my problem is that I am now stuck with a screen that is set to an unknown baud rate by MODG# and that cannot be reset manually. Are there any suggestions on how I can reset the baud rate or even locate the baud rate, or am I stuck with a useless screen?

I look forward to your response,

Jason

Clark
Matrix Orbital
Matrix Orbital
Posts: 879
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark » Fri Apr 09, 2010 4:32 pm

Hi Jason,

I'm glad to hear you were able to get the screen working, although unfortunately I see that it was only temporary.

The override should set the unit back to 19200, provided it is still in good working order. Give it another go in RS232 mode with the autodetect, and if that is unsuccessful please feel free to email the serial number, problem description, your shipping address, and a contact phone number to support@matrixorbital.ca to get an RMA started for repairs here. It sounds like the unit may be out of warranty, but if all else fails we can at least take a look rather than leaving you with a dead display.

It's hard to tell what may have happened; with intermittent responses and changing baud rates anything may have been sent to the display. Hopefully you can get communication back and we can reset everything else, otherwise I'll need to reprogram the entire controller here.

~Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 24 guests