Hi all,
I have something of a crazy idea here.
I'm aware of the BASIC scripting engine in Terminal mode, but it seems nothing so similar is available to binary IO users. I wonder if it would be possible to implement a simple "virtual machine" within the PIC to allow binary IO programs to submit a simple helper script to the Bus Pirate. This could allow both a more efficient IO scheme than GPIO bit-banging in a lot of custom cases, and could even allow things that cannot currently be done now.
Two things that come to mind that I have wanted are:
- My AVR HVSP programmer needs to bit-bang a custom 11-bit dual-serial protocol out of the BP, thus requiring 22 bytes down the UART per byte transferred to the AVR target. If I could write up a custom SPI-like engine in a virtual machine within the BP, I could get this down much much faster.
- The DHT11 and DHT22 temperature/humidity sensors use a custom 1-wire protocol that isn't the same as the Dallas 1-wire the BP already supports. This requires a higher-accuracy timing than can be achieved over bit-banging. If I were able to send a custom virtual machine program into the BP, I could actually implement this.
Two examples here then; one of something a VM could do better, and one of something a VM would make possible at all which currently isn't.
I know it's a bit of a crazy idea, but would anyone like to think about it?