MCB517AC Evaluation Board User’s Guide
43
External CAN Example
The following example program shows you how to access the external CAN
controller registers. You can use this CAN xdata structure to access every
register of the external CAN controller 81C90.
This very simple example reads the low nibble (bits 0-3) of CAN port 0 and
writes the data into the high nibble (bits 4-7) of CAN port 0.
#include <reg517a.h>
struct CANSTRUCT {
unsigned char BL1;
unsigned char BL2;
unsigned char OC;
unsigned char BRP;
unsigned char RR1;
unsigned char RR2;
unsigned char RIM1;
unsigned char RIM2;
unsigned char TRS1;
unsigned char TRS2;
unsigned char IMSK;
unsigned char dummy1[5];
unsigned char MOD;
unsigned char INT;
unsigned char CTRL;
unsigned char dummy2;
unsigned char CC;
unsigned char TCEC;
unsigned char TCD;
unsigned char dummy3;
unsigned char TRR1;
unsigned char TRR2;
unsigned char RRP1;
unsigned char RRP2;
unsigned char TSCH;
unsigned char TSCL;
unsigned char dummy4[10];
unsigned char P0PDR;
unsigned char P0PR;
unsigned char P0LR;
unsigned char dummy5;
unsigned char P1PDR;
unsigned char P1PR;
unsigned char P1LR;
unsigned char dummy6;
unsigned int TIME_STAMP[8];
unsigned int DESCRIPTOR[16];
} xdata CAN _at_ 0xf700;
Содержание MCB517AC
Страница 6: ...vi Contents...
Страница 23: ...MCB517AC Evaluation Board User s Guide 17 Schematics...
Страница 24: ...18 Chapter 3 Hardware...
Страница 25: ...MCB517AC Evaluation Board User s Guide 19...
Страница 26: ...20 Chapter 3 Hardware...
Страница 27: ...MCB517AC Evaluation Board User s Guide 21 Printed Board Assembly...
Страница 32: ...26 Chapter 3 Hardware...
Страница 34: ......