zzett
Joined: 03 Feb 2012 Posts: 2
|
Problems with EM4095 and PIC18F1320 |
Posted: Fri Feb 03, 2012 7:35 pm |
|
|
Hello,
I try to get the RFID chip EM4095 working. I use the drivers em4095.c, em4102.c and the example code ex_rfid.c
The example is running, but no rfid tag can be scanned.
My configuration for the em4095 looks like this:
Code: | #ifndef RF_SHD
#define RF_RDY_CLK PIN_B6 // External interrupt used to read clock
#define RF_SHD PIN_B1 // High disables the antenna signal
//#define RF_MOD PIN_B2 // High does 100% modulation
#define RF_DEMOD_OUT PIN_B3 // Data read in interrupt service routine
#endif |
Because I have no oscilloscope here, I tried to debug the code with a connected LCD. Therefore, I added the line Code: | memcpy(globalBuffer, RFbuffer, 20); | in the function Code: | int8 RF_get(int8 numBits, int1 edge) { | after the line Code: | while(dataTransferred < numBits && timer0_overflows < 15); | I print the values of the globalBuffer to the LCD. My goal was to have a look if at least something is read. If no RFID tag is put at the antenna, the LCD shows me random data, but if I use a RFID tag, the LCD shows values like "0x55" or "0xAA". If you convert them to binary, you see that it means something like 10101010. So the bit are always alternated.
Can somebody give me a hint what could be the reason for that? Any other information needed or hints where I could debug further? |
|