TG9541 / stm8ef-modbus

A lightweight framework for MODBUS RTU nodes in STM8 eForth that can do more than just I/O
https://github.com/TG9541/stm8ef/wiki/Board-C0135
MIT License
32 stars 12 forks source link

Better implementation for "holding" register access #30

Closed TG9541 closed 4 years ago

TG9541 commented 4 years ago

FC16 accesses holding registers in RAM from index 0 on. FC03 and FC06 act on EEPROM values from index 0 to 1023 and the holding variable in RAM from 1024 on. This needs to be fixed.

A MODBUSish way of doing things is using address ranges as a multiple of 10000. I guess that using holding registers in RAM (= process values) from 0 on and EEPROM from 10000 on (or higher) would be reasonable.