N
Hi!
Short project description:
Call me nuts, but I decided to build my own ModBus over RS232 module. Hardware is up and running. Software basically working. The module is a CPU-board with 4 ports. On each port, up to 10 (tested with 4) extenders can be connected. Each extender has (currently) 16 INs or 16 OUTs. On every port, only one breed of extenders can be connected. That would make 1600 IOs. Hahahaha!
The CPU is a 8-core 32bit RISC µC running at 80 MHz. It is fast enough to handle commands at 115kBaud without being saturated.
Now to my question:
INs and OUTs have to be mapped to registers somehow. 16INs can't have the same register address as 16OUTs. Right?
Now if I say have 100 registers, does it make sense to assign all INs starting at regsiter #1 and all OUTs starting at register #50. Or is it necessary to be able to asign INs and OUTs to registers in a "randomn pattern".
What do I do with unassigned registers? Treat them as non-existent or have them sitting around for read/write without further effects?
Thanks,
Nick
Short project description:
Call me nuts, but I decided to build my own ModBus over RS232 module. Hardware is up and running. Software basically working. The module is a CPU-board with 4 ports. On each port, up to 10 (tested with 4) extenders can be connected. Each extender has (currently) 16 INs or 16 OUTs. On every port, only one breed of extenders can be connected. That would make 1600 IOs. Hahahaha!
The CPU is a 8-core 32bit RISC µC running at 80 MHz. It is fast enough to handle commands at 115kBaud without being saturated.
Now to my question:
INs and OUTs have to be mapped to registers somehow. 16INs can't have the same register address as 16OUTs. Right?
Now if I say have 100 registers, does it make sense to assign all INs starting at regsiter #1 and all OUTs starting at register #50. Or is it necessary to be able to asign INs and OUTs to registers in a "randomn pattern".
What do I do with unassigned registers? Treat them as non-existent or have them sitting around for read/write without further effects?
Thanks,
Nick