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

CAN-loopback mode

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







CAN-loopback mode
PostPosted: Tue Jul 26, 2005 4:59 pm     Reply with quote

can someone give me an overview on how to get into LOOPBACK MODE? I'm using the libraries can18xxx8.c and can18.xxx8.h. I want to test what's in the recieve buffers of PIC18F2480.

thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 26, 2005 5:37 pm     Reply with quote

I wonder if there are really this many different people working
on the 18F2480 ?

But anyway, here is a thread that shows how to put the 18F458 in
loopback mode with the CCS drivers.
http://www.ccsinfo.com/forum/viewtopic.php?t=20106&highlight=loopback
Arlene
Guest







PostPosted: Thu Jul 28, 2005 12:26 pm     Reply with quote

when we tried to put it in loopback mode and print out what was received, we got nothing. what could be wrong?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 28, 2005 12:44 pm     Reply with quote

Just get a 18F458 and use it to learn the CAN bus.
You have spent weeks on the 18F2480 and it doesn't work.
How much time do you intend to waste on this chip ?

In your code in the other thread,
http://www.ccsinfo.com/forum/viewtopic.php?t=23811
you've taken pieces of the CCS EX_CAN.C demo program,
but you've left out important parts. You're calling can_getd()
without checking to see if any messages are available by
first calling can_kbhit(). CCS shows completely how to
do it in EX_CAN.C, but you have ignored it.
Arlene
Guest







PostPosted: Thu Jul 28, 2005 3:50 pm     Reply with quote

It works! Thanks. The can_getd function didn't work, so we wrote our own and figured it out.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 29, 2005 12:07 am     Reply with quote

For CAN bus loopback code, see this thread. Newguy is using a
18F4580, which is similar to your 18F2480. If the code works
for his PIC, then it probably will work with the 18F2480.
http://www.ccsinfo.com/forum/viewtopic.php?t=23825
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