Shop OBEX P1 Docs P2 Docs Learn Events
LCD AppMod Help — Parallax Forums

LCD AppMod Help

jdpetersdocjdpetersdoc Posts: 26
edited 2008-03-31 16:01 in BASIC Stamp
· Ive posted a form already about this before, but im still puzzled. I have an Lcd AppMod, ive downloaded the demo for it and I dont konw what to do, The soure code is huge, I dont know how to write anything for . For example to make a word scroll across the screen, NOT A CLUE!!! Im disapointed, because now I fell like I wasted $25.00 on this thing, but I know I didnt. Im planning on makeing it display if My BOE-Bot has incountered an object, im using the infrared LEDs. When the left IR LED has incountered an obstical it wil display "IR LEFT" etc. I know the souce foe the boe-bot, but not the LCD AppMod. Please contact me as soon as you can!

THANKS·

·Joshua Peters

Comments

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-03-30 23:28
    Joshua Peters

    Is this the Demo Code that you used that is below



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • jdpetersdocjdpetersdoc Posts: 26
    edited 2008-03-31 00:41
    Yes! that it, im bored of looking at move my screen!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-03-31 15:45
    Joshua Peters

    I would ask questions about anyone of these lines that you do not understand
    If i had one to play with i would give it a try my self but I do not have one

    But what i have here.........>>>>>>

    I·would try· what is here·and see if this·will·work just the part·that control the ·scroll part of the program

    ·If this scrolls the message·across the screen then you know that this need

    ·Then·you need to understand· what line··dose what
    Then you will know how to do what you want to do

    Now·I may have left·something out that is need but I·do not see it right now and if so then may be some one on the Forum may be able you more
    ·
    You will need all of the I/O Definitions,Constants and Variables


    '
    [noparse][[/noparse] I/O Definitions ]
    '
    [noparse][[/noparse] Constants ]
    '
    [noparse][[/noparse] Variables ]


    '
    [noparse][[/noparse] EEPROM Data ]

    Msg1 DATA "PARALLAX", 0
    Msg2 DATA " BASIC STAMP ", 3, " ", 0
    Msg3 DATA "Type =", 0
    Msg4 DATA "Buttons:", 0
    ·

    ·'
    [noparse][[/noparse] Program Code ]
    ' Scroll a message across LCD line
    ' -- set starting position in 'crsrPos'
    ' -- point to 0-terminated string (first location in 'addr')
    ' -- strings should be padded with eight spaces on each end

    Main:
    char = LcdCls········································ ' clear the LCD
    GOSUB LCD_Command
    PAUSE 500
    Write_Parallax:
    addr = Msg1·········································· ' point to message
    GOSUB LCD_Put_String································· ' write it
    Scroll_Message:
    crsrPos = LcdLine2··································· ' scroll on line 2
    addr = Msg2·········································· ' point to msg
    GOSUB LCD_Scroll_String······························ ' scroll it
    '________________________________________________________________

    ' Write character to current cursor position
    ' -- but byte to write in 'char'
    LCD_Write_Char: ' write character to LCD
    #IF _LcdReady #THEN
    LCDOUT E, 0, [noparse][[/noparse]char]
    #ELSE
    LcdBusOut = char.HIGHNIB························· ' output high nibble
    PULSOUT E, 3····································· ' strobe the Enable line
    LcdBusOut = char.LOWNIB·························· ' output low nibble
    PULSOUT E, 3
    HIGH RS·········································· ' return to character mode
    #ENDIF
    RETURN

    ·'______________________________________________________________

    Show_Stamp_Type:
    char = LcdCls········································ ' clear the LCD
    GOSUB LCD_Command
    PAUSE 100
    addr = Msg3·········································· ' display "Type ="
    GOSUB LCD_Put_String
    char = LcdLine2 + 3·································· ' move cursor to 2nd line
    GOSUB LCD_Command
    #SELECT $STAMP······································· ' check type at compile
    #CASE BS2
    addr = StampId0
    #CASE BS2E
    addr = StampId1
    #CASE BS2SX
    addr = StampId2
    #CASE BS2P
    addr = StampId3
    #CASE BS2PE
    addr = StampId4
    #ENDSELECT

    '
    [noparse][[/noparse] Subroutines ]
    ' Writes stored (in DATA statement) zero-terminated string to LCD
    ' -- position LCD cursor
    ' -- point to 0-terminated string (first location in 'addr')
    LCD_Put_String:
    DO
    READ addr, char
    IF (char = 0) THEN EXIT
    GOSUB LCD_Write_Char
    addr = addr + 1
    LOOP
    RETURN

    '_______________________________________________________________

    LCD_Scroll_String:
    DO
    char = crsrPos···································· ' move to start of window
    GOSUB LCD_Command
    FOR idx = 0 TO 7·································· ' write chars in window
    READ (addr + idx), char
    IF (char = 0) THEN EXIT··························· ' stop if end of string
    GOSUB LCD_Write_Char
    NEXT
    IF (char = 0) THEN EXIT
    addr = addr + 1 ' scroll
    PAUSE LcdScrollTm
    LOOP
    RETURN

    '________________________________________________________________

    ' Send command to LCD
    ' -- put command byte in 'char'
    LCD_Command:······································ ' write command to LCD
    #IF _LcdReady #THEN
    LCDCMD E, char
    RETURN
    #ELSE
    LOW RS
    GOTO LCD_Write_Char
    #ENDIF

    '_______________________________________________________________

    ' Reads byte from LCD
    ' -- put byte address in 'addr'
    ' -- returns byte read in 'char'
    LCD_Read_Char:·································· ' read character from LCD
    #IF _LcdReady #THEN
    LCDIN E, addr, [noparse][[/noparse]char]
    #ELSE
    char = addr ' move cursor
    GOSUB LCD_Command
    HIGH RS········································· ' data command
    HIGH RW········································· ' read
    LcdDirs = %0000································· ' make LCD bus inputs
    HIGH E
    char.HIGHNIB = LcdBusIn························· ' get high nibble
    LOW E
    HIGH E
    char.LOWNIB = LcdBusIn·························· ' get low nibble
    LOW E
    LcdDirs = %1111································· ' return data lines to outputs
    LOW RW
    #ENDIF
    RETURN






    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 3/31/2008 4:07:28 PM GMT
  • jdpetersdocjdpetersdoc Posts: 26
    edited 2008-03-31 16:01
    Ok OK thanks!
Sign In or Register to comment.