Shop OBEX P1 Docs P2 Docs Learn Events
BS greenhorn... need to display data from a preipheral using BS2SX — Parallax Forums

BS greenhorn... need to display data from a preipheral using BS2SX

okc.engineerokc.engineer Posts: 12
edited 2004-10-18 18:24 in BASIC Stamp
Hi, a real newbie here for Basic Stamp (I am more familiar with MCS-51 assembly language, it's an adjustment).· I need to DEBUG some information from a serial peripheral.· The stamp requests the external peripheral's firmware version and date.· It is returned in ASCII text.· How can I get that to display on the Debug screen?

Thanks for your help!
Bill

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-18 16:13
    How many characters? Let's say you're going to get an 8-character string from your device. You can do this:

    buffer VAR Byte(8)

    SERIN pin, baud, [noparse][[/noparse]STR buffer\8]
    DEBUG STR buffer\8

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-18 18:24
    Note that:

    SEROUT 16, baud, STR buffer\8 ' This does the same thing as DEBUG
Sign In or Register to comment.