NuMaker Modbus-RS485
Dependencies: Modbus nvt_rs485
Fork of modbus-over-rs485-sample by
README.md@22:e14caaceb177, 6 months ago (annotated)
- Committer:
- morgandu
- Date:
- Mon May 13 09:02:49 2024 +0000
- Revision:
- 22:e14caaceb177
- Parent:
- 3:6087ac36c45f
Update Modbus.lib and nvt_rs485.lib to support NuMaker-IoT-M487
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shliu1 |
3:6087ac36c45f | 1 | # Getting started sample with modbus-RS485 on mbed OS |
shliu1 |
3:6087ac36c45f | 2 | |
shliu1 |
3:6087ac36c45f | 3 | |
shliu1 |
3:6087ac36c45f | 4 | ### Import NuMaker-mbed-modbus-sample from on-line IDE |
shliu1 |
3:6087ac36c45f | 5 | 1. Please choose Nuvoton NuMaker-PFM-XXX as your target platform. |
shliu1 |
3:6087ac36c45f | 6 | 2. Please press the left-up icon "New", then choose "NuMaker Modbus-RS485" from the template list. |
shliu1 |
3:6087ac36c45f | 7 | 3. Your NuMaker-mbed-modbus-sample program is existed. |
shliu1 |
3:6087ac36c45f | 8 | |
shliu1 |
3:6087ac36c45f | 9 | #### Now compile |
shliu1 |
3:6087ac36c45f | 10 | Please press compile icon. |
shliu1 |
3:6087ac36c45f | 11 | |
shliu1 |
3:6087ac36c45f | 12 | #### Burn Code & Execute |
shliu1 |
3:6087ac36c45f | 13 | 1. Connect the board NuMaker-PFM-XXX with your PC by USB cable, then there will be one "mbed" disk. |
shliu1 |
3:6087ac36c45f | 14 | 2. Copy the built binary file into "mbed" disk on you PC. |
shliu1 |
3:6087ac36c45f | 15 | 3. Press device's reset button to execute, and you could get the below log by uart console. |
shliu1 |
3:6087ac36c45f | 16 | And LED1, LED2 and LED3 will flash. |
shliu1 |
3:6087ac36c45f | 17 | ------------------------------------------------------------------------------- |
shliu1 |
3:6087ac36c45f | 18 | We will set modbus slave ID-61(0x3d) for the device. |
shliu1 |
3:6087ac36c45f | 19 | |
shliu1 |
3:6087ac36c45f | 20 | -------------------------------------------------------------------------- |