Industrial LCD RS232 connection - Page 1
Forum section: electronics / projects

author: Stonent
author_rank: Super Contributor
timestamp: May 25, 2014, 10:05:10 pm
content: I picked up a 2x16 panel mount LCD from Tanner Electronics that was marked as "UNKNOWN LCD". It is about twice as wide as a standard 2x16 LCD.It has 8 screw terminals on it, so my first thought was some kind of industrial LCD.The screw terminals are marked +,-,-,RX,-,TX,+,-There is a Sipex SP232ECT chip next to the terminals so I had a pretty good feeling this used RS-232One sticker says "58688-400 05B and 0402 on the bottom" Googling that gets me to a site that sells PLC related hardware and indicates this LCD was made by Rapistan/Dematic. They were out of stock and last sold for about $44 (I paid $6 so I did well)There is a bar code on the top that says "1FSM6377304/16/02"Since both stickers have an 04 and 02 and all chips are late 2001, early 2002, I'm assuming that is an April 16, 2002 Mfg date.Searching on the 1FSM63773 gets me to a German site that is selling these for about 7 Euro.http://www.pollin.de/shop/dt/NTc2OTc4OTk-/Bauelemente_Bauteile/Aktive_Bauelemente/Displays/LC_Display_RAPISTAN_1FSM563773.htmlAnd also a thread on another forum in Germanhttp://www.mikrocontroller.net/topic/148447It looks like he got it working somehow at 19200, but then it appears they were talking about removing the 8051 and using an AVR, but since the google translation missed a few things, I can't tell.All the + and all the - connections are tied together and feed into a 7805 regulator.When I connect a 9V battery, the top row goes black for a half second or so and then a "_" in the first position. Each character has a 1x5 cursor row underneath. The characters appear to all be 5x8.I wasn't sure if the RX and TX labels were indicating what to connect them to, or what they were, so when I wire them to my laptop's serial port RX to RX and TX to TX, no matter what baud rate I choose, I get what I type echoed back to my terminal.If I connect RX to TX and TX to RX, I get nothing at any baud rate.Nothing I type on the various baud rates and connections changes the LCD, it just stays there with a "_" at the first position.Additional parts are:OKI M5839C 40 dot LCD driverHitachi HD44780Philips P87C51 SBBB OTP 8051 (PQFP-44)8 way DIP switchI've spent a few hours tracing pins and here's what I have:The top half of the DIP switches are all tied to ground.The bottom pins 1 through 8 are tied to pins 18 through 25 on the MCU.1 - 18 P2.0/A82 - 19 P2.1/A93 - 20 P2.2/A104 - 21 P2.3/A115 - 22 P2.4/A126 - 23 P2.5/A137 - 24 P2.6/A148 - 25 P2.7/A15There are 10K pull ups on MCU pins 18 through 25 going to +5V. Flipping the corresponding dip switch pulls them to GND.V1 through V5 on the Hitachi chip tap off of a string of 1 or 2 ohm resistors wired in series with the starting end going to ground.When I flip the dip switches (while everything off), the resistance to ground increases on each V1 through V5 pin. So I suspect in that case, since those DIP switches are grounded on one side and 10k pullups on the other that the DIP switches may in part be some kind of contrast adjustment via some sort of resistor divider network, however changing them does not appear to change the contrast that I can see.V1 through V5 are listed as "Power Supply for LCD Drive VCC –V5 = 11 V (max)" I'm not sure what the MCU pins have to do with it though.So I'm not really sure if I'll be able to get it to work now or not since I think I'm talking to the MCU over RS232 and it may be waiting for some kind of information over serial before it works.

author: Paul Price
author_rank: Super Contributor
timestamp: May 25, 2014, 10:49:53 pm
content: You may have paid $6 too much for this display. However if Pollin has shown in its advert that they can display with it, contact them to get info on the display. This is the best way to get this thing to work, get the data they have about it from them, ask them how they got this display to display or else all is lost The Pollin download only has datasheets for three IC's and nada for the MCU interface. Think Translate.Google.comIt doesn't cost that much to get a 16x2 working display new from Farnell or some other electronics part house, so how many gray hears will you grow before you get this thing to work? I usually encourage people to hack and learn something in the process, but there is even a limit to my encouragement.Your only other option might be to divest the display of the 87C51 and directly send commands and data to the LCD driver chip pins of the Hitachi HD44780. That will work but a lot of trouble for 16x2 lines.There are so many possible possibilities here to get the display MCU to recognize any command, too many for you in your short lifetime to guess. It could be that 5 or 7 positions of the dip-switch set the address of the display, maybe the other three set baudrate or?But then what does that help if you don't know the format of the expected serial bit stream to the MCU or the command syntax or order of commands and data etc.

author: Stonent
author_rank: Super Contributor
timestamp: May 25, 2014, 11:10:38 pm
content: Quote from: Paul Price on May 25, 2014, 10:49:53 pmThe zip file on their site has a datasheet for the LCD controller chips and the RS232 chip, no other information unfortunately.Apparently this was made with both Hitachi and JRC LCD chips, but they appear to be pin compatible with each other.

author: mariush
author_rank: Super Contributor
timestamp: May 25, 2014, 11:16:01 pm
content: It's really not worth your time, unless you really want to do some reverse engineering. You can get LCD displays for 2-3$ on eBay, or from Digikey for under 10$ each.Sipex sp232e is a line driver, it converts that serial data at normal higher voltages to the 0-5v TTL signals for microcontrollers. Here's the datasheet:http://www.farnell.com/datasheets/70951.pdfSpecs say it can tolerate +/-15v from outside, it sends +/-6v to outside, it works with 0 (digital 0) or at least 3.5v (digital 1) with microcontroller attached to it.So this chip simply converts this rs232 from the connector to something the microcontroller can tolerate.Next you have there on the board that OKI M5839C .. that's a 40 segment led driver:http://savedonthe.net/download/554/IC-ON-LINE.CN_msm5839c_308497.htmlIf you check the datasheet, this chip is basically 2 shift registers, each 20 bit. So you have one input pin + clock pin for the first 20bit shift register, one input pin + one clock pin for 2nd 20bit shift register and a pin that when it goes high, makes the shift registers latch and the 40 bits are sent to the driver. So if you want, you can solder 5 wires to those pins (there are probably traces on the pcb going to the MCU) to your own microcontroller and you're done.I'm not sure why it's used, maybe they have more pixels than the hd44780 can drive directly? No clue.As for hd44780 you can easily find datasheet online, you could tap into those pins and do what the microcontroller does.But it would take so much time it's just easier to buy another module.

author: Stonent
author_rank: Super Contributor
timestamp: May 25, 2014, 11:32:02 pm
content: Well another thing is when I bought it, I thought it was 2x24 or 2x32, but after powering it on it was just a really big 2x16 display.

author: Paul Price
author_rank: Super Contributor
timestamp: May 25, 2014, 11:33:42 pm
content: LUMEX - LCM-S01602DSR/D - DISPLAY, DOT MATRIX, LCD, 16 X 2about $35 US from Farnell.com, but many more much different variations of this theme and cheaper on ebay.

author: AlfBaz
author_rank: Super Contributor
timestamp: May 25, 2014, 11:41:57 pm
content: If you are getting PLC hits with your searches, it's most likely using one of the many automation protocols getting around.Around these parts alan bradely PLC's seem to be the norm. They use DF1 which is just a straight connection from one device to another. The specs for this are freely available. They have a multi-drop protocol, which I believe uses the same commands outlines in the DF1 spec but the phy is proprietary.Another likely candidate is Modbus or one of its variants.Seeing you got hits from Germany it could also be profibus, which if memory serves is the preferred protocol for seimens S5/S7 plcs

author: Stonent
author_rank: Super Contributor
timestamp: May 26, 2014, 12:17:15 am
content: Quote from: AlfBaz on May 25, 2014, 11:41:57 pmThat's some good information, thanks! Rapistan (now Dematic) is a US company in Michigan that makes conveyors and other warehouse and inventory related hardware and I remember hearing the name Seimens-Dematic before.