Help - making a Javelin and a BS2 talk, without serial
Scott M
Posts: 43
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?
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
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
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
Just a thought....