Docsity

MSCAN Lab Eleven Prelab Assignment for ECE 4510/5530 Microcontroller Applications - Prof. , Lab Reports of Microcomputers

Toggle sidebar
bg1
ECE 4510/5530 MICROCONTROLLER APPLICATIONS
Fall 2008
Prelab Assignment for Lab Eleven
The designated CAN Module is CAN1. The CPU clock rate is 8MHz.
1. Draw a detailed cable hookup diagram for Task One. It should include all
relevant Header pin numbers.
2. Develop a C program for Task One. The Baud rate should be set to 500Kbs.
Select the Oscillator Clock for the MSCAN clock source. Study Section 4.3.2 of
the MSCAN Data Sheets carefully to make your decision on the parameter
values for the Bit-Time and the Prescaler. Set up four 16-bit acceptance filters,
however, the Lab TA will define the ID and filter values. Work with a single
CAN transmit buffer.
The memory locations for the transmit and receive buffer arrays should be
0x1020 and 0x1060, respectively. The receive buffer area should be initialized to
all zeroes. The message to be transmitted should be made up of 32 characters.
It is to be terminated by a 0x00 (EOS) character (not included in the count) that
will not be transmitted. The program should keep on receiving and transmitting
messages on the CAN Bus. You should use both the MSCAN1 Transmit and
Receive Interrupts, respectively, to synchronize the CPU and the CAN1 Module.

Partial preview of the text

Download MSCAN Lab Eleven Prelab Assignment for ECE 4510/5530 Microcontroller Applications - Prof. and more Lab Reports Microcomputers in PDF only on Docsity!

ECE 4510/5530 MICROCONTROLLER APPLICATIONS

Fall 2008 Prelab Assignment for Lab Eleven

The designated CAN Module is CAN1. The CPU clock rate is 8MHz.

  1. Draw a detailed cable hookup diagram for Task One. It should include all relevant Header pin numbers.
  2. Develop a C program for Task One. The Baud rate should be set to 500Kbs. Select the Oscillator Clock for the MSCAN clock source. Study Section 4.3.2 of the MSCAN Data Sheets carefully to make your decision on the parameter values for the Bit-Time and the Prescaler. Set up four 16-bit acceptance filters , however, the Lab TA will define the ID and filter values. Work with a single CAN transmit buffer.

The memory locations for the transmit and receive buffer arrays should be 0x1020 and 0x1060 , respectively. The receive buffer area should be initialized to all zeroes. The message to be transmitted should be made up of 32 characters. It is to be terminated by a 0x00 ( EOS ) character ( not included in the count) that will not be transmitted. The program should keep on receiving and transmitting messages on the CAN Bus. You should use both the MSCAN1 Transmit and Receive Interrupts , respectively, to synchronize the CPU and the CAN1 Module.