How do I How do I use 1-wire on BL4S200 discrete I/O port pin instead of using a serial port?

I’d like to use a discrete I/O pin on the BL4S200 SBC for 1-wire connection to a DS18B20 temperature sensor. The documentation and comments in the source files are confusing.

I’m using all three of the available serial ports, C, E, and F, for serial comms.

The 1_Wire_IF_Direct.LIB says configure the “serial port” but of course if using discrete I/O, not using a serial port. I want to use DIO0 on J10 for instance.

Thank you!
Chris

You should be able to use serial port A. You cannot use it while developing/debugging but it is available after that.

The libraries specifically use a serial port, not general I/O.

Thank you for answering. I’m specifically hoping to use the RIO I/O which are already brought out to connectors. Regarding the libraries: there are also bit-bang routines which do not use the serial library, it just happens that the default settings for the I/O bit bank still use the serial port.

I’ve looked at the bit-bang code, and it sets registers and shadow registers and seems to require a steep learning curve of digital I/O at the low level, vs using high-level functions/macros such as digout().

The bit-bang works, it’s easy enough to simply tell it to use bit-bang and it does. My problem is translating this capability over to RIO based IO.

The alternative you suggest might be possible if I’m willing to modify the board. Serial port A is brought out on the RCM connector, and TXA and RXA go to test pads. So I could blue-wire from the test pads to a connector somehow, maybe. And I can start debugging by writing out to a serial port instead of stdout, but using stdout is really handy.

So, if there’s any pointers from someone who has done it, or from Rabbit designers, I’d appreciate info to modify the bit-bang library to use RIO digital inputs and outputs, or hints to modify the BL4S200 board to support using Serial port A on both the 1-wire eval board and the BL4S200.

It would be really nice if the BL4S boards were more configurable, for instance a matrix for serial that cross-connects all TXn/RXn to hardware RS232/RS422/RS485. Or, to look at it the other way, if they’d wired those Rabbit net ports to be configurable as Rabbit net or else SPI or else Dallas 1-wire, matching the pinout of the RJ45 on the 1-wire application kit dev board.

Thank you,
Chris