
TWRS08PT60LAB
TWR
‐
S08PT60
Lab
Guide
Page
7
of
11
“IR
test
failed!”
If the received data is wrong, will show
“X”
, D8 starts to flash, so you need to move the board, and
keep D1 and Q1 to be aligned.
If the communication is successful, D10 flashes and the following message appears:
“IR
test
success!”
9
Lab
6
—SPI demo
This lab will show how the master and the slave communicate via SPI0 (8-bit) and SPI1 (16-bit with FIFO).
1.
Make sure that power is disconnected from the board. Close the serial port in P&E Terminal Window
by clicking
“
Close Port
”
.
2.
On primary side, connect SPI pins as table below:
Name
Connect (at primary side)
MISO
Connect B11 , B44
MOSI
Connect B10 , B45
SCLK
Connect B7, B48
CS
Connect B9, B46
3.
Open the serial port in the P&E Terminal Window. Apply the power to the board.
4.
Switch the demo mode from Lab 1 to Lab 5 by following the SW2 and SW3 steps in previous labs.
5.
Press and release the button labelled
“
SW3
”
, the following messages will be shown on the terminal:
“Test
SPI
communication,SPI0
is
the
master
and
SPI1
is
the
slave
with
FIFO!”
“If
success,
Green
light
flashes;”
“Otherwise,
Red
light
flashes”
“
Press
and
release
SW3
to
enter
into
TSI
demo”
6.
If SPI0 fails to send data to SPI1, it will show:
“Error:
SPI0
failed
to
write
data
to
SPI1!”
Meanwhile, the LED labelled
“
D8
”
will flash.
7.
If SPI0 fails to read data from SPI1, it will show:
“Error:
SPI0
failed
to
read
data
from
SPI1!”
Meanwhile, the LED labelled
“
D9
”
will flash.
8.
If both SPI0 write and read fail, it will show:
“Error:
SPI0
failed
to
communicate
with
SPI1!”
Meanwhile, the LED labelled
“
D9
”
and
“
D8
”
will flash.
9.
If test success, it will show message:
“SPI
communication
is
success!”
The LED labelled
“
D10
”
will flash.
10.
Press and release
“
SW3
”
to go back the first demo: TSI demo.