My bad. The original compass we were looking at is the CMPS03 Not the CSMP03. Sorry about that.
Quote:
|
Are you getting bytes through reliably via parallel? I'm hearing a lot of horror stories about how since the I/O PIC and the RC are asynchronous, some people are getting funny values every so often because one nybble may be old data, and another the new one.
|
Yeah, we are. You just have to be smart about how you send data from your custom circuit to the RC. I ended up defining a word of memory on the Stamp-2P called bus, which logically represents the state of the bus between the 2P and the RC. I can muck around with the bus variable all I want, but I have a subroutine on the 2P called SENDPACKET, which takes the current state of bus, and outputs it to the 16 output pins wired to the RC all in one shot. I can very easily turn off interrupts at the begining of this subroutine, and re-enable them at the end, which will ensure our shaft encoders aren't constantly interrupting the communication between the 2P and the RC. Finally, I'm very careful about how often I call the SENDPACKET subroutine, as to not spend too much time with interrupts off.
Doing all that, it seems to work perfectly fine between the RC and the 2P. The only weird values I've gotten have been a result of my own stupidity. (Having outputs defined as inputs, etc...) <g>
__________________
Team 677 - The Wirestrippers - Columbus School for Girls and The Ohio State University
EMAIL:
mccune@ling.ohio-state.edu
...And all you touch and all you see
Is all your life will ever be...