-
-
Notifications
You must be signed in to change notification settings - Fork 20
Blinky Documentation
Blinky is a really simple standard VSCP demo firmware that demonstrates most aspects of the VSCP framework. The functionality is just a LED that can be controlled (blink, be on, be off) and a button that can send events (messages). Nothing more. But it is built to demonstrate VSCP functionality and VSCP registers are available, an MDF (module description file) is there, remote variables are in place and it has a decision matrix. With all its limited functionality, it is still a full-fledged VSCP device that can be used to experiment with to understand VSCP or be used as a starting point for your own VSCP project.
For a specific Blinky implementation using the VSCP link protocol, the number of simultaneous connections may vary. Some limited devices can have only one simultaneous connection, meaning that higher-level software like VSCP Works needs to poll the device, which gives a less than optimal user experience. For new implementations, two or more simultaneous connections give the best result.
All the information given here in the full documentation is also available in the MDF of the device. Like all other VSCP devices, the device itself holds information about the functionality of the device and can present this to a user that needs it at any time.
Every device can be seen as a black box. When you get the black box in your hands you know nothing about its functionality. Normally you need a manual to get this information. When using VSCP all the information you need to find at this stage is what communication method the device uses.
The MDF is available here on JSON format and here on XML format. The MDF is loaded automatically if you use the configuration functionality of VSCP Works
| Page | Offset | Description |
|---|---|---|
| 0 | 0 | Zone for module. Identifier of a device or a group of similar devices. Values written here are persistent and will be preserved after a reboot. |
| 0 | 1 | Subzone for module. Identifier of a device or a group of similar devices. Values written here are persistent and will be preserved after a reboot. |
| 0 | 2 | Status. Device status bits that show current status for the LED and the button. see [[]] |
| 0 | 3 | Control. A bit that controls the behavior of the module components. Values written here are persistent and will be preserved after a reboot. |
| 0 | 4 | MSB of LED blink interval in milliseconds. Values written here are persistent and will be preserved after a reboot. Default value is 0x01, 500 ms blink. |
| 0 | 5 | LSB of LED blink interval in milliseconds. Values written here are persistent and will be preserved after a reboot. Default value is 0xf4, 500 ms blink. |
| 0 | 6 | Byte 0 (MSB) of milliseconds counter. |
| 0 | 7 | Byte 1 of milliseconds counter |
| 0 | 8 | Byte 2 of milliseconds counter |
| 0 | 9 | Byte 3 (LSB) of milliseconds counter |
| 0 | 10 | Content of byte 0 when the button is pressed and Turn-on events are sent. Values written here are persistent and will be preserved after a reboot. |
| 0 | 11 | Button zone. Content of byte 1 when the button is pressed and Turn-on events are sent. Values written here are persistent and will be preserved after a reboot. |
| 0 | 12 | Button zone. Content of byte 2 when the button is pressed and Turn-on events are sent. Values written here are persistent and will be preserved after a reboot. |
| 0 | 60-92 | Decision matrix. Four rows. |
Set blink interval to zero to stop blinking (or use the control register).
The millisecond counter is updated every millisecond if enabled in the control register.
Write any value to any of the millisecond counter registers to set the millisecond counter value to zero.
| Bit | Description |
|---|---|
| 7 | Not used |
| 6 | Not used |
| 7 | Not used |
| 8 | Not used |
| 3 | Not used |
| 4 | Not used |
| 1 | Holds the state of the LED. 1 if the LED is lit, 0 if the LED is not lit. |
| 0 | Holds the state of the button. 1 if down, 0 if up. |
| Bit | Description |
|---|---|
| 7 | Enable LED. Control functionality will be active if set to one. |
| 6 | Enable Button. Button will perform it's functionality if set to one. |
| 7 | Not used |
| 8 | Not used |
| 3 | Send Turn-ON event when the button is pressed |
| 4 | Send START event when the button is pressed |
| 1 | Send STOP event when the button is released |
| 0 | Enable millisecond counter |
All VSCP devices have standard registers as part of the register abstracting model. GUID, URL for the MDF and other information can be obtained from this area. Most registers here are read only, but a few can be written.
The standard registers start at offset 0x80 for a level I device. For level II devices which use 32-bit address registers, they are at an offset of 0xFFFFFF80.
| Offset | Description |
|---|---|
| 0x80 | Alarm status. Read the register to reset all bits. Not used in the Blinky demo. |
| 0x84-0x88 | Five user registers. Can be set by the user for things like a coded location of the device or similar. Values written here are persistent and will be preserved after a reboot. |
| 0x91 | Node id. This is the LSB byte of the GUID of the device. Values written here are persistent and will be preserved after a reboot. |
Remote variables are a way to present a register space in a higher level way for higher level devices. It presents information in a form that user are used to. The following remote variables are defined for the Bliny device
| Type | Description |
|---|---|
| uint16_t | LED blink interval in milliseconds |
| uint32_t | Millisecond counter value |
The MDF of a Blinky points to pages defined below for information about a specific MDF item. This inf can be available in different languages just at the descriptions but currently only English inf is available.
- blinky-info-url-register-0
- blinky-info-url-register-1
- blinky-info-url-register-2
- blinky-info-url-register-3
- blinky-info-url-register-4
- blinky-info-url-register-4
- blinky-info-url-register-6
- blinky-info-url-register-6
- blinky-info-url-register-6
- blinky-info-url-register-6
- blinky-info-url-register-10
- blinky-info-url-register-11
- blinky-info-url-register-12
- blinky-info-url-remotevar-interval
- blinky-info-url-remotevar-counter
- blinky-info-url-alarm7
- blinky-info-url-event-10-9
- blinky-info-url-event-1026-2
- blinky-info-url-event-1024-20
- blinky-info-url-dmatrix
- blinky-info-url-dmatrix-action-0 NOOP
- blinky-info-url-dmatrix-action-1 Turn on/off LED
- blinky-info-url-dmatrix-action-1-arg-0 Control
- blinky-info-url-dmatrix-action-1-arg-0-value-0 Control = Off
- blinky-info-url-dmatrix-action-1-arg-0-value-1 Control = On
- blinky-info-url-dmatrix-action-1-arg-0-value-2 Control = Toggle
- blinky-info-url-dmatrix-action-1-arg-2 Turn ON LED
- blinky-info-url-dmatrix-action-1-arg-3 Turn OFF LED
- blinky-info-url-dmatrix-action-1-arg-4 Toggle LED
- blinky-info-url-dmatrix-action-1-arg-5 Start Blink
- blinky-info-url-dmatrix-action-1-arg-6 Sop Blink
The VSCP Project (https://www.vscp.org) - Copyright © 2000-2026 Åke Hedman, the VSCP Project