Benutzer-Werkzeuge

Webseiten-Werkzeuge


hardware:buspirate

Bus Pirate

Hardware

Bus Pirate v3b

  • FTDI FT232RL
  • PIC 24FJ64GA002

Firmware

5.10

Versionsinformatiom

Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com

Beispiele

1-Wire

DS18B20

Device Suche
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>2
1WIRE routines (C) 2000 Michael Pearce GNU GPL
Ready
1-WIRE>W
Power supplies ON
1-WIRE>P
Pull-up resistors ON
1-WIRE>(0)
 0.Macro menu
Macro     1WIRE address
No device, try (ALARM) SEARCH macro first
1WIRE ROM COMMAND MACROs:
 51.READ ROM (0x33) *for single device bus
 85.MATCH ROM (0x55) *followed by 64bit address
 204.SKIP ROM (0xCC) *followed by command
 236.ALARM SEARCH (0xEC)
 240.SEARCH ROM (0xF0)

1-WIRE>(240)
SEARCH (0xF0)
Macro     1WIRE address
 1.0x28 0xD6 0xE9 0xC5 0x02 0x00 0x00 0xB6
   *DS18B20 Prog Res Dig Therm
Device IDs are available by MACRO, see (0).

1-WIRE>
Temperatur lesen

FIXME

1-WIRE>[0x44 [0x33 r:2
BUS RESET  OK
WRITE: 0x44
BUS RESET  OK
WRITE: 0x33
READ: 0x28 0xD6

I2C

AT24C512

Der Atmel AT24C512B ist ein 32KB (512K) EEPROM mit I2C (TWI) Interface.

  • Versorungsspannung 5.0V über Bus Pirate
  • Interne Pull-Up Widerstände des Bus Pirate auf SDA und SCL sollten ausreichen für diesen Test

Quelle: http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/#EEPROM

I2C Adresse

Die I2C EEPROM Adresse wird über Pin A0, A1 und A2 bestimmt.

Pin Bit
A0 0bxxxxAxxx
A1 0bxxxxxAxx
A2 0bxxxxxxAx

EEPROM Adresse: A0 LOW, A1 LOW, A2 LOW = 0b1010000x = 0xA0

Setup
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>4
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz

(1)>2
Ready
I2C>W
Power supplies ON
I2C>P
Pull-up resistors ON
I2C>i
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
CFG1:0xF9DF CFG2:0x3F7F
*----------*
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     SCL     SDA     -       -
P       P       P       I       I       I       I       I       I       I
GND     3.39V   5.12V   0.00V   5.13V   L       H       H       H       H
Power supplies ON, Pull-up resistors ON, Open drain outputs (H=Hi-Z, L=GND)
MSB set: MOST sig bit first, Number of bits read/write: 8
a/A/@ controls AUX pin
I2C (mod spd)=( 0 1 )
*----------*
I2C>
I2C Geräte (EEPROM) suchen
I2C>(1)
Searching I2C address space. Found devices at:
0xA0(0x50 W) 0xA1(0x50 R)
I2C>
  • Adresse 0xA0 = 0b10100000 dient zum Beschreiben
  • Adresse 0xA1 = 0b10100001 dient zum Lesen
EEPROM lesen (EEPROM enthält noch keine Daten)
I2C>[0b10100000 0 0] [0b10100001 r:8]
I2C START BIT
WRITE: 0xA0 ACK    <- Geräte Adresse (Bit 8 = low für Schreiben)
WRITE: 0x00 ACK    <- Daten Adresse 1. Byte
WRITE: 0x00 ACK    <- Daten Adresse 2. Byte
I2C STOP BIT
I2C START BIT
WRITE: 0xA1 ACK     <- Geräte Adresse (Bit 8 = HIGH für Lesen)
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF    <- EEPROM Antwort 8 "leere" Bytes
NACK                <- EEPROM Antwork NACK = OK
I2C STOP BIT
I2C>
EEPROM schreiben (1 Byte)
I2C>[0b10100000 0 0 0x1]
I2C START BIT
WRITE: 0xA0 ACK
WRITE: 0x00 ACK
WRITE: 0x00 ACK
WRITE: 0x01 ACK
I2C STOP BIT
I2C>
EEPROM schreiben (8 Byte)
I2C>[0b10100000 0 0 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08]
I2C START BIT
WRITE: 0xA0 ACK    <- Geräte Adresse (Bit 8 = low für Schreiben)
WRITE: 0x00 ACK    <- Daten Adresse 1. Byte
WRITE: 0x00 ACK    <- Daten Adresse 2. Byte
WRITE: 0x01 ACK    <- Daten 1. Byte
WRITE: 0x02 ACK    <- Daten 2. Byte
WRITE: 0x03 ACK    <- Daten 3. Byte
WRITE: 0x04 ACK    <- Daten 4. Byte
WRITE: 0x05 ACK    <- Daten 5. Byte
WRITE: 0x06 ACK    <- Daten 6. Byte
WRITE: 0x07 ACK    <- Daten 7. Byte
WRITE: 0x08 ACK    <- Daten 8. Byte
I2C STOP BIT
I2C>
Protokoll
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>4
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz

(1)>2
Ready
I2C>W
Power supplies ON
I2C>P
Pull-up resistors ON
I2C>>(1)
Searching I2C address space. Found devices at:
0xA0(0x50 W) 0xA1(0x50 R)

I2C>[0xA0 0x0 0x0 0x1]    <- 1 Byte schreiben auf EEPROM Adresse 0 0
I2C START BIT
WRITE: 0xA0 ACK
WRITE: 0x00 ACK
WRITE: 0x00 ACK
WRITE: 0x01 ACK
I2C STOP BIT
I2C>[0xA0 0x0 0x0] [0xA1 r:4]    <- 4 Byte lesen ab EEPROM Adresse 0 0
I2C START BIT
WRITE: 0xA0 ACK
WRITE: 0x00 ACK
WRITE: 0x00 ACK
I2C STOP BIT
I2C START BIT
WRITE: 0xA1 ACK
READ: 0x01  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT
I2C>[0xa0 0x0 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8]    <- 8 Byte schreiben ab EEPROM Adresse 0 0
I2C START BIT
WRITE: 0xA0 ACK
WRITE: 0x00 ACK
WRITE: 0x00 ACK
WRITE: 0x01 ACK
WRITE: 0x02 ACK
WRITE: 0x03 ACK
WRITE: 0x04 ACK
WRITE: 0x05 ACK
WRITE: 0x06 ACK
WRITE: 0x07 ACK
WRITE: 0x08 ACK
I2C STOP BIT
I2C>[0xa0 0x0 0x0] [0xa1 r:8]
I2C START BIT
WRITE: 0xA0 ACK
WRITE: 0x00 ACK
WRITE: 0x00 ACK
I2C STOP BIT
I2C START BIT
WRITE: 0xA1 ACK
READ: 0x01  ACK 0x02  ACK 0x03  ACK 0x04  ACK 0x05  ACK 0x06  ACK 0x07  ACK 0x08
NACK
I2C STOP BIT
I2C>
hardware/buspirate.txt · Zuletzt geändert: 2011/01/09 17:38 von pixeldoc