16
Bus Pirate Support / Re: Linux - Bootloader-Programmer
Open Source Hardware
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.


import serialResults in
ser = serial.Serial('/dev/ttyUSB0', 9600,bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0)
ser.write("x55x55 0x02xFEx04")
#ser.write("x55x55x01x00x00xFFx47x05x04")
print "reading!"
x=ser.read(8);
for i in x:
print hex(ord(i)),
//Bootloader Operation Configuration
#define MAJOR_VERSION 0x01 //Bootloader FW version
#define MINOR_VERSION 0x02

diff -uNpr an851host.c{,.orig}
--- an851host.c 2009-07-24 17:07:17.000000000 +0200
+++ an851host.c.orig 2009-07-24 17:06:23.000000000 +0200
@@ -260,7 +260,7 @@ void setline(int fd, int flags, int spee
tcsetattr(fd, TCSANOW, &t);
}
-void usage(char* argv0)
+void usage(argv0)
{
printf("To read from flash Memory: n");
printf("tusage: %s --readflash --bytes <n> --startaddr <x>n", argv0);
@@ -280,7 +280,7 @@ void usage(char* argv0)
printf("t eg: %s --rows 3 --startaddr 0x01320nn", argv0);
printf("nTo reset PIC via bootloader: n");
- printf("tusage: %s --resetn",argv0);
+ printf("tusage: %s --resetn");
close(fd);
exit(-1);
}
import serial
ser = serial.Serial('/dev/ttyUSB0', 9600,bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0)
ser.write("x0Fx0Fx00x02xFEx04")
print "reading?"
print ser.read(4)
1-WIRE>(240)
1WIRE ROM COMMAND: SEARCH (0xF0)
Found devices at:
Macro 1WIRE address
1.0×2D 0xB7 0xDC 0xEF 0×00 0×00 0×00 0xF9
*DS2431 1K EEPROM
Found 0×01 devices.
The first 10 device IDs are available by MACRO, see (0).
1-WIRE>(85)(1) 0xf0 0×00 0×00 0 1 2 3 4 5 6 7
1WIRE BUS RESET OK
1WIRE WRITE ROM COMMAND: MATCH (0×55) *follow with 64bit address
1WIRE ADDRESS MACRO 1: 0×2D 0xB7 0xDC 0xEF 0×00 0×00 0×00 0xF9
WRITE: 0xF0
WRITE: 0×00
WRITE: 0×00
WRITE: 0×00
WRITE: 0×01
WRITE: 0×02
WRITE: 0×03
WRITE: 0×04
WRITE: 0×05
WRITE: 0×06
WRITE: 0×07
1-WIRE>(85)(1) 0xaa r:3 r:8 R:2 r:2
1WIRE BUS RESET OK
1WIRE WRITE ROM COMMAND: MATCH (0×55) *follow with 64bit address
1WIRE ADDRESS MACRO 1: 0×2D 0xB7 0xDC 0xEF 0×00 0×00 0×00 0xF9
WRITE: 0xAA
BULK READ 0×03 BYTES:
0xFF 0xFF 0xFF # WRONG – should be 0×00 0×00 0×07;
BULK READ 0×08 BYTES:
0xBF 0xE7 0×83 0xFF 0xFF 0xFF 0xFF 0xFF
BULK READ 0×02 BYTES:
0xFF 0xFF
BULK READ 0×02 BYTES:
0xFF 0xFF
