Rev 723 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 723 | Rev 743 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | 33 | ||
34 | 34 | ||
35 | int main(void) |
35 | int main(void) |
- | 36 | { |
|
36 | { |
37 | char i,Parity; // Bit-Counter and Parity Bit |
37 | char i,Parity; // Bit-Counter and Parity Bit |
38 | unsigned int timer=0; // Timer for Battery-Remember-Beeping |
38 | DDRA = 0b011; // PORT A INPUT: RESET; OUTPUT: Sync+Data |
39 | DDRA = 0b011; // PORT A INPUT: RESET; OUTPUT: Sync+Data |
39 | DDRB = 0b00000000; // PORT B INPUT: Jumper for Bypass |
40 | DDRB = 0b00000000; // PORT B INPUT: Jumper for Bypass |
40 | DDRD = 0b0000000; // PORT D INPUT: Switches + DX7-Sync |
41 | DDRD = 0b0000000; // PORT D INPUT: Switches + DX7-Sync |
Line 69... | Line 70... | ||
69 | Send(0,1); // When Low, Send High (Switched to "1") |
70 | Send(0,1); // When Low, Send High (Switched to "1") |
70 | } |
71 | } |
71 | } |
72 | } |
Line 72... | Line 73... | ||
72 | 73 | ||
- | 74 | Send(0,Parity); // Send Parity Bit |
|
- | 75 | ||
- | 76 | timer++; // Timer increase for Battery-Remember-Beeping |
|
- | 77 | if (timer == 6000) DDRB = 0b00000001; // 15 min 0.00 sec -> PB0 to GND |
|
- | 78 | if (timer == 6001) DDRB = 0b00000000; // 15 min 0.15 sec -> PB0 input again |
|
- | 79 | if (timer == 6002) DDRB = 0b00000010; // 15 min 0.30 sec -> PB1 to GND |
|
- | 80 | if (timer == 6003) DDRB = 0b00000000; // 15 min 0.45 sec -> PB1 input again |
|
73 | Send(0,Parity); // Send Parity Bit |
81 | if (timer == 6004) timer = 0; // 15 min 0.60 sec -> Timer reset (half delays on DX7se) |
74 | } |
82 | } |
75 | } |
- | |
76 | 83 | } |