mbed-modbus-RTU (modbus slave to control 6 LEDs)
Dependencies: Modbus nvt_rs485
Fork of NuMaker-mbed-modbus-sample by
README.md@6:7fb2dc9292b7, 2017-01-05 (annotated)
- Committer:
- rkuo2000
- Date:
- Thu Jan 05 13:33:34 2017 +0000
- Revision:
- 6:7fb2dc9292b7
- Parent:
- 3:6087ac36c45f
mbed-modbus-RTU to control 6 LEDs
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 | -------------------------------------------------------------------------- |