Shop OBEX P1 Docs P2 Docs Learn Events
stamp BSX avec Matrix orbital LK 204-25-wb-c74 — Parallax Forums

stamp BSX avec Matrix orbital LK 204-25-wb-c74

edited 2009-11-22 19:43 in BASIC Stamp
Hello
i am french, sorry for my bad english, i have need information for connect the matrix orbital LK 204-25-WB whis keyboard in serial whis BASIC STAMP BSX or BS2
Thank you verry mutch
"Merci beaucoup"
Denis France
confused.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-22 16:19
    Have you read the documentation for the display? (www.matrixorbital.ca/manuals/LK_series/LK204-25/LK204-25.pdf).

    Obviously, you must have a source of power and ground for the display. Page 10 of the documentation shows where to connect power and ground.

    You can connect the Tx and Rx signals to the Stamp using either the connections on page 10 or the DB-9 connector shown on page 9. The BASIC Stamp Syntax and Reference Manual (www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf) shows how to connect a DB-9 connector to Stamp I/O pins (pages 395 and 417).

    There's nothing special about using the keyboard with the LK204-25. The documentation explains how the keyboard works and describes the commands to the LK204-25 to change how the keyboard and LK204-25 behaves.

    I believe the default is for the LK204-25 to send the code for each keypress to the Stamp.
  • edited 2009-11-22 17:41
    Thank you, for your help, i find a exemple serial demo programme, i have testing·the ic2 programme·but this programme·no running with the stamp·bsx only whith stamp bs2 ???, for my it is beter using the programme by serial y have·a little experience whith serial command, the ic2 is more complex, my objectif is use the bsx + lk 204 whith keyboard

    Denis
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-22 18:05
    It is possible to program the BS2 or BS2sx Stamp to do I2C using subroutines. Nuts and Volts Column #85 shows how to do this:
    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv85.pdf

    The BS2 and BS2sx operate at different speeds and some statements (like SERIN and SEROUT) use numbers to specify timing (like Baud) that are different from one Stamp model to another. The Stamp Manual and the Stamp Editor's help files give the different values needed for the different Stamp models. Look at the sections on the SERIN and SEROUT statements.
  • edited 2009-11-22 18:47
    thank you for your help·Mike, i have a job now for begin my new project, if you find a demo programme for my, please send my leater, i have find lot off demo programme for the serial lcd but not for the matrix orbital.

    Denis
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-22 19:07
    The Matrix Orbital display is really just a serial LCD with its own set of control codes. Connect it up to a Stamp and start experimenting with the control codes in the documentation. With a BS2sx, a typical output statement for I/O pin <pin> would look like:

    SEROUT <pin>,16504,[noparse][[/noparse]"Hello there",CR]

    The "16504" specifies 19,200 Baud and inverted mode which is used with the connections shown on page 417 of the Stamp Manual.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2009-11-22 19:30
    The Matrix Orbital LK204-25 can be used with RS232 serial, IC2 or TTL communications (depending on·the soldered jumper settings). Page 11 of manual (see below).
    To use the DB-9 connector (RS232) you need to use a line driver chip such as·a Maxim Max233a or Max232 to handle the 12v vs 5v serial signal.
    From page 17 of the manual:· http://www.matrixorbital.ca/manuals/LK_series/LK204-25/LK204-25.pdf

    The display module communicates at standard voltage levels of ±12V to ±12V or at TTL levels of 0 to +5V by setting the Protocol Select Jumpers to TTL."
    There is more information at:· http://www.matrixorbital.ca/appnotes/basic_stamp/
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    'TrueBaud mode for non-inverted 9600-N81 (MAX233a line driver)
    'InvBaud mode for inverted, 9600-N81    (direct connect e.g. w/22k ohm)
    #SELECT $STAMP
      #CASE BS2, BS2E, BS2PE
        TrueBaud CON 84
        InvBaud CON 16468
      #CASE BS2SX, BS2P
        TrueBaud CON 240
        InvBaud CON 16624
      #CASE BS2PX
        TrueBaud CON 396
        InvBaud CON 16780
    #ENDSELECT
    LCD CON 14
    'LCD constants & variables
    I2C_addr         CON 51   '[noparse][[/noparse]addr]   0x00-0xFF    default 0x50
    BaudRate         CON 57   '[noparse][[/noparse]speed]  53(1200) 29(2400) CF(4800) 67(9600) 33(19200) 22(28800) 19(38400) 10(57600)  default 19200
    nonstdBaudRate   CON 164  '[noparse][[/noparse]speed]
    displayOn        CON 66   '[noparse][[/noparse]min]             delay on for 0-100 minutes     0-stays on
    displayOff       CON 70
    brightness       CON 153  '[noparse][[/noparse]brightness]       0-255
    SaveBrightness   CON 152  '[noparse][[/noparse]'brightness]
    Contrast         CON 80   '[noparse][[/noparse]contrast]          0-255
    SaveContrast     CON 145  '[noparse][[/noparse]contrast]
    remember         CON 147  'switch  0=no 1=yes         remembers Scroll, LineWrap, cursor type & state, etc
    version          CON 54   'return version number e.g. 0x10 (ver 1.0)  0x42 (version 4.2)
    model            CON 55   '0x09 LK204-25
    clearSCR         CON 88
    goHome           CON 72
    ScrollOn         CON 81
    ScrollOff        CON 82
    curPos           CON 71   '[noparse][[/noparse]col] [noparse][[/noparse]row]
    LineWrapOn       CON 67
    LineWrapOff      CON 68
    ChgStartUpScr    CON 64   '[noparse][[/noparse]chars]    note: will autowrap
    curBack          CON 76
    curFwd           CON 77
    ulCursOn         CON 74
    ulCursOff        CON 75
    blkCursOn        CON 83
    blkCursOff       CON 84
    'Once you have defined a custom character you may display it by sending the display module the [noparse][[/noparse]refID]. For example if a custom character was
    'saved in position one, the command to display the custom character, at the current cursor position, would be simply to send the number one to
    'the display module without quotes.
    CustChar         CON 78    '[noparse][[/noparse]refid] [noparse][[/noparse]data]    refid=0-7  data is 8 bytes (bits patterns)
    SaveCustChar     CON 193   '[noparse][[/noparse]bank] [noparse][[/noparse]refid] [noparse][[/noparse]data]   bank=0-4  refid=0-7  data is 8 bytes (bits patterns)
    LoadCustChars    CON 192   '[noparse][[/noparse]bank]  bank=0-4
    SaveStartScr     CON 194   '[noparse][[/noparse]refid] [noparse][[/noparse]DATa]
    InitMedNum       CON 109
    placeMedNum      CON 111   '[noparse][[/noparse]row] [noparse][[/noparse]col] [noparse][[/noparse]digit]
    InitLgNum        CON 110
    placeLgNum       CON 35    '[noparse][[/noparse]col] [noparse][[/noparse]digit]
    InitHorzBar      CON 104
    placeHorzBar     CON 124   '[noparse][[/noparse]col] [noparse][[/noparse]row] [noparse][[/noparse]dir] [noparse][[/noparse]length]     direction=0(right) or 1(left)  length in pixels
    InitNarVertBar   CON 115
    InitWidVertBar   CON 118
    placeVertBar     CON 61    '[noparse][[/noparse]col] [noparse][[/noparse]length]         length in pixels
    gpoOff           CON 86    'General Purpose Output off    [noparse][[/noparse]num]   (ground)
    gpoOn            CON 87    'General Purpose Output on    [noparse][[/noparse]num]   (5v 20mA)
    gpoStartState    CON 195   '[noparse][[/noparse]num] [noparse][[/noparse]state]        0=0ff 1=on
    Prefix           CON 254   'LCD command prefix
    i VAR Byte
    DEBUG DEC truebaud
    SEROUT LCD,truebaud,[noparse][[/noparse]254,"X"]
    'SEROUT LCD, 16416,[noparse][[/noparse]254,"G",$03,$02]               'Set cursor position to column 3, row 2
    SEROUT LCD, truebaud,[noparse][[/noparse]"Test message"]
    

    ·
  • edited 2009-11-22 19:43
    thank you very much all of you, is it not easy for me to explain but, i am very happy for our help see you leter,

    en francais: Merci a tous pour votre aide vous etes tr
Sign In or Register to comment.