Shop OBEX P1 Docs P2 Docs Learn Events
Need Help programming a LK202-25 LCD (Display) — Parallax Forums

Need Help programming a LK202-25 LCD (Display)

Leon20Leon20 Posts: 8
edited 2005-04-28 17:58 in BASIC Stamp
Hi all

My project is due in two weeks and I am having difficulties programming my LCD.· I am using the basic stamp as my microcontroller, a precision temperature/humidity sensors, and an (Matrix Orbital) LK202-25 LCD.· My project is to program both the temperature sensor and the LCD to display current room temperature.· I have the temperature sensor programmed and working correctly however, having problems with the LCD programming.· Does anyone have any LCD program examples????· Please help

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-19 14:52
    The commands for programming the LK202-25 are listed in the manual, as well as the connections and settings.· Also see the errata sheet on the following page:

    http://www.parallax.com/detail.asp?product_id=30057



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • dandreaedandreae Posts: 1,375
    edited 2005-04-19 16:50
    Hello,

    Here is a sample code for you to try (attached).

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    www.parallax.com
  • Leon20Leon20 Posts: 8
    edited 2005-04-19 18:56
    Dave

    I'll give this a try, Thanks

    Leon20
  • Leon20Leon20 Posts: 8
    edited 2005-04-25 13:10
    Hey Dave

    I tried that sample LCD Code and having problems modifying the code to read my temperature sensor out signals from the Basic Stamp. Any suggestions??
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-25 14:52
    Leon,
    ·· Once you know the PIN the LCD is connected to, and the BAUD rate you need to talk to it, you can simply substitute the DEBUG statements with the SEROUT command, as formatting is essentially the same, except that SEROUT requires the PIN and BAUD parameters, as well as brackets.· So, if you have:
    DEBUG "TEMP: ", DEC2 tempF, " degrees F"
    

    You could replace it with:
    SEROUT 1, 16468, [noparse][[/noparse]"TEMP: ", DEC2 tempF, " degrees F"]
    

    I hope this helps... BTW, it would help for you to post LCD Model, port pin, baud rate and even your code that you're having trouble with.· Take Care!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Leon20Leon20 Posts: 8
    edited 2005-04-25 15:11
    Help!!!!

    I'm having major programming problems with my project utilizing the basic stamp(Homework board). I have a SHT11 Temperature/humidity sensor connected on Pin 1(data bi-directional), pin 0(clock), Pin 4 (Vss), and Pin 8 (Vdd).· Also connected is a LK 202-25 (2x20) LCD connected Pin 5 (for serial comms).

    My project is to write code that will have the basic stamp Debug the temperature sensors (data) and write that data on to the LCD. I was given example LCD code and having problems modifing it work with in the parameters of this project. Please help!!!!

    Attached is program code for both components.
  • Leon20Leon20 Posts: 8
    edited 2005-04-25 20:41
    Hello All,

    I've got most of my project complete except the last subroutine which I'm hopeing someone out there can assist me.· My LCD is reading on Pin 05 and the temperature sensor is sending data to the·basic stamp on pin 01.·

    How do I intergrate my two programs so that the basic stamp is reading data on pin 1 (from the sensor) and the it will send that current temperature data to pin 5 (LCD RCV)??

    Any suggestions
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-04-25 21:09
    Hi Leon20,

    Have you gotten a regular "Hello World" to work on the LK202-25?
  • Leon20Leon20 Posts: 8
    edited 2005-04-25 23:03
    Hello Tom

    Thanks for your reply. Yes, I'm able to write to the LCD, howewver not the data that is being generated from the temperature sensor.· I Know·the problem lies with in the LCD code.·I'm having difficulties subroutining the two codes.·I'll send you copies of my code maybe you can see where I'm making my misstakes. Thanks
  • Leon20Leon20 Posts: 8
    edited 2005-04-28 14:41
    Hey Tom

    Were you able to find anything wrong in my·code that I sent? Really appreciate any advise.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-28 14:48
    Leon,

    ·· So far, each code attachment is two separate programs.· One for the LCD, and one for the Sensor, but you still haven't added any LCD code to the Sensor code.· You really need to study the LCD Demo code, see how the data is being written to the LCD, and then use that method to write the data normally being sent to the DEBUG screen to the LCD instead.· The formatters and modifiers for DEBUG are all the same.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-04-28 15:28
    Leon,

    As Chris stated, you are not sending any data from the sensor to the LCD, but you are sending it to the debug screen. You must make the necessary calculations for your temperature sensor, then send it using the SEROUT command to send it to the LCD as shown in the LCD sample.
  • Leon20Leon20 Posts: 8
    edited 2005-04-28 17:36
    Thanks guys,

    So·what you guys are saying is place portions of the LCD code into the sensor code.· That is the same Idea I came up with however,the sensor data is leaving out on Pin 1 and the LCD's input pin is Pin 05.· Somewhere in the programming I have to connect this two pin (software) just don't know how.

    Leon20
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-28 17:58
    Leon,

    ·· You don't need to connect pin 1 to pin 5...In fact, you can use any PIN you want to send/receive data from either device.· I really think you should read the, "What's A Microcontroller?" text, a free download from our web site before proceeding any further on this.· You really need to understand basics before attempting to modify code.· Here is a link to the page with the PDF file for you to read.

    http://www.parallax.com/detail.asp?product_id=28123

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.