Serial back pack with 16x2 LCD

Hi all. Would the following backpack be easy to get working with a nano? https://dl.dropboxusercontent.com/u/33809233/6_201.pdf

I'm referring to the software side or things, I'm confident with connections etc but reading the datasheet, I'm getting a little perplexed. I thought it would be as simple as connecting the backpack RX pin to the arduino TX (power & gnd of course) and sending Serial.print strings to the correct COM port but it displays garbage.

thanks :slight_smile:

Well, it doesn't read like it is an I2C controller so the first thing to do would be to find a library that might support it and check that.

I thought it would be as simple as connecting the backpack RX pin to the arduino TX (power & gnd of course) and sending Serial.print strings to the correct COM port but it displays garbage.

It's a chicken/egg sort of thing. Once you get it working it will be essentially as simple as you have described.

I have not yet read through the datasheet you provided but here are a few considerations. As in all traditional serial setups you have to get the baud rate configured and you have to get the Rx and Tx wires configured properly. You also have to determine if they are expecting true RS-232 signals (-12v/+12v) or TTL versions (+5v/0v).

Don

Hi.
Over the pdf:

"PC Operation
The following programme
lines illustrate the equivalent lines to drive the LCD from QBASIC
running on a PC".

So it clearly 5v true rs-232, not ttl.

For speed:
"Baud Rate?
The Driver Board will accept RS-232 signals at either 2400 Baud (jumper missing) or 9600 Baud
(jumper installed)".

1 st issue, if I'm not wrong, arduino board work with serial ttl level. So, you willl need a ttl to serial rs232 converter, to connect this LCD to your arduino.

Correct me if I'm wrong about it.

So it clearly 5v true rs-232, not ttl.

. . .
1 st issue, if I'm not wrong, arduino board work with serial ttl level. So, you willl need a ttl to serial rs232 converter, to connect this LCD to your arduino.

Maybe not. On page 1 it says that it can be driven from a BASIC Stamp which is just another 5v microprocessor with no real RS-232 capabilities.

I am worried a bit about the statement in the Programming section about the need for 'inverted format'. The BASIC Stamp does provide either normal or inverted format. The Arduino (as far as I know) has only one format but I don't know which one.

So - even though the adapter may respond to TTL levels you may want to use a converter after all to get the inversion. A simpler option would be a simple transistor inverter since your communication is only one way.

Don

@dtokez

Have you run the Self-Test mentioned on page 2? That will confirm that you have got your LCD connected to the backpack correctly.

The contrast potentiometer should have some effect and you should be able to turn your backlight on (if you have one) by means of a jumper

Don

Hi.

floresta:
Maybe not. On page 1 it says that it can be driven from a BASIC Stamp which is just another 5v microprocessor with no real RS-232 capabilities.

Still point to a rs232, and not ttl level:

http://forums.parallax.com/showthread.php/98266-Another-very-simple-question-Where-to-connect-RS232-TTL-converter-to-board-of

He ask for a 232 converter to ttl, if the Basis stamp from parallax was ttl level, no need for a converter.

http://www.basicmicro.co.uk/Product/Parallax%20Stock%20BS2%20NEW/Parallax-BS2-IC,-BASIC-STAMP-24-Pin,-Microcontroller-Electronics-Project-Atom

"Key Specifications:

Power Requirements: 5.5 to 15 VDC (Vin), or 5 VDC (Vdd)
RS232 Serial (9600 baud for programming)
Dimensions: 1.20 x 0.63 x 0.15 in (30.0 x 16.0 x 3.81 mm)
Operating Temperature: -40 to +185 °F (-40 to +85 °C) "

At the end, a nice pic of a direct connection to a pc (db9 serial).

So as you say:

So - even though the adapter may respond to TTL levels you may want to use a converter after all to get the inversion. A simpler option would be a simple transistor inverter since your communication is only one way.

Don

As you, I'm confused by the info on pdf, serial connection, and inversion, as I never get this kind of hardware on my hands.

Hello all.

The self test does work, it displays every time the arduino starts up so I guess the TX pin on the nano is held high for a while.

I'm confused with it at the moment. The pdf I linked to came packaged with a program that appears to be a test of some sort in which you connect it to a serial port on the PC so maybe it is geared for RS232 only?

https://dl.dropboxusercontent.com/u/33809233/6_201.zip

6_201.zip (549 KB)

@arssant

Here it is from the horses mouth so to speak: SEROUT

"All BASIC Stamp models (including the BS1) can also transmit RS-232 data through any of their I/O pins (Tpin = 0 - 7 for BS1, Tpin = 0 - 15 on all other BASIC Stamp models). [u]The I/O pins only provide a 0 to +5 volt swing (outside of RS-232 specs)[/u] and may need to be connected through a line driver for proper operation with all serial ports. Most serial ports are able to recognize a 0 to +5 volt swing, however."

Don

dtokez:
. . .

I'm confused with it at the moment. The pdf I linked to came packaged with a program that appears to be a test of some sort in which you connect it to a serial port on the PC so maybe it is geared for RS232 only?
. . .

Even though it is geared to RS232 voltage levels it still may respond appropriately to TTL levels. In other words it may interpret negative voltages and very low positive voltages as a logic '1' and positive voltages above 3 volts or so as logic '0'. This is essentially what Parallax was saying in the quote in reply #8.

Since it allegedly works with the BASIC Stamp levels it should work with the Arduino levels if you get your Arduino baud rate set to match your adapter. If it doesn't work then the next step would be to invert the signal.

Don

Hi.

I got the info floresta.

So, in order to test the lcd, he need something like that:

void setup(){
  Serial.begin(9600); // must match the value on the lcd board controller
}

void loop(){
  Serial.write("Hello");
  delay (300);
  Serial.write(254); // will clear screen
  Serial.write(1);  // as describe on the pdf


}

So, in order to test the lcd, he need something like that:...

There is no need to 'refresh' the LCD. Once you display something on the screen it stays there until it is overwritten or until the power is removed. I would display the message in setup and leave loop blank (nothing between the braces).

Basically you shouldn't 'test' an LCD with a sketch that has anything in loop. I don't have a high opinion of many of the sample programs for the Arduino and the one in the LiquidCrystal tutorial is a prime example.

Don

OK, let's get this straight.

This is a serial backpack. It uses either of two baudrates, with a jumper to select.

It does not contain a true RS-232 to TTL level converter. It is CMOS logic (I suspect it is in fact, a PIC chip of some sort but cannot get sufficient magnification of the dinky picture of the board to tell properly.

What it does do, is to contain input protection such as is often discussed here, to enable it to work from RS-232 levels by "clipping" them after an input resistor, to 0 and 5V. Whether it actually uses diodes to do this, or merely the input protection diodes on the chip, again I cannot tell without a proper picture of the board. Perhaps the OP can take and illustrate here such a picture - that would help immensely.

Since it expects an RS-232 interface, it requires inverted signal states - "mark" is negative (ground) and "space" positive (5V or thereabouts). Since the Arduino cannot innately invert its serial protocol, you need to invert the data using a standard inverter - one gate of a 74HC14 (or practically anything else) or I suppose (and less preferable), a transistor configured as a logic inverter.

(Actually, I would suggest a 47k and 4k7 resistor.)

arssant:
Hi.

I got the info floresta.

So, in order to test the lcd, he need something like that:

void setup(){

Serial.begin(9600); // must match the value on the lcd board controller
}

void loop(){
 Serial.write("Hello");
 delay (300);
 Serial.write(254); // will clear screen
 Serial.write(1);  // as describe on the pdf

}

Just tried the above, no luck. Tried also as suggested by Don with the bits moved to setup and a empty loop.

here is a photo of the board, and a link to a short video of how it looks with the quoted code running

It looks like it's time for you to add an inverter.

Don

Hi.

It's look like your not alone in the dark with this device:

Yesterday I found this:

http://forum.arduino.cc/index.php/topic,180919.0.html

I's on the French section ( my native language ). As I could reed, the guy give up of the interface board and used the lcd as a parallel one.
So far, over the topic, some one point to here:
http://playground.arduino.cc/Code/LCD

"Parallax™ Serial LCD's - Library for controlling Parallax™ 3-wire serial LCD's
Parallax™ Serial LCD's (Arduino 1.0) - Library for controlling Parallax™ 3-wire serial LCD's "

Can´t say more about it.
And Paul_B was on the right way:

Paul__B:
"It does not contain a true RS-232 to TTL level converter. It is CMOS logic (I suspect it is in fact, a PIC chip of some sort

And Paul_B was on the right way:

"It does not contain a true RS-232 to TTL level converter. It is CMOS logic (I suspect it is in fact, a PIC chip of some sort

What about these:

Reply #2 -- "You also have to determine if they are expecting true RS-232 signals (-12v/+12v) or TTL versions (+5v/0v)."

Reply #4 -- "On page 1 it says that it can be driven from a BASIC Stamp which is just another 5v microprocessor with no real RS-232 capabilities."

Reply #8 -- "The I/O pins only provide a 0 to +5 volt swing (outside of RS-232 specs)"

Reply #9 -- "Even though it is geared to RS232 voltage levels it still may respond appropriately to TTL levels. In other words it may interpret negative voltages and very low positive voltages as a logic '1' and positive voltages above 3 volts or so as logic '0'."

Don