Hardware Reference
In-Depth Information
both demo boards with another wire. Connect both ends of these two wires together with
120-
resistors (SSE256 has terminating resistors on board). The circuit connection is shown
in Figure L13.1.
Ω
SSE8680
SSE8680
A
B
CANH
CANL
CANL
CANH
120
Ω
120
Ω
Figure L13.1 CAN circuit connection for L13.1
Step 2
Write a program to be downloaded onto one of the demo boards (called board A) that
performs A/D conversion 10 times every second. Use the on-board potentiometer to
generate a voltage to be converted. Send out the A/D conversion result over the CAN
bus every 100 ms. Use the letter W as the identifier of the data frame. (Use the timing
parameters computed in E13.4 for the SSE256 demo board.)
Step 3
Write a program to be downloaded onto another demo board (called board B). This program
will send out the number of data frames received so far over the CAN bus. This program
will use the letter R as the identifier. After the number reaches 99, the program will reset
the number to 0 and start over again. Each digit of the decimal number is encoded in
ASCII code.
Step 4
Board A will display the number received over the CAN bus on eight LEDS in BCD
format.
Step 5
Board B will display the received A/D result in an LCD display.
L13.2 This assignment requires three students to wire three HCS12 demo boards together using
the CAN bus. Assign each of these three demo boards with a number 0, 1, and 2, respectively.
Write a program to be run on each demo board and perform the following procedure:
Step 1
Use two potentiometers (one is already on board) to emulate the temperature sensor and
barometric sensor outputs (0 to 5 V). Connect the demo boards as shown in Figure L13.2.
The temperature sensor represents the temperature range from 240 to 125°C. The
barometric sensor represents the pressure range from 948 to 1083.8 mbar.
Step 2
Each demo board performs temperature and barometric pressure measurements once per
second and stores the result in separate buffers formatted to have the same structure as a
transmit buffer. When storing the measurement data, use T i (for node i ) as the identifier
for temperature value and use P i (for node i ) as the identifier for pressure value.
Search WWH ::




Custom Search