Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bus Pirate protocol support #13

Open
noupu opened this issue Nov 27, 2013 · 4 comments
Open

Bus Pirate protocol support #13

noupu opened this issue Nov 27, 2013 · 4 comments

Comments

@noupu
Copy link

noupu commented Nov 27, 2013

Adding support for either of the Bus Pirate protocols (binary or ASCII) will allow for Bus-ninja to be used as a AVR programmer, along with Avrdude.

@pfalcon
Copy link

pfalcon commented Nov 28, 2013

Yup. Noone bothered to implement it though ;-). I for example thought about that while hacking on busninja, but then figured out implementing my own adhoc protocol(s) for needs I had/have is easier and more scalable. Feel free to implement it of course.

@noupu
Copy link
Author

noupu commented Nov 29, 2013

Well, I just wish to use Avrdude with Bus Ninja.

A short look at the sources made me think that implementing the ASCII Bus Pirate protocol wouldn’t be too hard a task.

@noupu
Copy link
Author

noupu commented Nov 30, 2013

Per my reading of avrdude/buspirate.c, Avrdude interfaces the Bus Pirate as follows (expect + send pairs; ASCII mode).

""  \n\n
(anything)  #\n
"Are you sure?" y\n
RESET   m\n
(number)". SPI"(anything)">"    (number)\n
(number)"."(anything)"Normal (H=3.3V, L=GND)"(anything)">"  (number)\n
"SPI>"  (four 0x data bytes)
# cycle below this point
"WRITE 0x"(byte)" READ: 0x"(byte)"\n"(four times)">"    (four more 0x data bytes)

One way to implement this in Bus Ninja is to add the # (prompting for y, and responding RESET\n\n, but otherwise either reset or no-op) and m (menu) commands, while also providing the SPI> prompt in the latter command’s menu (it seems to be only needed once), and a Bus Pirate-compatible WRITE READ output as an option (either run-time or compile-time).

@Harvie
Copy link

Harvie commented Jun 26, 2019

Also add ability to use with sigrok / pulseview. Bus pirate is supported in logic analyzer mode:

https://sigrok.org/wiki/Supported_hardware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants