Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Servo USBDevice n-DAP_MODBUS_FEEDER_ADC
README.MD@1:d3ba80dea3dc, 2020-05-19 (annotated)
- Committer:
- chalikias
- Date:
- Tue May 19 16:23:56 2020 +0000
- Revision:
- 1:d3ba80dea3dc
- Child:
- 2:bb913072aed2
vacuum GPO added, README.MD and todo.txd also added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chalikias | 1:d3ba80dea3dc | 1 | # n-DAP_MODBUS_FEEDER_ADC: |
chalikias | 1:d3ba80dea3dc | 2 | ## Firmware for a PickPlace feeder control MODBUS board that controls an RC Servo and reads ADC |
chalikias | 1:d3ba80dea3dc | 3 | ## THIS IS PROJECT MANAGEMENT REPO FOR [mbed project](https://os.mbed.com/users/chalikias/code/n-DAP_MODBUS_FEEDER_ADC/) |
chalikias | 1:d3ba80dea3dc | 4 | |
chalikias | 1:d3ba80dea3dc | 5 | |
chalikias | 1:d3ba80dea3dc | 6 | |
chalikias | 1:d3ba80dea3dc | 7 | ### Current operation: |
chalikias | 1:d3ba80dea3dc | 8 | * Does not respond to read ADC MODBUS commands |
chalikias | 1:d3ba80dea3dc | 9 | * Sends the ADC value only-once after RESET |
chalikias | 1:d3ba80dea3dc | 10 | * When a Modbus Byte is received: |
chalikias | 1:d3ba80dea3dc | 11 | * Resets INDEX (a byte-counter) when character 0x20 is received |
chalikias | 1:d3ba80dea3dc | 12 | * Responds by setting a PWM Output to [9th MODBUS byte] value, to drive an RC-Servo |
chalikias | 1:d3ba80dea3dc | 13 | * Does not check for the MODBUS FUNCTION '...details', only resets a BYTE-COUNTER when received (ADDRESS BYTE) 0x20 and THEN responds on the 9th Byte (2nd MODBUS DATA byte) content |
chalikias | 1:d3ba80dea3dc | 14 | |
chalikias | 1:d3ba80dea3dc | 15 | ## MODBUS message structure |
chalikias | 1:d3ba80dea3dc | 16 | #### MODBUS FUNCTION send from MASTER for 'turn-on' or 'set_rc_Servo_Angle' (partially implemented on slave) |
chalikias | 1:d3ba80dea3dc | 17 | ``` |
chalikias | 1:d3ba80dea3dc | 18 | 00 ADDRESS 0x20 |
chalikias | 1:d3ba80dea3dc | 19 | 01 FUNCTION 0x10 |
chalikias | 1:d3ba80dea3dc | 20 | 02 REGISTER1 0x00 |
chalikias | 1:d3ba80dea3dc | 21 | 03 REGISTER1 0x01 |
chalikias | 1:d3ba80dea3dc | 22 | 04 NUMBERoFREGs 0x00 |
chalikias | 1:d3ba80dea3dc | 23 | 05 NUMBERoFREGs 0x01 |
chalikias | 1:d3ba80dea3dc | 24 | 06 NUMBER OF BYTES 0x00 |
chalikias | 1:d3ba80dea3dc | 25 | 07 NUMBER OF BYTES 0x02 |
chalikias | 1:d3ba80dea3dc | 26 | 08 DATA 0x00 |
chalikias | 1:d3ba80dea3dc | 27 | 09 DATA 0x00 |
chalikias | 1:d3ba80dea3dc | 28 | 10 CRC Xxxx |
chalikias | 1:d3ba80dea3dc | 29 | 11 CRC XxXX |
chalikias | 1:d3ba80dea3dc | 30 | ``` |
chalikias | 1:d3ba80dea3dc | 31 | |
chalikias | 1:d3ba80dea3dc | 32 | #### MODBUS COMMAND send from MASTER for 'read_pin' (not impemented yet on slave) |
chalikias | 1:d3ba80dea3dc | 33 | ``` |
chalikias | 1:d3ba80dea3dc | 34 | 00 ADDRESS 0x20 |
chalikias | 1:d3ba80dea3dc | 35 | 01 COMMAND 0x04 |
chalikias | 1:d3ba80dea3dc | 36 | 02 LENGTH 0x03 |
chalikias | 1:d3ba80dea3dc | 37 | 03 DATA 0x00 |
chalikias | 1:d3ba80dea3dc | 38 | 04 DATA 0x00 |
chalikias | 1:d3ba80dea3dc | 39 | 05 DATA 0x00 |
chalikias | 1:d3ba80dea3dc | 40 | 06 CRC XxXX |
chalikias | 1:d3ba80dea3dc | 41 | 07 CRC XxXX |
chalikias | 1:d3ba80dea3dc | 42 | ``` |