can one sx28 store a number that another sx28 can access?
mspeedie
Posts: 12
I'm sure this has been addressed before but I couldn't find anthing in this forum helping me figure out how to have one sx28 store a numeric value (1-6) that another sx28 can access at certain intervals. I am using SX-B (no assembly skills unfortunately).
Can this all be done within the two sx28's or do I need an external memory chip?
Any help is appreciated.
Thanks, Mike
Can this all be done within the two sx28's or do I need an external memory chip?
Any help is appreciated.
Thanks, Mike
Comments
If you use pins 0-2 of one of the byte I/O ports, you'll have an easier time setting and checking the 3-bit value. If the port is called Comm, you'd set a new value (NewValue) by using something like:
To test the value on the other SX28:
Thanks for the reply. That's definitely more efficient than my original solution which was:
first sx chip:
if x=..., then high pin 1
else if x = ..., then high pin 2
else if x = ..., then high pin 3
else if x = ..., then high pin 4
else if x = ..., then high pin 5
else if x = ..., then high pin 6
I had pins 1-6 on the first sx chip connected respectively to pins 1-6 on the second sx chip. So the second sx chip was scanning all six pins looking for the high. I wasn't using a 330-ohm resister between them though. It seemed that after my code triggered one of the pins 1-6 high, when the pin was set back to low, it occasionally remained high. I solved this by connecting a 1-Mohm resister between the two chips and ground to instantly discharge any remaining charge between the two. Have you experienced this before? Is that what the 330-ohm resistor takes care of?
Mike