[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] AVR+gcc and CAN-bus

From: Marlin Unruh
Subject: [avr-gcc-list] AVR+gcc and CAN-bus
Date: Fri, 30 Mar 2001 07:24:24 -0700

Flemming Gram Christensen:

I am currently working with AVR-GCC, the AT90S8535, AT90S8515, and
Microchips stand-a-lone CAN controller MCP2510. I have written the software
to control the CAN-bus chip. The communication to the chip is done on the
SPI port. The MCP2510 interrupts the MCU when a valid message has been
assembled. I have written code that works in layers, a lower layer to work
with the hardware, and a layer that is between the application and the lower
layer. You may want to look at the Philips SJA1000, it has a parallel port
interface. If I can help let me know.

To anyone that would know:

I was using some global variables that were filled and maintained by the
timer interrupts. The timing functions were erratic and the software would
hang inconsistently with interaction on the keypad, with uses the timing
function for repeat rate. I changed to 'struct' and everything worked
perfect. Why are global variables not as reliable as structures? I switched
from using Imagecrafts ICC-AVR compiler and never used structures without a
problem. For one thing on ICC-AVR structure code was not as efficient as
AVR-GCC. The big reason I switched was code size.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]