Skip to content

Commit 8aac38b

Browse files
committed
Added readme.md files for both new DSPI demo sketches.
1 parent 180c1cd commit 8aac38b

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
DSPI_Demo Readme
2+
3+
This demo sketch simply shows how to use multiple SPI ports
4+
on the same chipKIT board with the DSPI library.
5+
6+
Setup:
7+
8+
This sketch assumes that your chipKIT board has at least 3 SPI ports,
9+
and that each SPI port's MOSI is connected to its MISO. This 'loopback'
10+
configuration simply sends data out and receives it back in again.
11+
12+
Each of the three SPI ports is set to a different clock speed so that
13+
it is clear which is which on the logic analyzer trace.
14+
15+
This sketch is set up for the Fubarino SD board, but it can easily
16+
be adopted to any chipKIT board by changing the number of DSPI objects
17+
and the chip select pins (if necessary - it's fine to leave them
18+
at their default values too).
19+
20+
Flow:
21+
22+
Data is sent out DSPI0, then received back in DSPI0. That received
23+
data is then sent out DSPI1, received back in DSPI1, then that received
24+
data is sent out DSPI2, received back in DSPI2, then printed out
25+
to the USB serial port to the PC. If there are any errors, you will not
26+
see the proper printout in the serial monitor.
27+
28+
Expected Output:
29+
30+
You should see "55:AA:A5 55:AA:A5 55:AA:A5".
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
DSPI_Int_Demo Readme
2+
3+
This demo sketch simply shows how to use multiple SPI ports
4+
on the same chipKIT board with the DSPI library, but doing the
5+
transfers at the same time using interrupts.
6+
7+
Setup:
8+
9+
This sketch assumes that your chipKIT board has at least 3 SPI ports,
10+
and that each SPI port's MOSI is connected to its MISO. This 'loopback'
11+
configuration simply sends data out and receives it back in again.
12+
13+
Each of the three SPI ports is set to a different clock speed so that
14+
it is clear which is which on the logic analyzer trace.
15+
16+
This sketch is set up for the Fubarino SD board, but it can easily
17+
be adopted to any chipKIT board by changing the number of DSPI objects
18+
and the chip select pins (if necessary - it's fine to leave them
19+
at their default values too).
20+
21+
Flow:
22+
23+
Three data output buffers and three data input buffers are created.
24+
Different data is sent out each SPI port, at different speeds.
25+
Each transaction is started at about the same time using interrupts
26+
(intTransfer()). The code then waits until all three transfers have
27+
completed, and prints out the data received from each port.
28+
29+
Expected Output:
30+
31+
You should see "11:22:33 44:55:66 77:88:99".

0 commit comments

Comments
 (0)