Page 1 of 1

Stamps and Matrix Orbital LK Series

Posted: Thu Jun 21, 2007 9:01 am
by Mark@Tec
Henry

I was using the I2C protocol with an LK series LCD display that I have with much success. Now, I am tring to use SEROUT to the display so that I can use the display on a stamp stack which is basically a bs2. I am trying to do 2 things:

1. I teach electronics at a technical vocational school and I wanted to get other displays so that the grade 9's can play with them. I get the grade 9's to do simple assignments such as flash an LED, communicate between stamps (SEROUT and SERIN using DEBUG for visual) and other simple things. I want them to be able to send simple messages to LCD displays. For this application I am using the Board of Educaton and the BS2.

2. I started to look at LCD displays so that one of my classes can design and build a stamp driven security system. I also want to build a weather station using a stamp (or stamps) and an LCD display.

The I2C protocol sends the address of the display first.
Example: I2COUT 0, $50,[254, 88] 'Clear Display
Where: $50 is the address set for the display by the jumpers

I can understand why you need to use the following code
SEROUT 1, 84, [254] 'Command Prefix
SEROUT 1, 84, [88] 'Clear screen command
Is this assuming you have connected to the DB9 rather than I2C on the LK series displays? How do you send the display address?

If I am using the4 DB9 connector for RS232, does the display care about address?

With I2C communications, it looks like it is easy to connect and access up to 127 displays. Can the DB9/RS232 work the same way?

Will the SEROUT command work with I2C communications? It is an rs232, is it not?

Have you got any examples of the connections between the stamp and LK204-25 when using SEROUT?

:wall:

I better stop lest I bombard you with too many questions. I really appreciate the help in advance.

Thank you

Posted: Thu Jun 21, 2007 9:25 am
by Raquel
Hello Mark,

Sorry I was not helpful at all in your other post. But here is another link you might want to check out for using RS232 with Basic Stamp.

I2C and RS232 are both serial but different protocols. When you communicate in I2C, you need to address the display, just like how you mentioned. But with RS232, there is no need to address the display. Every data that goes out the serial port and into the display either gets displayed, or acted upon (if the data is a command).

Thanks,

Posted: Thu Jun 21, 2007 2:09 pm
by Mark@Tec
My last message got lost (I think).

What I know so far & please DO correct me if I'm wrong:

The LK204-25 is set up to do I2C and RS232 communications. I2C communications is supported only through the four pin connector on the back of the display (looks like a four pin power connector to what we knew as the floppy drive cable on a PC).

If using I2C communications, I2CIN and I2COUT are the commands to use. The voltage levels are TTL.

If using the DB9 connector, then we are assuming RS232 and, therefore, the connections, voltage levels and commands are no going to be the same as for I2C communications.

The problem that I am having is interfacing a BS2 (does not have native I2C support) to either the I2C or DB9 connector. At least, I think that's the problem.

Posted: Fri Jun 22, 2007 11:44 am
by Mark@Tec
Raquel

I finally get it. I don't quite know what I was thinking. I2C communications is strictly TTL. RS232 is anywhere from +/- 3 volts to +/- 15 volts if not higher, which is obviously not TTL.

The BS2p has native I2C communications whereas the BS2 does not. The "Bit Bash" program that I downloaded (Ben Lennard) uses the I2C ports and programming so that the BS2 can communicate with the display.

If one were to want to use the display from TTL via RS232, the interface would have to include an SP232AEN, Enhanced RS232 LIne Driver/Receiver.

The end result is that Ben's program is doing fine on the I2C port using this Bit Bash program. Now I can get things going using the program and editting it to suit an alarm system and other projects that I am trying to put out there. I really appreciate ALL the help.

By the way, you seem to have a wealth of knowledge -- a seemingly huge knowledge bank -- to support your products, especially in these kinds of forums. Meanwhile, I need to dig in to getting some SP232AEN chips.

Thanks for the help.
Mark

Posted: Fri Jun 22, 2007 12:18 pm
by Raquel
Hello Mark,

I am glad that you have figured things out.
Posts like this help other people as well specially of course those sample codes from other people, eg. Ben Lennard.
Thanks for keeping us informed of what you have found.

Best Regards,

Posted: Mon Jun 25, 2007 9:03 am
by Mark@Tec
Raqeul

Since you know what I am trying to achieve, are there any other displays that you would suggest?

Just recapping, I want to be able to use a display to add for an activity to do with stamps (microcontrollers) for my grade 9 area. I have them flashing on and off leds, making up simple tunes (FREQOUT), doing some simple communications between two systems and a stamp (serial port of the computer), controlling the motion of the modified servos on a boebot, and finally looking at "How a robot 'sees'". The only other activity I would like to do with them is to send messages to a display (visual).

Also, I am looking for a display to develop a weather station that will be microcontroller (stamp) based.

Any sugestions would be appreciated. Thanks in advance.

Mark

Posted: Mon Jun 25, 2007 10:21 am
by Raquel
Hello Mark,

For the weather station, I would suggest a VFD display, (extended temperature, extended voltage). If there is no need for keypad input, you can go for the VFD2041 (4 rows x 20 characters).

For the activities in the class, the LK202-25 you have is good. Its got GPOs, keypad input, RS232/TTL/I2C communications.

Thanks,