Introduction
The AIO has an onboard FRAM connected via I2C to the DSPIC33E (The Master). FRAM is used to keep track of the real-time change, Eeprom is used to store the settings. This document describes the FRAM memory locations used.
General Configuration Bytes (Page 0)
- Page 0 -> General data
- This byte represents the hour (time) of the last system startup.
- This byte represents the minute (time) of the last system startup.
- This byte represents the second (time) of the last system startup.
- This byte represents the day (date) of the last system startup.
- This byte represents the month (date) of the last system startup.
- This byte represents the year (date) of the last system startup.
- These 3 bytes represents the number of hours this system is ON. Byte 70 is the MSB (Most Significant Byte), Byte 72 is the LSB (Least Significant Byte).
Data output modules (Page 1-10)
- Page 1 – 10 -> Contains data of the output modules, 32 bytes per module, 8 modules per page, 10 pages (80 modules maximum, 640 outputs -> 0-639)
- This page is entirely used for output module 0-7:
- * Module 0: Byte0..31
- * Module 1: Byte32..63
- * ...
- This page is entirely used for output module 8-15:
- * Module 8: Byte0..31
- * Module 9: Byte32..63
- * ...
- This page is entirely used for output module 16-23:
- * Module 16: Byte0..31
- * Module 17: Byte32..63
- * ...
...
- This page is entirely used for output module 72-79:
- * Module 72: Byte0..31
- * Module 73: Byte32..63
- * ...
Following Module structure is used:
- Byte 0 (or 32 or 64 ...): Output state of this output (8 outputs, 1 bit per output, 0=OFF, 1=ON)
- Byte 1 (or 33 or 65 ...): Dimmer value of output 0 of the concerning module
- Byte 2 (or 34 or 66 ...): Dimmer value of output 1 of the concerning module
- Byte 3 (or 35 or 67 ...): Dimmer value of output 2 of the concerning module
- Byte 4 (or 36 or 68 ...): Dimmer value of output 3 of the concerning module
- Byte 5 (or 37 or 69 ...): Dimmer value of output 4 of the concerning module
- Byte 6 (or 38 or 70 ...): Dimmer value of output 5 of the concerning module
- Byte 7 (or 39 or 71 ...): Dimmer value of output 6 of the concerning module
- Byte 8 (or 40 or 72 ...): Dimmer value of output 7 of the concerning module
Data shutter modules (Page 11-19)
- Page 11-19 -> Contains the real live (not configuration) data of a shutter and Shutter Group
- Page 11 Byte 0-7: Information regarding Shutter 0
- Page 11 Byte 8-15: Information regarding Shutter 1
- Page 11 Byte 16-23: Information regarding Shutter 2
- ...
- Page 18 Byte 248-255: Information regarding Shutter 255
Every Roller/Shutter has 8 bytes:
- 1st byte: Shutter status
- BIT0: =1-> direction UP, =0-> direction DOWN
- BIT1: =1-> shutter is locked, =0-> shutter is unlocked
- 2nd: Current shutter position (LSB)
- 3rd: Current shutter position (MSB)
- 4th: Open
- 5th: Open
- 6th: Open
- 7th: Open
- 8th: Open
- Page 19 Byte 0-7: Information regarding Shutter Group 0
- Page 19 Byte 8-15: Information regarding Shutter Group 1
- Page 19 Byte 16-23: Information regarding Shutter Group 2
- ...
- Page 19 Byte 248-255: Information regarding Shutter Group 31
Every Shutter Group has 8 bytes:
- 1st byte: Shutter Group status
- BIT0: =1-> direction group UP, =0-> direction DOWN
- BIT1: =1-> shutter group is locked, =0-> shutter group is unlocked
- 2nd: Current shutter group position (LSB)
- 3rd: Current shutter group position (MSB)
- 4th: Open
- 5th: Open
- 6th: Open
- 7th: Open
- 8th: Open
Timer data (Page 19-28)
- Page 19-28 -> Contains the timer data of each timer output
- Page 19 Byte 0-3: Information regarding Output 0
- Page 19 Byte 4-7: Information regarding Output 1
- Page 19 Byte 8-11: Information regarding Output 2
- ...
- Page 28 Byte 252-255: Information regarding Output 639
Every Output has 4 bytes:
- 1st: Timer Type:
- 0-> No Timer
- 1-> 100ms Time
- 2-> 1s timer
- 3-> 1m (minute) timer
- 2nd: Timer value MSB (Most Significant Byte)
- 3rd: Timer value LSB (Least Significant Byte)
- 4th: Not in use yet