Hello,
I am hoping someone can lend a hand. I am trying to get the LCD2041 to display characters written to it by a freescale HC9S12 micro. I am programming in assembly language and attempting to use the Serial controller interface built into the micro. Attaching the micro to the serial port on my computer results in characters being displayed in any program such as hyperterminal but I get nothing displayed on the LCD.
I have used uproject software to test the LCD and it is working fine. I can write characters to it via that.
I am connecting to it via an RS232 interface. I am not sure what is wrong, I would think I would at least get rubbish characters if I had a baud rate problem but I don't get anything. Can anyone lend a hand?
EDIT: Can you please provide me the threshold voltages for the RS-232(where it would sense a binary 1 from a 0)
Sending serial characters to the LCD2041 from micro
Hello PurdueRy,
Thank you for your post.
(I also posted this reply for stoledo in Matrix Orbital > Hardware):
Here are the connections I would expect for your controller and the module:
4pin Power / Data Connector in RS232:
1) +5V -- power +5V
2) LK204-25 Rx -- RS232 Transceiver Transmit out
3) LK204-25 Tx -- RS232 Transceiver Receive in
4) GND -- ground
4 pin Power / Data Connector in TTL:
1) +5V -- power +5V
2) LK204-25 Rx -- uC Transmit
3) LK204-25 Tx -- uC Receive
4) GND -- ground
Make sure also that the USART settings on your uC are:
Baud = 19200
Parity = None
Stop Bit = 1
Data Bits = 8
Flow Control = None
I have a feeling that you may have the RX and TX swapped. With the LCD2041 PCB 2.0, there is a Legacy Connection Jumper that assigns the pin out for pins 2 and 3 of the power / data connector. You can find info on page 7 here
Best Regards,
Thank you for your post.
(I also posted this reply for stoledo in Matrix Orbital > Hardware):
Here are the connections I would expect for your controller and the module:
4pin Power / Data Connector in RS232:
1) +5V -- power +5V
2) LK204-25 Rx -- RS232 Transceiver Transmit out
3) LK204-25 Tx -- RS232 Transceiver Receive in
4) GND -- ground
4 pin Power / Data Connector in TTL:
1) +5V -- power +5V
2) LK204-25 Rx -- uC Transmit
3) LK204-25 Tx -- uC Receive
4) GND -- ground
Make sure also that the USART settings on your uC are:
Baud = 19200
Parity = None
Stop Bit = 1
Data Bits = 8
Flow Control = None
I have a feeling that you may have the RX and TX swapped. With the LCD2041 PCB 2.0, there is a Legacy Connection Jumper that assigns the pin out for pins 2 and 3 of the power / data connector. You can find info on page 7 here
Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
Hello PurdueRy,
Yes, I meant either of the two, not both.
For the RS232, we use a standard RS232 transceiver ST232EB. Here is the datasheet for this part. I am not sure if you needed the RS232 input or the TTL input thresholds.
Best Regards,
Yes, I meant either of the two, not both.
For the RS232, we use a standard RS232 transceiver ST232EB. Here is the datasheet for this part. I am not sure if you needed the RS232 input or the TTL input thresholds.
Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
-
- LCD?
- Posts: 3
- Joined: Wed Mar 14, 2007 9:53 pm
Hello, I am having similar issues. I am using an C8051F120 uC to try and control a VK202-25 display and keypad.
I have a 5V power supply hooked up to the power/data connector (Connector #5 on page 9 of manual) to power the display. I also have an RS232 connection running from the display to an RS232 DB9 connector on the uC board. See connection below:
Display uC
-------- --------
pin2 (Rx) <--------- pin3 (Tx)
pin3 (Tx) ---------> pin2 (Rx)
pin5 (GND) --------- pin5 (GND)
I didn't follow the +5V requirement that was shown above because I am not going to power the device through the DB9 connector. (could this be the problem?)
I also have a separate power supply powering the uC.
I am able to send characters to hyperterminal from the uC and get the expected results, but when I try to send characters to the display, I get lots of garbage.
I have also tried to send characters and receive keypresses with uProject and the display and everything seems to work correctly.
BTW, before I connected the common GND I wasn't able to send anything to the display from the uC board.
Any and all help will be appreciated!
Thanks,
Zach
I have a 5V power supply hooked up to the power/data connector (Connector #5 on page 9 of manual) to power the display. I also have an RS232 connection running from the display to an RS232 DB9 connector on the uC board. See connection below:
Display uC
-------- --------
pin2 (Rx) <--------- pin3 (Tx)
pin3 (Tx) ---------> pin2 (Rx)
pin5 (GND) --------- pin5 (GND)
I didn't follow the +5V requirement that was shown above because I am not going to power the device through the DB9 connector. (could this be the problem?)
I also have a separate power supply powering the uC.
I am able to send characters to hyperterminal from the uC and get the expected results, but when I try to send characters to the display, I get lots of garbage.
I have also tried to send characters and receive keypresses with uProject and the display and everything seems to work correctly.
BTW, before I connected the common GND I wasn't able to send anything to the display from the uC board.
Any and all help will be appreciated!

Thanks,
Zach
-
- LCD?
- Posts: 3
- Joined: Wed Mar 14, 2007 9:53 pm
For some reason I was having trouble setting the Baudrate in uProject. On the "Main" tab I used the drop down menu to choose 9600 and clicked the set button. I assumed that this would set the baudrate to 9600. For some reason that didn't work and I had to manually send "Raw Data" to set the correct baudrate.
I also have another question. What are the voltage thresholds for the TTL communication? I know that it is 0-5V, but my uC uses 0-3.3V. Could I still use my gpio pins on my uC to communicate in TTL mode?
Thanks,
Zach
I also have another question. What are the voltage thresholds for the TTL communication? I know that it is 0-5V, but my uC uses 0-3.3V. Could I still use my gpio pins on my uC to communicate in TTL mode?
Thanks,
Zach
Hello Zach,
Glad to hear that you've figured the baud rate thing out.
As for TTL communications, with the configuration we have with the uC on the VK202-25 (and all of the other modules, since they are configured the same), the input voltage high needs to be a minimum 0.4Vcc. This translates to 4.0V, unfortunately higher than the 3.3V from your micro.
Best Regards,
Glad to hear that you've figured the baud rate thing out.
As for TTL communications, with the configuration we have with the uC on the VK202-25 (and all of the other modules, since they are configured the same), the input voltage high needs to be a minimum 0.4Vcc. This translates to 4.0V, unfortunately higher than the 3.3V from your micro.
Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
-
- LCD?
- Posts: 3
- Joined: Wed Mar 14, 2007 9:53 pm