View previous topic :: View next topic |
Author |
Message |
dara hayes Guest
|
CAN_PUTD CAN_GETD |
Posted: Wed Nov 26, 2003 10:52 am |
|
|
Hello
when using ccs can routines does one have to send each single frame
one by one or can one point to an array which holds more than 8 bytes of data for sending across the bus , could some one explain the use of these routines in a simple manner for a newbie to can also on the receiption side does one have to man handle each single frame in one by one or what is the proceedure here also ?
many thanks
Dara Hayes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Nov 26, 2003 1:05 pm |
|
|
When using ccs CAN routines does one have to send each single frame
one by one or can one point to an array which holds more than 8 bytes of data for sending across the bus ?
The can_putd() and can_getd() functions send and receive one frame
of 8 bytes at a time.
Could some one explain the use of these routines in a simple manner for a newbie to CAN. Also on the reception side does one have to man handle each single frame in one by one or what is the procedure here also ?
CCS has an example file, EX_CAN.C, which shows how to setup the
parameters before calling can_putd() and can_getd(). I assume you
have seen this file. So your question must be "How do I use the CAN
bus to solve my problem ?".
I've done a simple CAN project, which involved sending CAN messages
to several small slave i/o boards, each of which had a 18F458 chip on it.
Each slave board had an 8-bit input port, and an 8-bit output port on it.
These i/o ports controlled other external devices, such as lights or
motors. We designed our own simple protocol. We didn't try to use
any of the complex CAN message protocols that are advertised on the
net.
So if your project is simple, I can probably give you some help.
But I need to know what you're trying to do. |
|
|
maury71
Joined: 12 May 2004 Posts: 1 Location: Italy
|
CAN |
Posted: Wed May 12, 2004 5:56 pm |
|
|
Hallo to everyone. I am not an expert in ccs code and i need to quickly learn how to make a simple project using CAN. I have a 18F458 in the node that i use as a switch with a switch attached to a port. I have also another node that is a 18f458 with one led on portB that must be turn on after riceving one message from the first node. Has someone the two codes that works for the first and for the second node to do this simple task or 2 sample programs for a master and a slave comunication. Thank a lot for your interest. |
|
|
|