Manchester Decoding
tuki
Posts: 10
Whats up you guys i was wondering if there was anyone out there that could help me out with a problem im having. I built an RFID reader and i know it works because the data coming out of the circuit is encoded in manchester. for anyone who might not know what that is, basically a transition from low to high is a binary 1 and a transition from high to low is a binary 0. i am attaching the datasheet for the tags i am using which shows an example of this and shows exactly how the data in the tag is stored. now, i am gonna be honest and say i am HORRIBLE at programming and to top it off i don't know spin. i tried to use a picaxe 28x1 but i don't think it's fast enough to catch all the data and decode it. i wrote the code in basic and i am pretty confident it should work but it doesn't, my guess is that the picaxe isn't fast enough. a friend of mine had a parallax propeller that he said i can use since it is very fast but i dunno how to program it. to be quite honest i dont even know what pins to connect my output data and clock to. this is how my reader works: when there is no tag near the antenna, the output is always high (between 5 and 6 volts). when the tag gets in the readers range, the output sends back 9 1's (so low to high nine times) and then the data. 64 bits in total including the initial ones, and it keeps resending the data as long as it is in the range. what i have to do is, once the data starts transmitting, i have to read what state the output is in, either low or high (logic 0 or logic 1), whenever there is a rising edge on the clock. pretty simple i know but i don't know spin. here is my code in basic for the picaxe :
Main: setfreq m8
Try: ptr=$00
NoYet: if pin0=1 then NoYet
goto tag
tag: b0=64
setint %00000100,%00000100
Keep: pulsin 0,0,w1
if w1=0 then Try
goto Keep
Interrupt: b9=pin0
@ptrinc=pin0
sertxd (#b9)
dec b0
if b0=0 then Don
Set: setint %00000100,%00000100
Don: return
pin0 is the input pin where the data is coming in from, pin2 is the input pin where my clock is at. the program interrupts whenever pin2 (clock) is high. the pulsin command checks to see if pin0 is getting a low pulse because when it stops getting a pulse the tag is no longer in the range. i know this was a long post but i really need someone's help. i need to finish this project by next week or else i can't graduate. i did all the hardware but i can't seem to get the software working on my picaxe. please can someone help?
Victor
Main: setfreq m8
Try: ptr=$00
NoYet: if pin0=1 then NoYet
goto tag
tag: b0=64
setint %00000100,%00000100
Keep: pulsin 0,0,w1
if w1=0 then Try
goto Keep
Interrupt: b9=pin0
@ptrinc=pin0
sertxd (#b9)
dec b0
if b0=0 then Don
Set: setint %00000100,%00000100
Don: return
pin0 is the input pin where the data is coming in from, pin2 is the input pin where my clock is at. the program interrupts whenever pin2 (clock) is high. the pulsin command checks to see if pin0 is getting a low pulse because when it stops getting a pulse the tag is no longer in the range. i know this was a long post but i really need someone's help. i need to finish this project by next week or else i can't graduate. i did all the hardware but i can't seem to get the software working on my picaxe. please can someone help?
Victor
pdf
133K
Comments
If you want help with the Propeller, your should post your request in the Propeller forum instead of here. Also, without proper capitalization and punctuation, your posts are rather dense and hard to scan for important information. By taking the time to compose a more legible post, people are more likely to read what you have to say and respond to it.
Good luck with your project!
-Phil