Jump to content
43oh

MSP430 as a RFID Reader processor


Recommended Posts

Hi everybody,

 

I`m already designed RF front-end to capture RFID data.

now I can recieve Tag signal in miller4 and in 256khz frquency.

 

anybody here can help me in:

 

1: how can I capture this data and do decoding of the signal in a MSP430?

 

2: what is minimum system frequency is required to capture recieved signal without missing any data? 

 

3: anybody here did the Miller4 decoding in C or C++?

 

4: should I store the signal first and then process the data? or I can detect each bit on interrupt routin?

 

any information or help or sample code is so appereciated.

also if anybody coded a UHF RFID reader and decoding and protocols for MSP430 before, help me please.

 

 

Link to post
Share on other sites

You probably want to use the input-capture feature to count the subcarrier delays, and then from there you need to convert it to bitwise, binary data.  Since miller encoding is state-based and bit-oriented, it is expensive to decode in software.  You might have better luck using a PSoC, although it might be possible to use a set of lookup tables.

Link to post
Share on other sites

Also I saw that Ti has a RFID reader based on CC1101 which is based on MSP430 as you know.

They are decoding miller4 for sure.

But they read their RF Rx buffer for recieved signal . I`m going to read it using input capture.

Actually I`m not sure that I can capture the data in 256khz using input capture. Can i? do you have any resource or sample code that I can just capture data and store it in a register in interrupt routing in this frequency?

 

Thanks

Link to post
Share on other sites

CC1101 is a transceiver chip.  It doesn't contain an MSP430 or any programmable CPU core.  The CC111x is an old SoC family that uses CC1101 + 8051 CPU.  The CC430 is a newer version that rcontains the CC1101 radio transceiver and an MSP430F5 series MCU on a single die.  The RF430F5978 is a CC430 with a PaLFI transceiver stuck into it, as an SiP.  That is basically the extent of sub-1GHz single-package chips that TI offers.

 

I recommend using input capture in order to get bit synchronization.  If you are sampling bits from an isolated timer, that's just a recipe for drift errors.  If you have an external bit synchronizer (it is not clear if you do), then you can just work on the data at binary.

 

Without bit synchronizer, and using input capture timer, you just capture each edge and decode the bit based on the current state and the duration between the new edge and the last edge.  You'll need to do the homework on Miller encoding, but it's not terribly difficult.  If the symbol rate is 256kHz, then each bit is 3.9us.  That is not a lot of time.  You'll want at least 4 MHz clock on your MSP.

 

So, is your "RF Front End" just an analog front end that has a direct modulation interface?  If so, then you'll need to use the input capture method above.  I'll see if I can dig up some code for that somewhere.  I think I have some from some time long ago.  If your "RF Front End" is sending you data on something like a buffered SPI, then you can ignore all this input-capture stuff completely.

Link to post
Share on other sites

Thanks Man,

 

Yes I meant CC430 .

 

your information was so helpful .

 

actually my RF front end is an analog circuit and just filter the recieved signal, remove reader signal and at the end of the day prepare a digital signal which is just tag signal without any change.

so the recieved signal is 256khz (because of impinj reader that I`m using) and miller encoded.

 

BTW, Is it possible that we talk together online in any messenger? I think you can help me a lot. anytime that works for you :)

Link to post
Share on other sites

one more question!

 

you said I need 4Mhz clock for 3.9us.

 

but when I try to to see what will be my maximum frequency, with 16MHZ I just get around 200khz .

 

am I doing anything wrong?

 

also I figured out that the timer starts to count again when it goes out of ISR. is it possible that when it came inside the interrupt it reset the timer and start the counting? in this case I can have higher frequency.

 

here is my code:

============================================================================================

 

 

void main(void) {

  WDTCTL = WDTPW + WDTHOLD;        // Stop watchdog timer
  //BCSCTL1 = CALBC1_16MHZ; // Set range
 // DCOCTL = CALDCO_16MHZ;  // Set DCO step and modulation

  P1DIR |= BIT0;                   // Set P1.0 to output direction
  P1OUT &= ~BIT0;                  // Set the red LED off

  P1DIR |= BIT6;                   // Set P1.6 to output direction
  P1OUT &= ~BIT6;                  // Set the green LED off
 

  TA0CCR0 = 1;                 // Count limit (16 bit)
  TA0CCTL0 = 0x10;                 // Enable Timer A0 interrupts, bit 4=1
  TA0CTL = TASSEL_2 + MC_1;        // Timer A0 with SMCLK, count UP


  _BIS_SR(LPM0_bits + GIE);        // LPM0 (low power mode) interrupts enabled

}



#pragma vector=TIMER0_A0_VECTOR    // Timer0 A0 interrupt service routine

  __interrupt void Timer0_A0 (void) {

   P1OUT ^= BIT6;                  // Toggle green LED

}
 
Edited by bluehash
Please use code tags next time.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...