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

18f4550 and em4095 problem.

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







18f4550 and em4095 problem.
PostPosted: Mon May 21, 2007 12:35 am     Reply with quote

hello, I'm doing a RFID reader with a 18f4550 and an EM4095 IC's.

I have done the reader with the pic16f877a an it works perfect, I add an LCD to see the tg number and it works. but the problem is that now I want to use the PIC18F4550 but it doesn't work and I dont know why, at first I thought that the problem were the fuses so I jus made a program to test the LCD but works fine, and then I put my program into the PIC4550 and I can't make it work, I dont know why, but I can'a saw anything in the lcd.

I really don't know what my problem is, as I said before, I thought it were the fuses but with a test program i realize it weren't. byt the way rigth now I'm not using the USB I tried with a 4MHz and 20Mhz cristal and I get the same response... nothing.

please a little help with this.
Thanks
lmercor
Guest







this is part of my code.
PostPosted: Mon May 21, 2007 3:40 pm     Reply with quote

#include <18F4550.h>
#fuses HS, NOWDT, PUT, BROWNOUT, NOLVP
#use delay(clock=20000000)

#define use_portd_lcd TRUE
#define LCD_DATA_PORT portd
#define LCD_TYPE 2
#define LCD_TRIS_LOCATION trisd

#include <lcd.c>
#include <em4095.c>
#include <em4102.c>

void main(void) {
int8 code[5];
int32 tagNum;
int8 customerCode;
int8 i, j;
int8 dato_org;

rf_init();
rf_powerUp();
lcd_init();

while(TRUE) {

if(read_4102(code)) //read the code
{
for (i=0; i<5; i++) {
dato_org = code[i];
code[i] = 0;
for (j=0; j<8>>(j)) & 0x01);
if(j<=6) {
code[i] <<= 1;
}
}
}
tagNum = make32(code[1],code[2],code[3],code[4]);
customerCode = code[0];
printf(lcd_putc,"\fNo: %x%lx", customerCode, tagNum);
}
}
}


I think the problem could be with the interrups.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 21, 2007 3:45 pm     Reply with quote

Quote:
for (j=0; j<8>>(j)) & 0x01);

This is not readable code.

When you post code, please disable HTML. There's a tickbox to do this
below the posting window.

Also, please register and login (set it for "auto" login). Then you can
edit your posts when a problem like this occurs. You can also set
your user profile to always disable HTML.
Guest








Re: 18f4550 and em4095 problem.
PostPosted: Sun Oct 04, 2009 3:53 am     Reply with quote

lmercor wrote:
hello, I'm doing a RFID reader with a 18f4550 and an EM4095 IC's.

I have done the reader with the pic16f877a an it works perfect, I add an LCD to see the tg number and it works. but the problem is that now I want to use the PIC18F4550 but it doesn't work and I dont know why, at first I thought that the problem were the fuses so I jus made a program to test the LCD but works fine, and then I put my program into the PIC4550 and I can't make it work, I dont know why, but I can'a saw anything in the lcd.

I really don't know what my problem is, as I said before, I thought it were the fuses but with a test program i realize it weren't. byt the way rigth now I'm not using the USB I tried with a 4MHz and 20Mhz cristal and I get the same response... nothing.

please a little help with this.
Thanks



I'm very happy when i 'm readed these statement. I'm searching the rfid use 16f877a. Can you give me the principle (of the rfid reader kit) that you did? Thank a lot before. My address : [email protected] .
We can talk together about the microcontroller . I hope I can learn more and help you as I can.
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