Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => Topic started by: ian on October 26, 2009, 06:10:06 pm

Title: Raw wire binary access mode
Post by: ian on October 26, 2009, 06:10:06 pm
I'm putting together an additional binary mode. This provides bitwise access to 2- and 3- wire protocols like the user mode raw-wire libraries.

    * 00000000 – Enter raw bitbang mode, reset to raw bitbang mode
    * 00000001 – Mode version string (RAW1)
   * 00000010 - I2C style start bit
   * 00000011 - I2C style stop bit
   * 00000100 - CS low (0) (respects hiz setting)
   * 00000101 - CS high (1)
   * 00000110 - Read byte
   * 00000111 - Read bit
   * 00001000 - Peek at input pin
   * 00001001 - Clock tick
   * 00001010 - Clock low
   * 00001011 - Clock high
   * 00001100 - Data low
   * 00001101 - Data high
    * 0001xxxx – Bulk transfer, send 1-16 bytes (0=1byte!)
    * 0100wxyz – Configure peripherals, w=power, x=pullups, y=AUX, z=CS
    * 0110000x – Set speed
    * 1000wxyz – Config, w=output type, x=3wire, y=lsb, z=n/a

This is useful for serial devices with funky interfaces, like Sensirion sensors, Smart Cards, and ShiftBrite modules.

Comments are welcome.
Title: Re: Raw wire binary access mode
Post by: ian on October 26, 2009, 06:12:17 pm
0010xxxx - Bulk clock ticks, 1-16 (?)
Title: Re: Raw wire binary access mode
Post by: audiohacked on October 27, 2009, 01:42:52 am
what would be a good default for the rawwire configuration operation? 0b000, 0b001, 0b100?
Title: Re: Raw wire binary access mode
Post by: ian on October 27, 2009, 08:14:59 am
It'll start it at 0000 (hi-z, 2-wire, MSB first, don't care).

You moved really fast on that one, wow!

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00862043360session_write_close ( )...(null):0
20.00902174936ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00902175712Database_MySQL->query( ).../DatabaseHandler.php:119
40.05382314424Database_MySQL->error( ).../Db-mysql.class.php:273