2024-11-08 00:11:06 +06:00
2024-11-08 00:46:09 +06:00
2024-11-08 00:46:09 +06:00
2024-11-08 00:11:06 +06:00
2024-11-08 00:11:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-08 00:11:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00
2024-11-11 21:40:43 +06:00
2024-11-09 00:36:06 +06:00
2024-11-09 00:36:06 +06:00

CH32-16-CH-EXT

A simple CH32V003-based extension board providing 16 outputs (2x 74HC595), primarily designed for controlling Chinese 16-relay modules (archive) over RS485. Uses 64-byte internal flash page for state persistence.

KiCad hardware design files are in the hw directory.

photo render

comm protocol

uses Modbus RTU protocol over RS485

Config

Baud Rate: 9600
Data Bits: 8
Stop Bits: 1
Parity: None

Modbus

  • Function Code: 0x06 (Write Single Register)
  • Default Slave Address: 0x01
  • Register Map:
    • Register 0x0000: Output Control Register (16 bits for controlling 16 relays)

Outputs

Each bit in the control register corresponds to one output:

  • Bit 0 controls Output 1
  • Bit 1 controls Output 2
  • etc.

Msg

Byte 0: Slave Address (0x01)
Byte 1: Function Code (0x06)
Byte 2: Register Address High (0x00)
Byte 3: Register Address Low (0x00)
Byte 4: Data High Byte
Byte 5: Data Low Byte
Byte 6: CRC Low Byte
Byte 7: CRC High Byte
Description
ch32v003 16-ch relay extension board through RS485
Readme 450 KiB
Languages
C 98.2%
Makefile 1.8%