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

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







CAN speeds?
PostPosted: Wed Jul 14, 2004 8:04 am     Reply with quote

CCS's CAN demo board uses 20MHz clocks and comfortably runs the PICs in the board at CAN speeds of 1MBps.

Can i achieve 1MBps CAN speeds even if I run the crystal at 8MHz, and still have enough CPU cycles to spare for processing?

The reason why i'm asking is that Microchip is now soon coming out with their PICs that have both 8MHz internal oscillators and CAN modules built in. When they release it, who knows, but it has called it a "Future Product" for a while now.

-Mike
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 14, 2004 12:32 pm     Reply with quote

Quote:
Can I achieve 1MBps CAN speeds even if I run the crystal at
8MHz, and still have enough CPU cycles to spare for processing?


Use a bit timing calculator to check if your desired CAN bus speed
is possible with your oscillator frequency. These calculators are
for MCP2510, but the internal CAN modules inside 18F258 and
18F458 PICs are very similar.
http://www.kvaser.com/index.htm
Here's another one. I have some doubts about how to
reset this one. It might be best to re-start the program
each time you try a new frequency/bus speed setting.
http://intrepidcs.com/modules/CmodsDownload/upload/Software/MBTime.zip
With regard to CPU usage, I think that depends mostly on
how much bus traffic you have, and also on how you setup
your message acceptance filters.

In one system, we had eight nodes with a 18F458 on each board.
These were controlled by a PC with a Kvaser USBcan II unit.
Originally the nodes had 4 MHz crystals. I think we were running
the CAN bus at 250 or maybe 500 kbps. It was determined just
by testing the system, that the nodes didn't have enough power
to do their tasks (which was talking to up to 100 sub-nodes via
RF links). So we had to increase the node crystal frequency
to 16 MHz.

I would never assume that you'll be able to get away with using
only the 8 MHz internal oscillator. I would put pads for a crystal
and caps on the board. If you need them, then you've got them.


------------
Edit: Updated link.
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