Joined: 12 Dec 2005 Posts: 50 Location: Curitiba - Brazil
18F4580 CAN doubt
Posted: Mon Dec 12, 2005 7:27 am
We are using a PIC18F4580 to communicate via CAN interface, but when I include the "#zero_ram" statment at the top of my code (main.c), it gets locked at the "can-18F4580.c" file, whcih was included. If I do not include the "#zero ram" statment the code runs well. Why is it ?
void can_set_mode(CAN_OP_MODE mode) {
CANCON.reqop=mode;
while( (CANSTAT.opmode) != mode ); //<<<---- never ending loop
} // if #zero ram is included
// in my code
Why CANSTAT does no change its register according to the can_set_mode ?
Thanks in advance,
Pasini
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Mon Dec 12, 2005 12:48 pm
Quote:
If I do not include the "#zero ram" statment the code runs well. Why is it ?
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