Shop OBEX P1 Docs P2 Docs Learn Events
Programming BASIC Stamp with I2C — Parallax Forums

Programming BASIC Stamp with I2C

Guy WinslowGuy Winslow Posts: 4
edited 2006-01-23 19:55 in BASIC Stamp
Hi I have and automation controller I built that talks 802.11b, but it just handles basic IO and analog conversion talking to program on PC remotely. I need to put a controller into it that runes a simple language (BASIC). This is the hang-up, how do I program it through my communications controller? My communications controller can talk rs232, but I have and i2c port with programming library already.

Is it passable to program the Basic stamp through the I2C?
Can I debug the basic stamp code? Can I Reset the stamp?
Is there a set of libraries I can include into my .NET controller application IDE builder?

idea.gif

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-20 00:35
    The only way to program the BASIC Stamp is through a serial connection.· This page has all the information you need to create your own programming application: http://www.parallax.com/html_pages/downloads/tokenizer/tokenizer.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-01-20 15:30
    Consider a hardware adaptation. I2C to RS-232 in one chip. The SX-28 will do it. Additionally, it could manage the ATTN line which is used for programing.

    While conceptually it is quite feasible, it is indeed an ambitious project in Assembler. On the other hand, the SX/B might make it come together quite handily.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Guy WinslowGuy Winslow Posts: 4
    edited 2006-01-20 23:10
    Got the Lib and am changing my board and schematic to add rs232 connection to the internet bridge code. I am going to have to upgrade my bridge code though as I need the file system on a memory chip and the manufacture do’s not list it anymore. All continue to watch posts and will reply when I get my new PCB’s built and tested.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-20 23:19
    You might want to put your SDA/SCL lines on 0/1 or 8/9 -- that way you could switch to a BS2p24 type Stamp and use the built-in I2C commands (they only work on these pin groups).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-01-21 17:03
    Jon,
    Did I miss something?
    That would indeed create an I2C interface, but it would not allow you to program the BasicStamp via it.

    From what I read, I thought he wanted to program the BasicStamp from a remote site. {I love the idea.}

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-21 19:30
    I should have been more specific: P0 (SDA) / P1 (SCL), or P8 (SDA) / P9 (SCL).

    You must use serial to program the BASIC Stamp. The BASIC Stamp can behave like an I2C master, but not an I2C slave.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Guy WinslowGuy Winslow Posts: 4
    edited 2006-01-23 19:16
    I have 3v logic on my bridge, can I connect the serial lines directly to the serial programming port or do I need to edge sense the signal on the Basic stamp?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-23 19:55
    Since the SOut and Sin pins on the Stamp are designed for RS-232, I think you might run into a problem with that. Another issue is that with the Stamp, it's not just straight serial messages. The DTR pin is used to reset the Stamp before programming -- you'll need to make sure you can get that signal through as well (to the Atn pin). The programming protocol docs I referenced earlier give all the timing requirements.

    Your project sounds very tricky. Good luck -- I hope you can make it work!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.