PDA

View Full Version : Programming BASIC Stamp with I2C



Guy Winslow
01-20-2006, 07:11 AM
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?

http://forums.parallax.com/images/smilies/idea.gif

Jon Williams
01-20-2006, 08:35 AM
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

Loopy Byteloose
01-20-2006, 11:30 PM
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 [и黃鶴 ]иin Taiwan

Guy Winslow
01-21-2006, 07:10 AM
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 Williams
01-21-2006, 07:19 AM
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

Loopy Byteloose
01-22-2006, 01:03 AM
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 [и黃鶴 ]иin Taiwan

Jon Williams
01-22-2006, 03:30 AM
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 Winslow
01-24-2006, 03:16 AM
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 Williams
01-24-2006, 03:55 AM
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