and then how can you use whatever that pin receives in a useful way? like say if you know you're transmitting a number to that receive pin how can you grab that number from the receive pin?
You need to ask more specific questions to get specific answers.
There are a variety of techniques to send data from one device's I/O pin to another device's I/O pin. A number of these are standardized like asynchronous serial and both SPI and I2C synchronous serial. All of these send a series of 8-bit bytes these days. They've all been used to send other numbers of bits at a time, but 8-bit bytes are generally what's done today.
Once you have an arbitrary series of bytes sent from one place to another, now there are all sorts of ways to send more complex data over these byte streams. How you do that depends a lot on what sort of data you want to send.
Using the data "properly" depends entirely on what you mean by that.
ok well im using the prop motor board to drive this RFID reader(http://www.robotshop.ca/apsx-rw-310-rfid-reader-writer-module-ttl-1.html).
Im getting it to scan by transmitting the value to scan(from data sheet) using simple serial. Except im not sure on how to use the rx method to actually receive the tag im reading.
At the moment im just outputting the number to the parallax serial terminal, but its wrong. Id like to be able to see the tag number.
Just glancing at the link you provided, it looks like the RFID reader is designed to receive and send standard asynchronous serial data using logic levels. You'll have to refer to the reader's documentation to see just what it's supposed to be sending. You can use the receive method of any of the receive objects (like FullDuplexSerial) to receive whatever's sent from the RFID reader and display it using whatever display you want. Just use the RX method to get each character and use the HEX method of the display driver object (like TV_TEXT) to display the byte value received.
Again, you need to provide some information about what you're trying to accomplish. You also need to read the documentation on the RFID reader and provide some of that in your question. It's not fair to expect us to do that for you.
I guess I don't under stand what you're doing. Obviously, you're initializing PST and FDS with Rpin as the receive pin for the Prop and Rxpin as the transmit pin for the Prop. Then you're watching Txpin for a high level. Why? It's an output controlled by FDS. You could use the RXCheck method in FDS to see if there's anything in the receive buffer. Then you're ignoring FDS and trying to read the bits from the RFID reader after you get them and throw them away with FDS.rx.
Anyway, you need to either use FDS or use one of the "bit-banging" routines like Simple_Serial or use your own "bit-banging" routine like rfidRead, but not more than one.
I think you'd be better off starting with a straightforward flowchart or similar prose description of what you're doing, then flesh it out (and test it) one piece at a time.
I believe there's code for Parallax's RFID reader in the Object Exchange. You might have a look at that and see if you can adopt it to your RFID reader.
Comments
obex.parallax.com/objects/183/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
There are a variety of techniques to send data from one device's I/O pin to another device's I/O pin. A number of these are standardized like asynchronous serial and both SPI and I2C synchronous serial. All of these send a series of 8-bit bytes these days. They've all been used to send other numbers of bits at a time, but 8-bit bytes are generally what's done today.
Once you have an arbitrary series of bytes sent from one place to another, now there are all sorts of ways to send more complex data over these byte streams. How you do that depends a lot on what sort of data you want to send.
Using the data "properly" depends entirely on what you mean by that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Im getting it to scan by transmitting the value to scan(from data sheet) using simple serial. Except im not sure on how to use the rx method to actually receive the tag im reading.
At the moment im just outputting the number to the parallax serial terminal, but its wrong. Id like to be able to see the tag number.
Again, you need to provide some information about what you're trying to accomplish. You also need to read the documentation on the RFID reader and provide some of that in your question. It's not fair to expect us to do that for you.
Whenever i print tagid whatever comes out seems to be garbage.
Maybe im not understanding serial. Any help appreciated.
Anyway, you need to either use FDS or use one of the "bit-banging" routines like Simple_Serial or use your own "bit-banging" routine like rfidRead, but not more than one.
I think you'd be better off starting with a straightforward flowchart or similar prose description of what you're doing, then flesh it out (and test it) one piece at a time.
I believe there's code for Parallax's RFID reader in the Object Exchange. You might have a look at that and see if you can adopt it to your RFID reader.
EDIT: yea I got it working thanks alot mike.
Post Edited (p00ndawg) : 7/6/2010 8:18:07 PM GMT