x-y array comparison
SILVER777
Posts: 13
Hey all,
I've got a circuit that will send me a series of 1's and 0's in an x-y array. How would I write the·code to have the bs2px compare the information from x and y and tell me where at in the x-y array a 1 occurred?
Thank you in advance
oh and here's the circuit to look at just to have a visual to reference. keep in mind that 555 timer is going to be replace with the parallax by a clock pulse out.
I've got a circuit that will send me a series of 1's and 0's in an x-y array. How would I write the·code to have the bs2px compare the information from x and y and tell me where at in the x-y array a 1 occurred?
Thank you in advance
oh and here's the circuit to look at just to have a visual to reference. keep in mind that 555 timer is going to be replace with the parallax by a clock pulse out.
Comments
Have a look through the columns: www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx
Just·like we all used to do in elementary when learning our multiplication tables. we used to take one number then follow the second number on the opposite side of the table then meet the two points together and it gave us the answer of both of those numbers multiplied together.
In my schematic you can see the diode array, eventually there will be a logic 1 at one of those points. when that happens it will send a series of ones and zeros to the 4021's it will then send out that series to the bs2px24 on an input pin. one input (for this example we'll call it pin 1)·will be designated as the x-axis and one will be designated as the y-axis (for this example we'll call it pin 2). So if a logic 1 appears as it's shown on the attached diagram, pin 1 will·read 00100 and pin two will read 10000.
Any ideas???? Am I·going·about this all wrong???? Can the parallax even attempt this?