I have started migrating content to my Hugo blog at https://blog.cavelab.dev, already migrated pages will redirect there.
Serial port IO module with 9 in and outputs
This module was part of the rack box project — which was terminated when I moved out of my first apartment.
RS232 interface module, with 9 inputs and 9 outputs. Uses an AVR ATmega8 microcontroller.
Details
OSID provides 9 digital inputs and outputs for the computer serial port. The outputs give GND when activated, max load pr. channel: 100mA. The inputs are triggered when they are connected to GND. By sending commands to the module one can change the status of the outputs, the module will confirm when the action is carried out.
It's also possible to ask for the current status of any in- or output, this is done by not sending a set value:
002:o:01:1 will set output 1 active. 002:o:01 will return the output 1 value.
The same can be done with the inputs:
002:i:01 will return the input 1 value.
All commands from the module is sent with a checksum.
I/O
Input
- PC0 Input 1
- PC1 Input 2
- PC2 Input 3
- PC3 Input 4
- PC4 Input 5
- PC5 Input 6
- PD5 Input 7
- PD6 Input 8
- PD7 Input 9
Outputs
- PB0 Output 1
- PB1 Output 2
- PB2 Output 3
- PB3 Output 4
- PB4 Output 5
- PB5 Output 6
- PB6 Output 7
- PB7 Output 8
- PD2 Output 9
- PD3 Lifesignal (to Module stability monitoring unit 2)
- PD4 Link activity
D-Sub 25-pin
- 5V +
- 5V -
- Input 1
- Input 2
- Input 3
- Input 4
- Input 5
- Input 6
- Input 7
- Input 8
- Input 9
- Output 1
- Output 2
- Output 3
- Output 4
- Output 5
- Output 6
- Output 7
- Output 8
- Output 9
- Lifesignal
Communication
Interfacing is done with RS-232, using MAX232 or MAX202.
13:53:08 => 002:i:06:1:122 13:53:08 <= 002:i:06:0 13:53:05 => 002:o:01:0:122 13:53:05 <= 002:o:01:0 13:53:03 => 002:o:01:1:123 13:53:03 <= 002:o:01:1 13:52:58 => 002:s:01:1:127 13:52:35 => 002:s:00:1:126
Serial settings
- Baud
- 9600
- Data bits
- 8
- Parity
- None
- Stop bits
- 1
- Start command
- 0
- Module ID
- 002
Source code

https://github.com/thomasjsn/AVR-Online-serial-interface/tree/v1.0