Shop OBEX P1 Docs P2 Docs Learn Events
Rctime + parallel lcd — Parallax Forums

Rctime + parallel lcd

linocklinock Posts: 31
edited 2006-01-31 00:50 in BASIC Stamp
Hello

- I have a BS 2 SX connected to a parallel LCD used in 4 bits mode.
- I hooked a 0.1 µf capacitor with a resistor as shown on many places and added a adjustable resistor to simulate a resistor variations, it works fine with RCTIME.
- Informations sent by RCTIME are associated with result VAR Word.
- I added in the code DEBUG HOME, DEC result.

Everything is displayed as it should be in the debug window.

Now i would like to transmit the content of DEC result to the LCD.
The difficult is that i can't figure how to transmit the value contained in DEC result which is defined as Word and the LCD expects something like char.HIGHNib and char.LOWNib.

I walked through a lot of examples but all seems to work with serial LCD and the Mill example is a nice one but it's too complex for the little thing i'm trying to do. Read from one input and display the result to the LCD shakehead.gif

Any idea is welcome, thank you.

Post Edited (linock) : 1/31/2006 12:33:20 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-30 23:46
    Hello,

    ·· Have a look in the Help File at the DIG operator.· This could help you since it allows you to grab each digit of the Word variable and send its value to another variable which you can send to the display.· Do this for each digit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 23:52
    I posted a bit of code that does what you want (as Chris suggested, using the DIG operator) in this thread:

    http://forums.parallax.com/showthread.php?p=568691

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • linocklinock Posts: 31
    edited 2006-01-31 00:07
    Thank you very much for a so fast and efficient reply [noparse]:)[/noparse]
    I hope it will work, i hate to be a newbie [noparse]:([/noparse]


    Edit:

    It works great smile.gif
    You are champions

    Post Edited (linock) : 1/31/2006 12:32:43 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-31 00:50
    Excellent - just keep at it, and you won't be a newbie for long.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.