Hello LMR! This is sort-of a Two in one question. I need some assistance figuring how to hook up and program the following:
RFID - I’ve been eying this for a while now: http://www.sparkfun.com/products/8419. I understand that pin 5 will tell you when a card is present, and 8 & 9 look like i2c, but what is pin 7 (format selector)? What sort of object (propeller) would I use to drive it, i2c? What about the cp pin?
RTC - I’ve also wanted to do some experiments with this cool little chip: http://www.sparkfun.com/products/10160. I understand that data will be transferred while the chip is selected and the clock will synchronize it. But what are the serial commands to reques time/date, set things, etc. (if possible, I would like to run this off of an I/o expander, i2c, or serial controlled picaxe)
First up please loose the . at the end of your links
The RFID reader has 3 modes of operation; ASCII, Magnetic Emulation, and Wiegand26. Unless you are trying to interface with something that is expecting Magnetic reader input, I would choose one of the other two options. That being the case, you won’t need the CP (Card Present). Also, according to the site, it should be used as a serial device @ 9600 bps. Check the datasheet for better/more info.
That clock uses an SPI connection which the propeller is quite happy to do, however dealing with the data when it comes in can be a little work. When I did it, I ended up finding some example code (in Arduino) and I simply translated. It isn’t too bad, but there is some bit-sifting involved and some other monkey-business. As an example (don’t use this, it will not compile):
This particular chip and thus the code to run it is a little funny. As you can see, data is shifted and dealt with in different ways as it come in. This has nothing to do with the Propeller or Spin, it is more so just the fact of how the chip operates. I could comment the above, but I don’t think it is going to do any good. Really, the notes are just going to say, “these bits get shifted 4 to the left then and’ed to this” etc. which doesn’t really get you anywhere. I think what you are asking is simply, “how do I make it go” which is a different question intirely. I can and probably will make an object out of this but to be honest, I have a bunch of stuff ahead of it right now. I am to understand that you don’t have this particular chip yet anyway.
Let me know if and when you actually buy and receive the break out board and we can go from there.
In the meantime, start reading up on SPI communication, check out the Arduino code (it is the only example code I can find) and see what you can get from it, and read your datasheet.
well, like I said, I’m going to start with SD cards first, this is #11 on my current list. I’ll cross this bridge when I get to it. Thanks for the help