Shop OBEX P1 Docs P2 Docs Learn Events
Help - making a Javelin and a BS2 talk, without serial — Parallax Forums

Help - making a Javelin and a BS2 talk, without serial

Scott MScott M Posts: 43
edited 2004-09-28 12:49 in BASIC Stamp
I have a BS2 and a Javelin. I'd like the Javelin to send occasional (not regular) bytes of data to the BS2, but I can't use serial communication because the Javelin is out of VP's. The Javelin does have a timer VP, but I don't want to depend on the BS2 and Javelin clocks staying in any sort of sync.

I have time to send my bytes a bit at a time, and the BS2 can be kept in a mode where it does little but look for input from the Javelin.

And I'm trying to minimise the number of pins this takes on either processor.

I can get it down to three pins on each - an OK To Send line, a data line, and a Data Available line. It's an icky protocol that sends a bit at a time with a lot of steps, but it looks foolproof.

There's got to be a better way, though. Is there a way to get this down to fewer lines, safely and reasonably?

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-09-21 19:20
    Hi,

    I would use two lines, a clock line driven by the BS and a data line

    driven by the javalin. Both lines are default high. When the javelin has

    data it lowers the data line. When the BS sees the data line goes low,\

    it knows data is coming and the BS lowers the clock line. The javelin

    sees the clock line goes low and sends out the first bit. The timeperiod

    the BS keeps the clock line low is long enough for the javelin to shift

    out the data bit. After thid the BS makes the clock high again thus

    informing the javelin data has been read by the BS.

    If the bit was the last bit the javelin raises the dataline. If it was not

    the last bit, the BS lowers the clock line again for the next bit.



    regards peter
  • Scott MScott M Posts: 43
    edited 2004-09-22 21:32
    I think I have a variation on this, but I want to check it with BS/2 experts because it's the sort of thing that scares me.

    Connect a Javelin pin through a 560ohm resistor, though another 560 ohm resistor, to a BS/2 pin.
    Between the two resistors, attach a 4.7k resistor, leading off to +5v. So both pins are weakly pulled high.

    5v




    pin---560ohm---+----560ohm---- pin
  • Scott MScott M Posts: 43
    edited 2004-09-22 21:45
    Previous was posted incomplete - and I need to think it out better, anyway. smile.gif
  • JavalinJavalin Posts: 892
    edited 2004-09-28 12:49
    You could try a simplified version of Phillips's I2C bus using 2 wires, maybe add a wire for CTS/RTS?! One wire is SCL (clock) and one is bi-directional SDA (data) line.

    Just a thought....
Sign In or Register to comment.