Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp Debug serial interface I2C for any microcontroller — Parallax Forums

Basic Stamp Debug serial interface I2C for any microcontroller

metron9metron9 Posts: 1,100
edited 2006-09-21 23:38 in Robotics
I have been playing with FRAM memory on some ATMEL processors
The internal oscillators on these chips are not good for serial interface

So I used the Basic Stamp and wrote an I2C type interface. It uses 2 wires with 2.2k pullp resistors

I added the ability for the basic stamp to place a hold on incomming data so it can process it
or to single step the code on the other processor with the proper setup.

I used it to confirm my I2C code that writes to fram memory at over 300bps (at 8MHZ)
It runs about 30CPS , 240bps so it's not fast but it's a nice output slave for micros you dont have serial interface on.

You could also use it for the SX chip when you use the internal oscillator to debug code.

To use it, as is
connect +5V to a 2.2k resistor to pin 15 SDA dataline buss
connect +5V to a 2.2k resistor to pin 14 SCL clock line buss
connect external processor running the master code to pins 14 and 15 SCL and SDA lines

run the basic stamp code
run the code on the external processor

the debug window on the pc will show the bytes in HEX and ASCII letters and numbers format and change as it suits you.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!

Comments

  • ZootZoot Posts: 2,227
    edited 2006-09-21 23:38
    This is interesting and clever code. It looks like it could be adapted to "virtually" slave a Stamp as I2C-like device -- or at least query a slave Stamp via I2C rather than serial and fpin lines.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.