Shop OBEX P1 Docs P2 Docs Learn Events
Serial LCD to display pulserate — Parallax Forums

Serial LCD to display pulserate

James AndersonJames Anderson Posts: 52
edited 2006-07-13 15:11 in Robotics
I want my 2x16 parallax serial lcd to display pulserate from the pulsin command (for debugging purposes ) but its not working...here is my program

pulse VAR Word
lcd PIN 14
lcdbaud CON 32
DO
PULSIN 15 , 1 , pulse
PAUSE 500
SEROUT lcd , lcdbaud , [noparse][[/noparse]pulse]
LOOP

any suggestions?
thanx in advance

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There once was a lady named Bright
who traveled much faster than light
She departed one day in a relative way
and Returned on the Previous Night

Cheers,
Wannabe Ub3r Geek

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-13 03:27
    wannabe -

    What baud rate were you planning to use, and which Stamp are you using?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-13 03:43
    You need to use the DEC formatter in front of the variable, otherwise it just sends the binary value, and not the number you're trying to display.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-07-13 03:49
    pulse VAR Word
    lcd PIN 14
    lcdbaud CON 32···························'(Is this for 19,600 bps?)


    DO
    PULSIN 15, 1, pulse
    PAUSE 500

    pulse = pulse * 2
    SEROUT lcd , lcdbaud , [noparse][[/noparse]DEC pulse, " usec"]
    LOOP


    I put in DEC (decimal equivalent), otherwise the LCD would·interpret the value for pulse as an ASCII character.

    (CS and I must've been working on this at the same time.· I went to the parallax site to check on the serial lcd datasheet.)

    Post Edited (PJ Allen) : 7/13/2006 3:52:38 AM GMT
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-13 15:11
    ok thanx guys
    32 is the constant for 19200 baud...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek
Sign In or Register to comment.