Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: 90can128 can controller

2009-12-31 by blue_eagle74

I am using CodeVision to compile and load the chips.

I have seen many sites that describe the CAN. I have used the CV wizard to set up the CAN using only MOB1 but don't know how to start sending or recieving data or where to get the data.

Brian



--- In AVR-Chat@yahoogroups.com, "Dave McLaughlin" <dave_mclaughlin@...> wrote:
>
> The CAN controller in the device needs a fair bit of work to fully
> understand it and also a good understanding of CAN to be able to use it
> fully.
> 
>  
> 
> There is quite a bit to setup the device to make it work and it took me
> about 1 week with the code from the Atmel website, porting it to the
> Codevision compiler before it would work. It is ready to go with the WinAVR
> I believe so if you have that compiler, you should be able to figure it out?
> I was already familiar with the Microchip MCP2515 before but moving to the
> AVR CAN took me a whilst to figure out and I am still working on it.
> 
>  
> 
> CAN does not work as a request and get data, except for certain situation
> where you do a request. Normally, CAN devices just send data on event or at
> preset times. For the likes of digital inputs, I would only send a message
> on the bus if there was a change. For analog I would send at a preset rate.
> 
>  
> 
> The beauty of CAN is that you don't have to worry about having a master with
> multiple slaves as you would with the likes of RS485. You simple ensure that
> each device on the bus sends a unique ID for each message. CAN messages are
> based on priority so a higher priority message goes first if 2 devices try
> to send data at the same time. This reduces your workload in the processor
> to very little and you simple set the buffer to transmit and let the CAN
> controller do the work of sending the message and detecting errors.
> 
>  
> 
> Remember that CAN is source message based. That means there is no
> destination address. The remote devices know which messages they are
> interested in and are usually setup with the message filters to only receive
> those messages. This bit takes a fair bit of work to understand but once you
> do, it will be easy to create remote devices listening only for required
> messages.
> 
>  
> 
> Which compiler are you using?
> 
>  
> 
> Dave.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.