Bus Pirate Edu Kit Exercise no.11

From DP

(Difference between revisions)
Jump to: navigation , search
(Bus Pirate Terminal)
(Bus Pirate Terminal)
Line 47: Line 47:
<nl2br>
<nl2br>
-
HiZ>m'''<<<'''
+
HiZ>m'''<<<the menu command'''
1. HiZ
1. HiZ
2. 1-WIRE
2. 1-WIRE
Line 58: Line 58:
x. exit(without change)
x. exit(without change)
-
(1)>4'''<<<'''
+
(1)>4'''<<<select the I2C mode'''
Set speed:
Set speed:
  1. ~5KHz
  1. ~5KHz
Line 65: Line 65:
  4. ~400KHz
  4. ~400KHz
-
(1)>3'''<<<'''
+
(1)>3'''<<<select 100KHz for signaling speed'''
Ready
Ready
-
I2C>P'''<<<'''
+
I2C>P'''<<<connect the pull up resistors (P command)'''
Pull-up resistors ON
Pull-up resistors ON
Warning: no voltage on Vpullup pin
Warning: no voltage on Vpullup pin
-
I2C>W'''<<<'''
+
I2C>W'''<<<turn on the power supplies(W command)'''
POWER SUPPLIES ON
POWER SUPPLIES ON
</nl2br>
</nl2br>
Line 77: Line 77:
<nl2br>
<nl2br>
-
I2C>(1)'''<<<'''
+
I2C>(1)'''<<<Search the I2C address space for connected devices'''
Searching I2C address space. Found devices at:
Searching I2C address space. Found devices at:
0xDE(0x6F W)
0xDE(0x6F W)
Line 86: Line 86:
<nl2br>
<nl2br>
-
I2C>[0xDE 0[0xDF r:9]'''<<<'''
+
I2C>[0xDE 0[0xDF r:9]'''<<<read 9 registers starting at address 0'''
I2C START BIT
I2C START BIT
-
WRITE: 0xDE ACK
+
WRITE: 0xDE ACK'''<<<send the reading address'''
-
WRITE: 0x00 ACK
+
WRITE: 0x00 ACK'''<<<send the starting register'''
-
I2C START BIT
+
I2C START BIT'''<<<restart communication'''
-
WRITE: 0xDF ACK
+
WRITE: 0xDF ACK'''<<<send the writing address'''
-
READ: 0x00  ACK 0x00  ACK 0x00  ACK 0x01  ACK 0x01  ACK 0x01  ACK 0x01  ACK 0x80  ACK 0x00
+
READ: 0x00  ACK 0x00  ACK 0x00  ACK 0x01  ACK 0x01  ACK 0x01  ACK 0x01  ACK 0x80  ACK 0x00'''<<<9 bytes read from registers'''
NACK
NACK
I2C STOP BIT
I2C STOP BIT
Line 101: Line 101:
<nl2br>
<nl2br>
-
I2C>[0xde 0 0x80]'''<<<'''
+
I2C>[0xde 0 0x80]'''<<<set the first bit of the registrar located at address 0'''
I2C START BIT
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0xDE ACK
Line 112: Line 112:
<nl2br>
<nl2br>
-
I2C>[0xde 0[0xdf r:9]'''<<<'''
+
I2C>[0xde 0[0xdf r:9]'''<<<read 9 registers starting at address 0''''
I2C START BIT
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0xDE ACK
Line 126: Line 126:
<nl2br>
<nl2br>
-
I2C>[0xde 0[0xdf r:9]'''<<<'''
+
I2C>[0xde 0[0xdf r:9]'''<<<read 9 registers starting at address 0''''
I2C START BIT
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0xDE ACK
Line 140: Line 140:
<nl2br>
<nl2br>
-
I2C>m'''<<<'''
+
I2C>m'''<<<the menu command'''
1. HiZ
1. HiZ
2. 1-WIRE
2. 1-WIRE
Line 151: Line 151:
x. exit(without change)
x. exit(without change)
-
(1)>1'''<<<'''
+
(1)>1'''<<<select the HiZ mode'''
Ready
Ready
HiZ>
HiZ>

Revision as of 14:42, 18 April 2013

Contents

Overview

BP EK E11 overview.jpg

The Circuit

BP EK E11 schematic.jpgBP EK E11 circuit.jpg

Breadboard legend

IC Location Breadboard wiring legend
IC PIN1 (+) PIN2 (-)
MCP7940M E14 E15
32KHz crystal C14 C15
C1 BB_-_left B14
C2 BB_-_left B15
Signal name Contact1 Contact2
5V BP_5V BB_+_left
5V BB_+_left BB_+_right
5V BB_+_right J14
5V BP_VPU BB_+_left
GND BP_GND BB_-_left
GND BB_-_left A17
MOSI BP_MOSI J17
CLK BP_CLK J16
  • 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 menu command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>4<<<select the I2C mode
Set speed:
1. ~5KHz
2. ~50KHz
3. ~100KHz
4. ~400KHz

(1)>3<<<select 100KHz for signaling speed
Ready
I2C>P<<<connect the pull up resistors (P command)
Pull-up resistors ON
Warning: no voltage on Vpullup pin
I2C>W<<<turn on the power supplies(W command)
POWER SUPPLIES ON



I2C>(1)<<<Search the I2C address space for connected devices
Searching I2C address space. Found devices at:
0xDE(0x6F W)




I2C>[0xDE 0[0xDF r:9]<<<read 9 registers starting at address 0
I2C START BIT
WRITE: 0xDE ACK<<<send the reading address
WRITE: 0x00 ACK<<<send the starting register
I2C START BIT<<<restart communication
WRITE: 0xDF ACK<<<send the writing address
READ: 0x00 ACK 0x00 ACK 0x00 ACK 0x01 ACK 0x01 ACK 0x01 ACK 0x01 ACK 0x80 ACK 0x00<<<9 bytes read from registers
NACK
I2C STOP BIT




I2C>[0xde 0 0x80]<<<set the first bit of the registrar located at address 0
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0x00 ACK
WRITE: 0x80 ACK
I2C STOP BIT



I2C>[0xde 0[0xdf r:9]<<<read 9 registers starting at address 0'
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0x00 ACK
I2C START BIT
WRITE: 0xDF ACK
READ: 0x82 ACK 0x00 ACK 0x00 ACK 0x21 ACK 0x01 ACK 0x01 ACK 0x01 ACK 0x80 ACK 0x00
NACK
I2C STOP BIT



I2C>[0xde 0[0xdf r:9]<<<read 9 registers starting at address 0'
I2C START BIT
WRITE: 0xDE ACK
WRITE: 0x00 ACK
I2C START BIT
WRITE: 0xDF ACK
READ: 0xD4 ACK 0x01 ACK 0x00 ACK 0x21 ACK 0x01 ACK 0x01 ACK 0x01 ACK 0x80 ACK 0x00
NACK
I2C STOP BIT



I2C>m<<<the menu command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>1<<<select the HiZ mode
Ready
HiZ>

Not Working?

Taking it further