Document display interface commands

This commit is contained in:
Gregor Riepl 2021-03-06 13:08:33 +01:00
parent 9ca51d3e3b
commit f94aca6887
2 changed files with 31 additions and 1 deletions

View file

@ -86,9 +86,25 @@ cd poweriface/firmware/
make flash
```
### display
VFD (vaccum fluorescent display) interface.
This module requires firmware. Connect an Atmel programmer to the ISP header
of the poweriface board, make sure the programming jumper is shorted and run:
```shell
cd display
make flash
```
This module provides a direct interface to the display controller's instruction
and data registers. Refer to the 16T202DA1J data sheet, or any NEC dot matrix
display controller data sheet for instruction codes and memory layout.
### sensor
Environment sensor interface.
Environment sensor interface. Unused at the moment.
### wiring
@ -189,5 +205,7 @@ This is the list of supported message IDs:
|------------|------------|------------|--------------|------------|-------------------------|-------------|
| 0x10 | feedback | any | yes | 2 | 0b00000KJI 0bHGFEDCBA | Feedback module status report (A..E = end switch D..H, F..J = empty switch D..H, K = reset switch, 0 = off, 1 = on) |
| 0x11 | poweriface | any | yes | 2 | 0bHHHHHHHH 0bLLLLLLLL | Power module status report (0xHHLL are the contents of the 16-bit shift register) |
| 0x12 | display | any | yes | 1 | 0bHGFEDCBA | Display module button status (A..H = button 0..7, 0 = off, 1 = on) |
| 0x21 | controller | poweriface | no | 1 | 0b00000MMM | Start dispensing from slot M (1-5) or stop all dispensers (M = 0) |
| 0x22 | controller | display | no | 1-8 | 0bAAAAAAAA 0bDDDDDDDD* | Write address A into display instruction register and data bytes D (0-7 bytes) into data register |
| 0x4f | any | any | no | 1 | 0b0000000E | Enable (E = 1) or disable (E = 0) automatic status updates on all modules |

View file

@ -5,6 +5,7 @@
#define CAN_HOSTID_FEEDBACK 0x000
#define CAN_HOSTID_POWER 0x001
#define CAN_HOSTID_DISPLAY 0x002
#define CAN_HOSTID_BROADCAST 0x00f
#define CAN_HOSTID_MASK 0x00f
@ -40,6 +41,11 @@ typedef struct {
uint8_t bits[2];
} can_msg_power_status_t;
#define CAN_MSG_DISPLAY_STATUS 0x012
typedef struct {
uint8_t buttons;
} can_msg_display_status_t;
#define CAN_MSG_POWER_DISPENSE 0x021
typedef uint8_t can_msg_power_dispense_t;
#define CAN_MSG_POWER_DISPENSE_OFF 0x00
@ -49,6 +55,12 @@ typedef uint8_t can_msg_power_dispense_t;
#define CAN_MSG_POWER_DISPENSE_SLOT4 0x04
#define CAN_MSG_POWER_DISPENSE_SLOT5 0x05
#define CAN_MSG_DISPLAY_CMD 0x022
typedef struct {
uint8_t address;
uint8_t data;
} can_msg_display_cmd_t;
#define CAN_MSG_AUTO_STATUS 0x04f
typedef uint8_t can_msg_auto_status_t;
#define CAN_MSG_AUTO_STATUS_DISABLE 0x00