Post: The general information of rimu modules
Module's Pin Map
R01 | R02 | R03 | R04 | R05 | R06 | R07 | R08 | R09 | R10 | R11 | |
---|---|---|---|---|---|---|---|---|---|---|---|
C1 | 3.3v ¹ | IO41 | IO42 | IO09 | IO40 | IO06 | IO05 | IO02 | IO01 | 5V ² | GND |
C2 | GND | IO20 | IO19 | IO12 ⁴ | IO44 | IO43 | IO13 | IO14 | IO45 | IO04 | 5V ³ |
Notes
- Maximum output current: 2A with host output.
- The module’s power is supplied by the battery of the host.
- Maximum output current: 200mA with host output.
- IO12 is used as an interrupt pin for the host, and the peripheral devices on the host are controlled by the
atmega328p processor. When the processor has completed the task, it will send a high signal to notify the
host. If the module has processed the signal, it will also send a high signal to notify the host. The host
can then read the corresponding register to obtain this information.
Update the firmware of the module
01. By host
- Use a screwdriver to open the module, refer to the diagram C-"UPGRADE" position, and set all three switches to ON position.
- Put the module’s cover on (after the shell is installed, the module can communicate with the host).
- Click the "update" button on the screen.
- After the update is successful, remove the module’s cover and set the switches back to OFF position.
- Put the module’s cover back on, and the module can communicate with the host again.
02. Other methods
- Use a USB-to-UART module to update the firmware. Since the program already has the Arduino firmware, it can be used to update the module’s firmware. Refer to the B diagram.
- Use a USB-ISP module to update the firmware. The USB-ISP module can be used to update the module’s firmware. Refer to the A diagram.
I2C for modules
01. Read module information by host
02. Module has new information, host needs to read immediately
- The host polls the interrupt bits of each module quickly to read the
values.
- If non-zero, it means that this module has new values, and the host reads the module’s values and clears the interrupt bit.
- If zero, skip this module.
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | R11 | |
---|---|---|---|---|---|---|---|---|---|---|---|
C1 | 3.3v | IO41 | IO42 | IO09 | IO40 | IO06 | IO05 | IO02 | IO01 | 5V | GND |
C2 | GND | IO20 | IO19 | GND | IO44 | IO43 | IO13 | IO14 | IO45 | IO04 | 5V |
I2C | – | SCL | SDA | – | – | – | – | – | – | – | – |
I2C | – | – | – | – | – | – | – | – | – | – | – |
UART
- Used for module updates, the switches on the module must be set to ON, and the host can then update the module. After the update is complete, the switches must be set to OFF.
- Use serial communication with the module, such as RS485, CAN, MAX512, etc. protocols. Serial communication.
- The Atmega328p can be used to control whether the module is communicating with the host via serial. This allows multiple modules to be used at the same time.
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | R11 | |
---|---|---|---|---|---|---|---|---|---|---|---|
C1 | 3.3v | IO41 | IO42 | IO09 | IO40 | IO06 | IO05 | IO02 | IO01 | 5V | GND |
C2 | GND | IO20 | IO19 | GND | IO44 | IO43 | IO13 | IO14 | IO45 | IO04 | 5V |
UART | – | – | – | – | – | – | RST | RX | TX | – | – |
UART | – | – | – | – | – | – | – | – | – | – | – |
01. USB Device Stack
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | R11 | |
---|---|---|---|---|---|---|---|---|---|---|---|
C1 | 3.3V | IO41 | IO42 | IO09 | IO40 | IO06 | IO05 | IO02 | IO01 | 5V | GND |
C2 | GND | IO20 | IO19 | GND | IO44 | IO43 | IO13 | IO14 | IO45 | IO04 | 5V |
USB | – | – | – | – | – | – | – | – | – | – | – |
USB | – | D+ | D- | – | RX | TX | – | – | – | – | – |
02. UART To USB
- If the logo and screen are on the same side of the host, it can be used as a keyboard.
- Otherwise, the USB cable can be used as a serial port, and can be used to update the host’s firmware.
SPI
Universal Registers
I2C Protocol
- The I2C host address range is 0x60 to 0x6F, corresponding to the 0 to F positions of the switch.
- The I2C communication rate is 400KHz.
- The common information register addresses are read-only.
Name definition
- Module number: Module number, different for each module, range: 0x0001-0xFFFF
- Communication protocol: Communication protocol this module has.
- Number of registers on the I2C bus: The number of registers on the I2C bus of this module.
- Hardware version: Module hardware version, module board version.
- Software version: Module software version, firmware version.
- Checksum: Checksum to verify if the module is correct.
- Module Name: Maximum 32 characters, start with WF1-.
Document Convention, 0x00
represents the register address, 0x00 represents the register
value.
Regsiters Table
Address | Function | R/W | Comments |
---|---|---|---|
0x00/02 |
Module No | R | |
0x01/03 |
Module No | R | |
0x04/05 |
Number of Registers | R | |
0x06 |
Protocol | R | |
0x07/08/09/0A/0B |
Pin Status | R | |
0x0C |
Hardware version | R | |
0x0D |
Software Version | R | |
0x0E |
Checksum | R | |
0x0F |
Interrupt Triggered | R/W | |
0x10->0x2F |
Module Name | R |
Module No
0x00
stores the high-order value, and0x01
stores the low-order value.0x02
and0x03
are the second time.
0x00
and 0x02
,should be 0x12, and the values of 0x01
and 0x03
should be 0x34. High 8 Bit
0x00/0x02 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
High 8 Bits | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Low 8 Bit
0x01/0x03 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Low 8 Bits | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Number of Registers
How many registers are on the I2C bus of this module, stored in 0x04 and 0x05.
Functions Used
SPI
, code>UART, etc. 0x06
, each bit represents the communication protocol used by this module, 0
means not used, 1
means used. 0x06 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Protocal | UPGRADE | INT | TBD | TBD | TBD | UART | SPI | I2C |
- I2C: This type of module supports I2C protocol.
- UPGRADE: This type of module can be upgraded by the host.
- INT: This type of module has an interrupt trigger function, which means that the host can receive a notification when the module’s status changes.
- UART: This type of module supports UART protocol.
- SPI: Some modules require faster data transfer, which uses SPI protocol.
- TBD: Reserved bit, not used.
Pin Status
All pins are represented by 2 bits, and the register address is 0x07, 0x08, 0x09, 0x0A. The definition is as follows:
0x07 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | IO | 05 | IO | 04 | IO | 02 | IO | 01 |
0x08 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | IO | 13 | IO | 12 | IO | 09 | IO | 06 |
0x09 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | IO | 40 | IO | 20 | IO | 19 | IO | 14 |
0x0A | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | IO | 44 | IO | 43 | IO | 42 | IO | 41 |
0x0B | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | IO | 45 |
Pin not used (0b00)
This pin is not connected to any line of this module, and can be used by other modules.
Pin was connected, but not used (0b01)
- The three pins used for upgrading, IO01 TXT, IO02 RXT, IO05 RST.
- USB D+ and D- pins, which are directly connected to the USB, cannot be used when using HID function. The host need check the HID function status before using these pins.
- USB UART Pins, IO43 TXT and IO44 RXT was connected to the USB, but also can be used for modules. The host need check the UART function status before using these pins.
- The Interrupt pin, IO12, is used for interrupt, and the host’s interrupt use the same pin.
- The pin is connected to the input pin of the IO switch chip, but is not used, such as the number pin of the 74HC4051 chip, which is not selected.
Pin is used, and can be modified by the host (0b10)
- The pin is connected to the input pin of the IO switch chip, and has been selected, and can be modified by the host.
Pin is used, and cannot be modified by the host (0b11)
- If used as I2C communication, then IO41 and IO42 cannot be modified.
- If used as SPI communication, then IO09, IO40, IO06 cannot be modified
- If used as UART communication, then IO01 TXT and IO02 RXT cannot be modified.
Hardware Version
The address is 0x0C
, the first release is 0x00
, and the subsequent version number is incremented.
0x0C | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Software Version
The address is 0x0D
, the first release is 0x00
, and the subsequent version number is incremented.
0x0D | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Checksum
The address is 0x0E
, the value is the low 8 bits of the checksum from 0x00
to 0x0D
. The checksum is calculated by adding all the values in the module’s registers, and then taking the low 8 bits of the result.
0x0E | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
---|---|---|---|---|---|---|---|---|
Val | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Interrupt Triggered
If the module has information that needs to be processed immediately by the host, by pulling the interrupt pin high, the host is notified. However, since multiple devices are using the interrupt pin, the host needs to check the values of different module registers to quickly determine which module needs to be processed. After the host has processed the interrupt, the host sets this bit to 0, and the module immediately pulls the interrupt pin low. The register address is 0x0F
.
Module Name
All private information registers for all modules start from 0x30
.
Modules List
- development kit
- pwm sw 5
Related resources
We’ve prepared an Arduino library on github for these modules to simplify coding. By simply including this library, you can focus on the specific functions of each module, the PDF of this article is also available.