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

Em4150 parity - *** Duplicate post

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



Joined: 10 Oct 2014
Posts: 10

View user's profile Send private message

PostPosted: Tue Oct 21, 2014 1:18 am     Reply with quote

Hello,
I have a same problem with my read RFID.
I use PCW compiler(CCS).
My hardware is the recommended EM Marin for Em4150. If you need my schematic I can send for email.
I use em4095 + pic16f876A.
When I run my circuit emerge the next message "ERROR PARITY".
I can read em4100 and em4102, also I can write em4150, but I can't read em4150.
Can you help me?
This is my email: olivercharmander@hotmail.com

This is my code:

Code:
#include <16F876a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NOPUT
#use delay(clock=20000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=RS)



#include <em4095.c>
#include <em4102.c>
#include <em4150.c>
#include <stdlib.h>


int32 msg;
int8 err;
int32 tagNum=0x00;
 int8  tag_adr=5;// tag_adr is between 0-33

void main(void) {

 rf_init();
   rf_powerUp();
   
 
  while(true) {
 
// restart_wdt();
 
 
     
     
     
      //LOGIN
   
      err = login_4150(0x00);
     // resultado=readProtect_4150(1, 2);
    //  printf("valor de Resultado = %d\n\r",resultado);
     
   //   printf("valor de ERR LOGIN = %d\n\r",err);
     
      switch(err) {
      case ERR_OK: printf("\n\rOK LOGIN"); break;
      case ERR_LIW:printf("\n\rLIW LOGIN"); break;
      case ERR_NAK:printf("\n\rNAK LOGIN"); break;
      case ERR_PARITY: printf("\n\rPARITY LOGIN"); break;
      }
      puts(msg,RS);
      delay_ms(500);
       
 
 //ESCRITURA
   tagNum = make32(0x01,0x02,0x03,0x04);
     tag_adr=5;
     err = write_4150(tagNum,tag_adr);
      switch(err) {
      case ERR_OK: printf("\n\rOK ESCRITURA");
      break;
      case ERR_LIW:printf("\n\rLIW ESCRITURA"); break;
      case ERR_NAK: printf("\n\rNAK ESCRITURA"); break;
      case ERR_PARITY: printf("\n\rPARITY ESCRITURA"); break;
      }
      puts(msg,RS);
      PWprotect_4150(FALSE);
    delay_ms(500);
     
     
err=setPassword_4150(oldPassword, newPassword);
printf("valor de ERR Password = %d\n\r",err);

     
   //LECTURA   
  err = read_4150(&msg,5);

tagNum=msg;
 
       
      switch(err) {
     
      case ERR_OK: printf("Data: %lu \n\r", tagNum);
      printf("Data: %x \n\r", tagNum);
      break;
      case ERR_LIW: printf("\n\rLIW LECTURA");
     
      break;
      case ERR_NAK: printf("\n\rNAK LECTURA");
   
      break;
      case ERR_PARITY:
      printf("\n\rPARITY LECTURA");
     //printf("PARITY\n\r");
      break;
     
     
   
      }
     
      puts(msg,RS);
     
  //RESET
   err= reset_4150() ; 
   
   switch(err) {
     
      case ERR_OK: printf("\n\rOK RESET");
      break;
      case ERR_LIW: printf("\n\rLIW RESET");
     
      break;
      case ERR_NAK: printf("\n\rNAK RESET");
   
      break;
}
 
}
   }
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