const rf_bit_t sync_bit[] = { { 4, 1 },
{ 128, 0 },
{ 0, 0 } };
-
-const rf_bit_t pwm_0_bit[] = { {6, 1}, {17, 0}, { 0, 0 } }; // 1.86ms gesamt: { 0.46ms HIGH , 1.4ms LOW }
-const rf_bit_t pwm_1_bit[] = { {17, 1}, {6, 0}, { 0, 0 } }; //// 1.86ms gesamt: { 1.4ms HIGH , 0.46ms LOW }
-const rf_bit_t pwm_pause_bit[] = { {161, 0}, { 0, 0 } }; //// 12.9ms pause
+
+//WORKS @ alpha=0.0775ms
+//const rf_bit_t pwm_0_bit[] = { {7, 1}, {24, 0}, { 0, 0 } }; // 1.86ms gesamt: { 0.46ms HIGH , 1.4ms LOW }
+//const rf_bit_t pwm_1_bit[] = { {18, 1}, {24, 0}, { 0, 0 } }; // 1.86ms gesamt: { 1.4ms HIGH , 0.46ms LOW }
+//const rf_bit_t pwm_pause_bit[] = { {168, 0}, { 0, 0 } }; // 13ms pause
+
+//WORKS @ alpha=0.08ms
+const rf_bit_t pwm_0_bit[] = { {6, 1}, {23, 0}, { 0, 0 } }; // 1.86ms gesamt: { 0.46ms HIGH , 1.4ms LOW }
+const rf_bit_t pwm_1_bit[] = { {18, 1}, {23, 0}, { 0, 0 } }; // 1.86ms gesamt: { 1.4ms HIGH , 0.46ms LOW }
+const rf_bit_t pwm_pause_bit[] = { {162, 0}, { 0, 0 } }; // 13ms pause
typedef enum { ZERO = 0, ONE , FLOAT , SYNC , PWM0, PWM1, PWM_PAUSE, WORD_END } adbit_t;
typedef byte ad_bit_t;
-#define WORD_LEN 13
-#define MAX_WORD_LEN 26
-typedef ad_bit_t word_t[MAX_WORD_LEN+1];
+#define MAX_WORD_LEN 27
+typedef ad_bit_t word_t[MAX_WORD_LEN];
const rf_bit_t* bit_defs[] = { zero_bit, one_bit, float_bit, sync_bit, pwm_0_bit, pwm_1_bit, pwm_pause_bit };
byte alpha_cnt = 0;
byte bit_cnt = 0;
-byte current_word_len = WORD_LEN;
byte chunk_cnt = 0;
byte word_cnt = 0;
const ad_bit_t* current_word;
byte volatile frame_finished = 1;
-#define FRAME_LEN 8
+#define FRAME_LEN 10
#define A1_ON 0
#define A1_OFF 1
#define BLACK_B3_ON 26
#define BLACK_B3_OFF 27
+#define BLACK_C1_ON 28
+#define BLACK_C1_OFF 29
+#define BLACK_C2_ON 30
+#define BLACK_C2_OFF 31
+#define BLACK_C3_ON 32
+#define BLACK_C3_OFF 33
+
+#define BLACK_D1_ON 34
+#define BLACK_D1_OFF 35
+#define BLACK_D2_ON 36
+#define BLACK_D2_OFF 37
+#define BLACK_D3_ON 38
+#define BLACK_D3_OFF 39
+
+#define RSL336T_INDEX(SW,BT,OFF) 40+(2*4*SW)+(2*BT)+OFF
-const word_t words[] = {
+
+#define PWM_01 PWM0,PWM1
+#define PWM_00 PWM0,PWM0
+#define RSL336T_SWBT_1 PWM_00,PWM_01,PWM_01,PWM_01
+#define RSL336T_SWBT_2 PWM_01,PWM_00,PWM_01,PWM_01
+#define RSL336T_SWBT_3 PWM_01,PWM_01,PWM_00,PWM_01
+#define RSL336T_SWBT_4 PWM_01,PWM_01,PWM_01,PWM_00
+
+const word_t words[] = {
{ ZERO, ZERO, FLOAT, FLOAT, ZERO, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, FLOAT, SYNC, WORD_END, WORD_END,WORD_END}, // A1_ON
{ ZERO, ZERO, FLOAT, FLOAT, ZERO, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, SYNC, WORD_END, WORD_END,WORD_END}, // A1_OFF
{ ZERO, ZERO, FLOAT, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, FLOAT, SYNC, WORD_END, WORD_END,WORD_END }, // A2_ON
{ FLOAT, FLOAT, FLOAT, FLOAT, ZERO, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, FLOAT, SYNC, WORD_END, WORD_END,WORD_END }, // D1_ON
{ FLOAT, FLOAT, FLOAT, FLOAT, ZERO, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, SYNC, WORD_END, WORD_END,WORD_END }, // D1_OFF
{ FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, FLOAT, SYNC, WORD_END, WORD_END,WORD_END }, // D2_ON
-{ FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, SYNC, WORD_END, WORD_END,WORD_END }, // D2_OFF
+{ FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, FLOAT, FLOAT, ZERO, SYNC, WORD_END, WORD_END,WORD_END }, // D2_OFF
-{PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0,PWM0,PWM0, PWM_PAUSE, WORD_END}, // BLACK_A1_ON
-{PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0, PWM_PAUSE, WORD_END}, // BLACK_A1_OFF
+{PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0,PWM0,PWM0, PWM_PAUSE, WORD_END}, // BLACK_A1_ON
+{PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0, PWM_PAUSE, WORD_END}, // BLACK_A1_OFF
{PWM1,PWM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PWM1,PWM0,PWM0,PWM0, PWM_PAUSE, WORD_END}, // BLACK_D2_ON
+{PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0, PWM_PAUSE, WORD_END}, // BLACK_D2_OFF
+{PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0,PWM0,PWM0, PWM_PAUSE, WORD_END}, // BLACK_D3_ON
+{PWM0,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM1,PWM0,PWM1,PWM1,PWM1,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM0,PWM1,PWM1,PWM0, PWM_PAUSE, WORD_END}, // BLACK_D3_OFF
+
+{RSL336T_SWBT_1,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_1_ON
+{RSL336T_SWBT_1,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_1_OFF
+{RSL336T_SWBT_1,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_2_ON
+{RSL336T_SWBT_1,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_2_OFF
+{RSL336T_SWBT_1,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_3_ON
+{RSL336T_SWBT_1,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_3_OFF
+{RSL336T_SWBT_1,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_4_ON
+{RSL336T_SWBT_1,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_I_4_OFF
+
+{RSL336T_SWBT_2,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_1_ON
+{RSL336T_SWBT_2,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_1_OFF
+{RSL336T_SWBT_2,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_2_ON
+{RSL336T_SWBT_2,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_2_OFF
+{RSL336T_SWBT_2,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_3_ON
+{RSL336T_SWBT_2,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_3_OFF
+{RSL336T_SWBT_2,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_4_ON
+{RSL336T_SWBT_2,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_II_4_OFF
+
+{RSL336T_SWBT_3,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_1_ON
+{RSL336T_SWBT_3,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_1_OFF
+{RSL336T_SWBT_3,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_2_ON
+{RSL336T_SWBT_3,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_2_OFF
+{RSL336T_SWBT_3,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_3_ON
+{RSL336T_SWBT_3,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_3_OFF
+{RSL336T_SWBT_3,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_4_ON
+{RSL336T_SWBT_3,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_III_4_OFF
+
+{RSL336T_SWBT_4,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_1_ON
+{RSL336T_SWBT_4,RSL336T_SWBT_1,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_1_OFF
+{RSL336T_SWBT_4,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_2_ON
+{RSL336T_SWBT_4,RSL336T_SWBT_2,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_2_OFF
+{RSL336T_SWBT_4,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_3_ON
+{RSL336T_SWBT_4,RSL336T_SWBT_3,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_3_OFF
+{RSL336T_SWBT_4,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_01,PWM0, PWM_PAUSE, WORD_END}, // RSL366T_IV_4_ON
+{RSL336T_SWBT_4,RSL336T_SWBT_4,PWM_01,PWM_01,PWM_01,PWM_00,PWM0, PWM_PAUSE, WORD_END} // RSL366T_IV_4_OFF
};
// timer 1: 2 ms
TCCR1A = 0; // prescaler 1:8, WGM = 4 (CTC)
TCCR1B = 1<<WGM12 | 1<<CS11; //
+// OCR1A = 39; // (1+39)*8 = 320 -> 0.02ms @ 16 MHz -> 1*alpha
+//default: alpha=0.08
OCR1A = 159; // (1+159)*8 = 1280 -> 0.08ms @ 16 MHz -> 1*alpha
+// OCR1A = 154; // (1+154)*8 = 1240 -> 0.0775ms @ 16 MHz -> 1*alpha
// OCR1A = 207; // (1+207)*8 = 1664 -> 0.104ms @ 16 MHz -> 1*alpha
TCNT1 = 0; // reseting timer
TIMSK1 = 1<<OCIE1A; // enable Interrupt
send_frame(words[D2_ON]);
else if(command == 'h')
send_frame(words[D2_OFF]);
+
else if(command == 'I')
send_frame(words[BLACK_A1_ON]);
else if(command == 'i')
send_frame(words[BLACK_A3_ON]);
else if(command == 'k')
send_frame(words[BLACK_A3_OFF]);
+
else if(command == 'L')
send_frame(words[BLACK_B1_ON]);
else if(command == 'l')
send_frame(words[BLACK_B3_ON]);
else if(command == 'n')
send_frame(words[BLACK_B3_OFF]);
+
+ else if(command == 'O')
+ send_frame(words[BLACK_C1_ON]);
+ else if(command == 'o')
+ send_frame(words[BLACK_C1_OFF]);
+ else if(command == 'P')
+ send_frame(words[BLACK_C2_ON]);
+ else if(command == 'p')
+ send_frame(words[BLACK_C2_OFF]);
+ else if(command == 'Q')
+ send_frame(words[BLACK_C3_ON]);
+ else if(command == 'q')
+ send_frame(words[BLACK_C3_OFF]);
+
+ else if(command == 'R')
+ send_frame(words[BLACK_D1_ON]);
+ else if(command == 'r')
+ send_frame(words[BLACK_D1_OFF]);
+ else if(command == 'S')
+ send_frame(words[BLACK_D2_ON]);
+ else if(command == 's')
+ send_frame(words[BLACK_D2_OFF]);
else if(command == 'T')
+ send_frame(words[BLACK_D3_ON]);
+ else if(command == 't')
+ send_frame(words[BLACK_D3_OFF]);
+
+ else if (command == 'U')
+ send_frame(words[RSL336T_INDEX(0,0,0)]);
+ else if (command == 'u')
+ send_frame(words[RSL336T_INDEX(0,0,1)]);
+ else if (command == 'V')
+ send_frame(words[RSL336T_INDEX(0,1,0)]);
+ else if (command == 'v')
+ send_frame(words[RSL336T_INDEX(0,1,1)]);
+ else if (command == 'W')
+ send_frame(words[RSL336T_INDEX(0,2,0)]);
+ else if (command == 'w')
+ send_frame(words[RSL336T_INDEX(0,2,1)]);
+ else if (command == 'X')
+ send_frame(words[RSL336T_INDEX(0,3,0)]);
+ else if (command == 'x')
+ send_frame(words[RSL336T_INDEX(0,3,1)]);
+ else if (command == 'Y')
+ send_frame(words[RSL336T_INDEX(1,0,0)]);
+ else if (command == 'y')
+ send_frame(words[RSL336T_INDEX(1,0,1)]);
+ else if (command == 'Z')
+ send_frame(words[RSL336T_INDEX(1,1,0)]);
+ else if (command == 'z')
+ send_frame(words[RSL336T_INDEX(1,1,1)]);
+
+ else if(command == '*')
{
sensorEchoCommand(command);
printTemperature(onShieldTemp);
}
- else if(command == 'P')
+ else if(command == '?')
{
sensorEchoCommand(command);
printLightLevel();