Bus Pirate Edu Kit Exercise no.9
From DP
(→Bus Pirate Terminal) |
(→Bus Pirate Terminal) |
||
Line 47: | Line 47: | ||
<nl2br> | <nl2br> | ||
- | HiZ>m | + | HiZ>m'''<<<the mode command''' |
1. HiZ | 1. HiZ | ||
2. 1-WIRE | 2. 1-WIRE | ||
Line 58: | Line 58: | ||
x. exit(without change) | x. exit(without change) | ||
- | (1)>5 | + | (1)>5'''<<<select the SPI mode<<<''' |
Set speed: | Set speed: | ||
1. 30KHz | 1. 30KHz | ||
Line 65: | Line 65: | ||
4. 1MHz | 4. 1MHz | ||
- | (1)> | + | (1)>3'''<<<set the SPI speed to 250 KHz<<<''' |
Clock polarity: | Clock polarity: | ||
1. Idle low *default | 1. Idle low *default | ||
2. Idle high | 2. Idle high | ||
- | (1)>1 | + | (1)>1'''<<<set clock polarity to ''idle low''''' |
Output clock edge: | Output clock edge: | ||
1. Idle to active | 1. Idle to active | ||
2. Active to idle *default | 2. Active to idle *default | ||
- | (2)>2 | + | (2)>2'''<<<set output clock edge to ''active to idle''''' |
Input sample phase: | Input sample phase: | ||
1. Middle *default | 1. Middle *default | ||
2. End | 2. End | ||
- | (1)>1 | + | (1)>1'''<<<select the middle input sample phase''' |
CS: | CS: | ||
1. CS | 1. CS | ||
2. /CS *default | 2. /CS *default | ||
- | (2)>2 | + | (2)>2'''<<<select the inverted CS signal (active low)''' |
Select output type: | Select output type: | ||
1. Open drain (H=Hi-Z, L=GND) | 1. Open drain (H=Hi-Z, L=GND) | ||
2. Normal (H=3.3V, L=GND) | 2. Normal (H=3.3V, L=GND) | ||
- | (1)>2 | + | (1)>2'''<<<set the output type to normal''' |
Ready | Ready | ||
- | SPI>W | + | SPI>W'''<<<turn on the power supplies''' |
POWER SUPPLIES ON | POWER SUPPLIES ON | ||
+ | </nl2br> | ||
+ | |||
+ | |||
+ | <nl2br> | ||
SPI>[0b110] | SPI>[0b110] | ||
/CS ENABLED | /CS ENABLED | ||
WRITE: 0x06 | WRITE: 0x06 | ||
/CS DISABLED | /CS DISABLED | ||
+ | </nl2br> | ||
+ | |||
+ | |||
+ | <nl2br> | ||
SPI>[0b10 0 1 2 3 4 5] | SPI>[0b10 0 1 2 3 4 5] | ||
/CS ENABLED | /CS ENABLED | ||
Line 108: | Line 116: | ||
WRITE: 0x05 | WRITE: 0x05 | ||
/CS DISABLED | /CS DISABLED | ||
+ | </nl2br> | ||
+ | |||
+ | |||
+ | <nl2br> | ||
SPI>[0b11 0 r:5] | SPI>[0b11 0 r:5] | ||
/CS ENABLED | /CS ENABLED | ||
Line 114: | Line 126: | ||
READ: 0x01 0x02 0x03 0x04 0x05 | READ: 0x01 0x02 0x03 0x04 0x05 | ||
/CS DISABLED | /CS DISABLED | ||
+ | </nl2br> | ||
+ | |||
+ | |||
+ | <nl2br> | ||
SPI>m | SPI>m | ||
1. HiZ | 1. HiZ |
Revision as of 13:31, 11 April 2013
Contents |
Overview
The Circuit
Breadboard legend
IC Location | Breadboard wiring legend | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
- The (+) and (-) next to PIN1 and PIN2 are intended for devices such as LEDs, where PIN1 should be the anode and connected to a higher potential then PIN2.
Bus Pirate Terminal
HiZ>m<<<the mode command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>5<<<select the SPI mode<<<
Set speed:
1. 30KHz
2. 125KHz
3. 250KHz
4. 1MHz
(1)>3<<<set the SPI speed to 250 KHz<<<
Clock polarity:
1. Idle low *default
2. Idle high
(1)>1<<<set clock polarity to idle low
Output clock edge:
1. Idle to active
2. Active to idle *default
(2)>2<<<set output clock edge to active to idle
Input sample phase:
1. Middle *default
2. End
(1)>1<<<select the middle input sample phase
CS:
1. CS
2. /CS *default
(2)>2<<<select the inverted CS signal (active low)
Select output type:
1. Open drain (H=Hi-Z, L=GND)
2. Normal (H=3.3V, L=GND)
(1)>2<<<set the output type to normal
Ready
SPI>W<<<turn on the power supplies
POWER SUPPLIES ON
SPI>[0b110]
/CS ENABLED
WRITE: 0x06
/CS DISABLED
SPI>[0b10 0 1 2 3 4 5]
/CS ENABLED
WRITE: 0x02
WRITE: 0x00
WRITE: 0x01
WRITE: 0x02
WRITE: 0x03
WRITE: 0x04
WRITE: 0x05
/CS DISABLED
SPI>[0b11 0 r:5]
/CS ENABLED
WRITE: 0x03
WRITE: 0x00
READ: 0x01 0x02 0x03 0x04 0x05
/CS DISABLED
SPI>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>1
Ready
HiZ>