Page 1 of 2

i need some major help with LK162-12!!!

Posted: Wed Jun 08, 2005 11:06 pm
by undercovergekko
Hello out there.

i'm trying to run my newly aquired LK162-12 LCD display off of a basic stamp 2. I can't, for the life of me, figure out how to do this. i'm currently using SEROUT commands, and the stamp is sending it all fine and dandy, but nothing appears whatsoever, no matter what i program the thing to do, the LCD does nothing, zilch, natta... etc. i've heard of some sort of ftp site showing example of how to program "wpi.wpi.edu" <---- but again, like the LCD, does nothing... the LCD does work though. i've tested it out on the Matrix orbital demo display test program. I've also changed jumpers 1-4, like the manual said, so 2 & 3 are closed, and 1 & 4 are open. i'm stumped, i don't have a clue what to do. and i have a week and some odd days to figure it out. I plan to display variable distance from a devantech ultrasonic range-finder, so the person who looks at the display, will know how far away they are from the display. i'm doing this for a school project kind of thing, for Electronics Common Core.

any help would be muchly appreciated. Thank-you.

Posted: Thu Jun 09, 2005 8:30 am
by Miles
Hello,

Thanks for posting on our forums. Can you tell me if your LK162-12 is configured for TTL communication? What baud rate is your Basic Stamp set up for?

Posted: Thu Jun 09, 2005 9:13 am
by undercovergekko
ya, it is set up for TTL. but how can you tell what the basic stamp is set for? is it :

SEROUT 0, 19200 [$FE, $47] <---- that number? or is it something else? (note: this is how i am trying to program the LCD to work...). Hypothetically though, if i did not have the LCD set up for TTL, how would i do that?

Posted: Thu Jun 09, 2005 9:22 am
by Miles
To send serial communication from the Basic Stamp to the display at 19200 baud you would need to send the following command syntax:

'{$STAMP BS2}

SEROUT 1, 84, [254] 'Command Prefix
SEROUT 1, 84, [88] 'Clear screen command

One more question...What are you using to connect the display to the BS2? Are you communicating via the DB9 or just the 4 pin connector with a breadboard cable?

By default the unit is set to RS232 communication by our factory. To change this setting to TTL mode, please see Section 2.1.6 or page 9 of the manual. If you have any further questions, feel free to post.

Posted: Thu Jun 09, 2005 9:35 am
by undercovergekko
i'm using the 4 pin connector with a breadboard cable. i'm connecting the Rx to pin 0. which would mean i would have to program it as "SEROUT 0..." right? i'm not using the Tx pin.... should i be using that pin if all i'm doing is sending information to the LCD? or do i have to use it in order for everything to work?

Posted: Thu Jun 09, 2005 9:44 am
by Miles
You are correct...using just P0 (SEROUT 0...) will be perfectly fine since you are not asking the LCD for any information. Do you have the LK162-12 set up to communicate via the 4 pin connector? Please see section 2.1.5 on how to accomplish sending data via the 4 pin connector. Just to clarify...you will have to remove the 2 jumpers on the "I" section and place 2 jumpers on the "R" section. I hope this helps. Let me know how you make out!

Posted: Thu Jun 09, 2005 9:53 am
by undercovergekko
ok, i'll try that... but what i've also done is section 2.2.8, where it explains about TTL communications and changing those jumpers... those jumpers need to be changed also right?

Posted: Thu Jun 09, 2005 10:28 am
by Miles
Please see the following link for the manual and sections that I was referring to in my previous posts: http://www.matrixorbital.ca/Manuals/LK1 ... 12_220.pdf

Posted: Thu Jun 09, 2005 10:49 am
by undercovergekko
ok, so here's the scoop, i've done everything that you've suggested. changing the jumpers, the code, making sure it operates in TTL, and yet nothing is working... hmmm... when i change the jumpers like in figure 13 of section 2.1.8, then power up the LCD, i get the usual startup screen, but there is also a shaded in "/|" kind of character to the left of the "M," i would tend to this is is not normal, i've checked for shorts and all that, but everything is fine... i'm confused... it still is not working...

Posted: Thu Jun 09, 2005 11:01 am
by Miles
Can you connect P0 => Tx and P1 => Rx and set up your code accordingly:


'{$STAMP BS2}
SEROUT 1, 32, ["HELLO WORLD"]

In this example, HELLO WORLD will be displayed.

SEROUT : is the command to send serial information out
1 : is P1 on the development board
32 : is the speed at which the information is sent at, in our case 19200bps.

Posted: Thu Jun 09, 2005 11:34 am
by undercovergekko
i connected what you said. and ran the program exactly what you wrote. but it still does nothing. again, about the triangle character beside the "M", what is this? again, no program works when the Rx is connected to the SEROUT defined pin....

Posted: Thu Jun 09, 2005 11:56 am
by undercovergekko
ok, so i've tried this: connected the Tx pin to Pin 1, where the SEROUT code is outputting. i get "hello world" with a whole lot of triangle characters being generated... what's this about hmmm...??

Posted: Thu Jun 09, 2005 2:58 pm
by Miles
Can you try setting up the display to communicate at 9600 baud instead. You may have to put it back in RS232 mode to change back if you are having troubles sending commands using the BS2.

Posted: Thu Jun 09, 2005 3:23 pm
by undercovergekko
Eureka!! it works now, just had to space out some bugs here and there... but it works. I programmed it to 19.2 k baud, had SEROUT 2, 32, [.....]... i connected Tx pin to pin 2, it works, now i'm happy. thanks for your help though. it was helpful. later this week i'll explain the final project and hopefully get some pictures on here.

Posted: Thu Jun 09, 2005 3:37 pm
by Miles
Good to hear!! I'm glad to hear that you got everything working! I look forward to seeing your final project!! :D