Page 1 of 1

Keyproblem with LK204-25 (solved)

Posted: Tue Apr 07, 2009 4:37 pm
by tmjuk
Hello,
my English is not so good. But I hope we can still my little problem solved.
I have a LK204-25.
I would use the display in "poll mode".
I use it with BasicStamp BS2E.
I use the command "SEROUT DisplayOut, Baud, [254, 79]" at initiate Auto-Transmit-Key-Presses -Off.
Then I want with the command "SEROUT DisplayOut, Baud, [254, 38]" the signs read (Poll Key Press).
Then I read with "SERIN DisplayIn , baud, 100, NO_DATA, [key code]" the characters.
I get the sign but only decimal 255 back. No matter what button I press.
By the way it works with "Auto Transmit Key Presses On" perfect. What am I doing wrong?

Cordial greetings from Sweden


Torsten

Posted: Wed Apr 08, 2009 4:31 pm
by Raquel
Hi Torsten,

Thank you for posting on the forum.

I am not very familiar with Basic Stamp, but what I can say is that you are correct in the commands you send to get the display not to transmit the key press values and only report when you send the command 254 / 38 (poll key press).

If you do not press any key after power up (no outstanding keys in the buffer), you should get a 0x00 when you send the command 254 / 38, instead of 0xFF.

I am thinking there maybe something you are missing as you execute the SEROUT / SERIN commands. You might want to check out Parallax's Basic Stamp forum.

Best Regards,

Posted: Thu Apr 09, 2009 10:36 am
by tmjuk
Thanks for at you answer me.
I try to find a solution in the Parallaxforum.
If I find out something write I that even here.

Thanks

Torsten

Posted: Thu Apr 09, 2009 4:14 pm
by tmjuk
I believe I have a solution.
I took only some lines of code at inclose the problem.
It's the speed between display and Basic Stamp.
If I decrease it to 9600 bit/s works it.:D
Probably should yoy try different speed if that not works.

Best regards from Sweden and thanks for help

Torsten

Posted: Fri Apr 10, 2009 8:19 am
by Clark
Hi Torsten,

Great to hear that you got the problem solved. The baud rate of your display can be changed later on if you'd like to communicate faster, you can check out your manual for more info once you are comfortable with the display.

Happy development, and best wishes from Canada,
~Troy