Does anyone have experience or information as to the possibility of bit-banging a 1-wire interface on Digi’s Connect platform?
Based on documentation from Dallas Semiconductor they specify three requirements for doing this.
The port (GPIO pin) must be bi-directional (which appears to be the case) and also be open-drain. From my limited electronics back ground this is meant to allow for multiple devices to be connected. Best I can tell none of the GPIO on the Connect ME’s processor are open-drain.
The system must be capable of generating a reliable and repeatable 1uS delay (normal speed) and 0.25uS delay (overdrive speed). I am not certain if this is feasible.
The communication operations must not be interrupted while being generated. I suppose this means I may have to disable interrupts while transmitting?
This is possible after the boot. For the first 15-20 seconds when booted it will be pulled high. Then you can set it any way you want. Digi did this because they used the spare pins for CTS, DTR, etc. which need to be set from startup - the problem is that they messed up anyone who wanted to use GPIOs. Kinda defeats the purpose, eh?
There is no way to get it into the uS range, try mS.
In regards to your first point, it is possible to control the initial state of the GPIO very early in the boot process. Take a look at platform/connectme/gpio.c, line 201 and gpio_def.h, line 117. The default is for all pins on PORTA to be set to their respective serial signals. You can, however, set them up to be inputs or outputs (as high or low being the default state). I discovered this when I began working with the provided Real-time Clock driver.
Thanks for the response. I guess the only question I have to investigate is whether the uS requirement in the 1-Wire specification is a hard requirement.
No, I sorta got SPI working. I set everything in gpio.c and gpio_def.h, and even went deeper to where it is orginally defined in netos_serl.c and set them.
The problem was that SPI would lock up for the 15-30 seconds that it took for the ConnectME to start booting and hose up the rest of the board. Digi told me that I need to recompile the boot loader to fix the issue, which is not an option.
As for speed, I got it so that it would transfer data, but was way too slow.