Shop OBEX P1 Docs P2 Docs Learn Events
Stamp Works Source files zip — Parallax Forums

Stamp Works Source files zip

Is the source code zip file still available for the Stamp Works txt?? I need SW21-EX11-LCD_Demo.BSP and so far I haven't found that code in the Stamp Works book. Thanks.

Joe

Comments

  • Thanks, I think the issue might be the values in the
    ' -----[ Constants ]-------------------------------------------------------
    
    LcdCls          CON     $01                     ' clear the LCD
    LcdHome         CON     $02                     ' move cursor home
    LcdCrsrL        CON     $10                     ' move cursor left
    LcdCrsrR        CON     $14                     ' move cursor right
    LcdDispL        CON     $18                     ' shift chars left
    LcdDispR        CON     $1C                     ' shift chars right
    
    LcdDDRam        CON     $80                     ' Display Data RAM control
    LcdCGRam        CON     $40                     ' Character Generator RAM
    LcdLine1        CON     $00                     ' DDRAM address of line 1
    LcdLine2        CON     $40                     ' DDRAM address of line 2
    
    section... I tried looking at the datasheet but getting REALLY confused as to the values i need to change. http://topwaydisplay.com/Pub/Manual/LMB162ABC-Manual-Rev0.2.pdf here is the datasheet for my lcd. If I am reading it right, n i doubt I am, LcdCls needs to be $20 n LcdHome $00, but providing thats right, I am blank on the rest other then LcdLine1 being $00 n LcdLine2 being $40?? I am not sure how to decode the address information...

    Joe
  • JonnyMacJonnyMac Posts: 8,918
    edited 2016-12-28 03:16
    Sorry -- my fault. As you've determined by now, the correct value is $C0.

    In other programs I added the values you see above to LcdDDRam which would give you $80 for LcdLine1, and $C0 for LcdLine2.

  • Actually I am not sure I figured any of the values out other then maybe lines 1 & 2. $C0 i didnt even come across that value at all when i tried to guess at what i was doing.

    Joe
  • JonnyMacJonnyMac Posts: 8,918
    edited 2016-12-29 22:04
    I mostly use the Propeller now, and here are the constants from my LCD object that will work with 1-, 2-, or 4-line LCDs.
    con
      
      CLS     = $01                                                 ' clear the LCD 
      CRSR_HM = $02                                                 ' move cursor home
      CRSR_LF = $10                                                 ' move cursor left 
      CRSR_RT = $14                                                 ' move cursor right 
                                                                      
      CGRAM   = $40                                                 ' character ram
      DDRAM   = $80                                                 ' display ram
                                                                     
      LINE0   = DDRAM | $00                                         ' cursor positions for col 0
      LINE1   = DDRAM | $40                                          
      LINE2   = DDRAM | $14                                          
      LINE3   = DDRAM | $54                                          
                                                                     
      #0, CRSR_NONE, CRSR_ULINE, CRSR_BLINK, CRSR_UBLNK             ' cursor types
    
    You'll also note that I refer to lines 0 to 3, instead of 1 to 4. This makes the numbering consistent with column numbering (which is also zero-indexed).
  • Ok I will try those values n see what happens. Thanks.

    Joe
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    As a note the latest StampWorks code can be downloaded from here: https://www.parallax.com/downloads/stampworks-basic-stamp-source-code
Sign In or Register to comment.