Need CAN driver for HC08 family

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need CAN driver for HC08 family

2,597 Views
tranvkhoa
Contributor I
Dear all,
 
I have two MC68HC908GZ60 demo boards, which succcessfully communicate with each others (transmit-receive) using LIN protocol. Now I want implement the communication bettween these two boards using CAN protocol, but I don't know where to get the suitable CAN driver.
 
If anybody knows, please tell me.
 
Thanks in advance.
 
Khoa Tran
 
Labels (1)
0 Kudos
5 Replies

370 Views
Jim_P
Contributor III
I have done a far amount of CAN work and including Devicenet interfaces that run on the CAN bus.

CAN is very simple, You simply have to set the timing registers correctly - - To get the sample point and in effect the data rate.

The nice aspect of CAN is that a message of up to 8 bytes is set -- - with full CRC and other error checking - - complete with retries - - very nice

You have to set the Mask register of the receiver so that it knows which messages to receive - - a very nice feature

CAN handles multiple devices on the bus automatically - - -

Once you have it setup - - a very nice interface - - fast and error free.

Very easy to code to -- -

Simply set the ID registers - the byte count and the data registers and hit the transmit bit - - the receiver will receive the data

On the receiver side - - I use the Receive Int to signal a message is received - - and simply grab the ID and data - - -

No other fuss or mess is needed. So over RS232 this is a piece of cake so to speak. - - fast, simply - less coding - error checked -

it is no wonder that so many industrial interfaces are built upon CAN.

And with the way that CAN is designed it is a multiple master system - - all handled by the hardware - - only limitation to the number of devices on a CAN bus is the loading of each transceiver - - and can have most of them being masters - - Really a nice bus for industrial or automotive applications.

Jim P.
0 Kudos

370 Views
tranvkhoa
Contributor I
Dear Jim,
 
Thank you very much for your answer.
I'm a newbie in embedded systems, so these things are quite difficult for me.
Could you please send me the Devicenet interfaces that you developed?
 
Thanks in advance.
Khoa
0 Kudos

370 Views
tranvkhoa
Contributor I
My email address is tranvkhoa@yahoo.com.
Thanks.
0 Kudos

370 Views
mjcoury
Contributor I
Kohoa -

You don't really "need" a protocol to communicate between the two boards... the CAN is implemented via the hardware - all you would have to do is have a message ID, 0x120 for example, and then your body of information, you should be able to get that to go across.

Bosch is the orginator of the CAN protocol if you want to google that, but it has a lot of error checking, and layers of safety and security information that you may not need if you are just trying to get stared.

Hope this helps.


Mike
0 Kudos

370 Views
tranvkhoa
Contributor I
Dear Mike
 
Thank you very much for your advice. I'll try to investigate the CAN Controller on the chip and write simple transmit-recieve methods. If there's any problem, I''ll need your consult again :smileyhappy:.
 
Thanks,
Khoa
0 Kudos