CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problems with EM4095 and PIC18F1320

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zzett



Joined: 03 Feb 2012
Posts: 2

View user's profile Send private message

Problems with EM4095 and PIC18F1320
PostPosted: Fri Feb 03, 2012 7:35 pm     Reply with quote

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?
zzett



Joined: 03 Feb 2012
Posts: 2

View user's profile Send private message

PostPosted: Sat Feb 04, 2012 11:30 am     Reply with quote

I solved the issue. Solution was that a 2Mhz frequency was too low. I increased it to 8Mhz, now it is working fine Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group