Shop OBEX P1 Docs P2 Docs Learn Events
RFID Reader... — Parallax Forums

RFID Reader...

willthiswork89willthiswork89 Posts: 359
edited 2006-08-10 14:31 in General Discussion
im thinking about getting an RFID Reader and playing around with that but... i need some help understand the Serin...

all these

$0A, 2400 BPS, 1 stopbyte no parity i dont get it.....Is there somewhere im missing the information on all this crazy jibberjabber? ide love to continue going as my lasst failed attempt at making a RC car run by its self without the help of the controller failed. Im growing very bored with my stamp and havnt even touched it in days, i figure if i learn somthing new i might begin having some fun... thanks for the help!

Comments

  • John R.John R. Posts: 1,376
    edited 2006-08-09 03:22
    willthiswork:

    I would suggest you might want to start by taking your own advice from the following thread:

    http://forums.parallax.com/showthread.php?p=600165

    There you suggest looking at the various books available from Parallax.

    You seem to expect everything to just fall into place without any effort on your part to understand what's happening, and how things work.

    In order to understand SERIN, you need to have a basic grasp of serial communication. "Serial" means that each bit of informaiton is passed one at a time, one after the other as a "series" of bits, or in "serial" fashion.

    In order for the receiving side to understand the sending side, they both need to be communicating the same way. For serial communication this means the following:

    Both sides need to be talking at the same speed. This is how fast each bit is sent, and the time between each bit. This is also called the "baud rate" or BPS. When dealing with the STAMP, this is conveyed by a constant that is based on the speed of the STAMP, hence the reference to a speed table with various constants.

    There can also be different ways of transmitting data. Usually data is transmitted one byte at a time. Some serial communication is set up exclusively for "characters" so not all 8 bits of a byte are needed. Both sides need to know if 7 or 8 bits are going to be used. They also both need to agree if a "stop bit" will be used or not. Parity may, or may not be used. This is kind of like a "check sum", and is used to make sure that a "good" byte of data was transmitted and received. Both sides also need to know if a "high" level pulse is a zero or a one (inverted [noparse][[/noparse]low = 0] or "normal" [noparse][[/noparse]low = 1]).

    The SERIN command uses the BAUDMODE parameter to set all this up on the STAMP side.

    The RFID modues comes with documentation and sample code. I was able to use this code "out of the box" and make things work. It was also very straight forward to modify things so that I could do different things with the reader. This was the first project I did with the STAMP (and the STAMP was my first micro controller).

    BUT....

    I did have a fairly deep understanding of serial communication from working on UNIX systems years ago, before the days of Windows and Lynux, when everything was done with terminals and serial printers.

    More significantly, I took the time to read and study the sample code. I also read, study and worked through some of the What is a Microcontroller book. You can't just go through the excercises blindly. You need to understand what the lessons are trying to teach. If all you do is put the wires in, enter (or just download and run) the code, I would expect that you will get bored, and have problems thinking through a project "on your own".

    Taking a clue from some of your other posts, I would also point out that this is NOT ANYTHING like working with Windows or C++. You need to work at a much lower level, and take the time to understand what's happening at that low level. A STAMP just doesn't have the memory and other overhead to work at a high level, even with PBasic.

    Good luck.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-08-09 07:13
    ive followed the avice of everyone and read over whats a microcontroller from front to back... and i learned nothing at all about current, or anything of the sort. i learned how pushbuttons work for sure...and oh yea how the servos work... so either im not understanding or missing somthing here.. what book shpuld i be reading to understand serial,,, ive read WAM and BOEBOT and i want to continue learning but im confused on where to go from here.

    Post Edited (willthiswork89) : 8/9/2006 9:03:51 AM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-08-10 08:44
    ive come to answer my own question after reading the help file, thought you guys would be happy i figured something out on my own lol

    Parity- The attempt to check data thats incoming, if you have 7bits of data 0101100 there is an offset of 1's and '0s, parity is the ability to send another bit called the parity... when it sends it sends a parity bit of one, the reciver then looks at the 7 bits of data and figures out the parity on its own then compares its parity bit to the parity bit sent by the sender thus figuring out if it was a bad packet.


    WAIT- the wait command is the ability to ignore all incomming data until the string after wait is received.

    Baud Rate- The time, i see this like different languages, you cant listen and understand chinese if you speak english so why could th estamp understand 2400 baud if its operating at 9600 baud.

    as for the $0A i think its a string for the LCD to know what to do and what not....

    Rpin- Only used for communication between two stamps, this is the basic objective of being able to make sure that the receiver is ready to accept data, if its inverted High is "go" low is "no" vise versa for non inverted
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-10 14:31
    willthiswork89 said...(trimmed)
    Rpin- Only used for communication between two stamps, this is the basic objective of being able to make sure that the receiver is ready to accept data, if its inverted High is "go" low is "no" vise versa for non inverted
    Actually Rpin is the receive pin...Fpin is the flow control pin that you can specify which will determine whether the Rpin is ready to receive data or not.· It makes a difference since Rpin is an input and Fpin is an output.· Depending on your connections getting that wrong could cause damage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.