Subversion Repositories Projects

Rev

Rev 51 | Rev 53 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51 Rev 52
1
//############################################################################
1
//############################################################################
2
// - PWM CTRL 
2
// - PWM CTRL 
3
// - Main
3
// - Main
4
// - ATMEGA8 mit 8MHz
4
// - ATMEGA8 mit 8MHz
5
// - Nur für den privaten Gebrauch
5
// - Nur für den privaten Gebrauch
6
// - Keine Garantie auf Fehlerfreiheit
6
// - Keine Garantie auf Fehlerfreiheit
7
// - Kommerzielle Nutzung nur mit meiner Zustimmung
7
// - Kommerzielle Nutzung nur mit meiner Zustimmung
8
// - walter Meyer @ www.freakware.de
8
// - walter Meyer @ www.freakware.de
9
// - 11.12.2007
9
// - 11.12.2007
10
// - Make sure Fuses are programmed for internal 8 MHz RC Oscilator
10
// - Make sure Fuses are programmed for internal 8 MHz RC Oscilator
11
//############################################################################*/
11
//############################################################################*/
12
 
12
 
13
#include "main.h"
13
#include "main.h"
14
#include "uart.h"
14
#include "uart.h"
15
#include "twislave.h"
15
#include "twislave.h"
16
 
16
 
17
volatile unsigned int ppm_signal = 1500;
17
volatile unsigned int ppm_signal = 1500;
18
volatile unsigned char ppm_new = 0;
18
volatile unsigned char ppm_new = 0;
19
volatile unsigned char TMR1OvF = 0;
19
volatile unsigned char TMR1OvF = 0;
20
volatile unsigned int  TMR1MS;
20
volatile unsigned int  TMR1MS;
21
volatile unsigned char ch0;
21
volatile unsigned char ch0;
22
volatile unsigned char ch1;
22
volatile unsigned char ch1;
23
volatile unsigned char ch2;
23
volatile unsigned char ch2;
24
volatile unsigned char ch3;
24
volatile unsigned char ch3;
25
volatile unsigned char ch4;
25
volatile unsigned char ch4;
26
volatile unsigned char ch5;
26
volatile unsigned char ch5;
-
 
27
volatile unsigned char ch0_tmp;
-
 
28
volatile unsigned char ch1_tmp;
-
 
29
volatile unsigned char ch2_tmp;
-
 
30
volatile unsigned char ch3_tmp;
-
 
31
volatile unsigned char ch4_tmp;
-
 
32
volatile unsigned char ch5_tmp;
-
 
33
 
-
 
34
 
27
unsigned int timer;
35
unsigned int timer;
28
 
36
 
29
SIGNAL(SIG_OVERFLOW1)
37
SIGNAL(SIG_OVERFLOW1)
30
{
38
{
31
        TMR1OvF++;
39
        TMR1OvF++;
32
}
40
}
33
 
41
 
34
 
42
 
35
SIGNAL(SIG_INPUT_CAPTURE1)
43
SIGNAL(SIG_INPUT_CAPTURE1)
36
{
44
{
37
        static unsigned int pos_ICR;
45
        static unsigned int pos_ICR;
38
        static unsigned int ppm;
46
        static unsigned int ppm;
39
       
47
       
40
        if ((TCCR1B & (1<<ICES1)) != 0)                                         //rising edge
48
        if ((TCCR1B & (1<<ICES1)) != 0)                                         //rising edge
41
        {
49
        {
42
                TCCR1B &= ~(1<<ICES1);                                                          //set falling egde
50
                TCCR1B &= ~(1<<ICES1);                                                          //set falling egde
43
                TMR1OvF = 0;
51
                TMR1OvF = 0;
44
                pos_ICR = ICR1;
52
                pos_ICR = ICR1;
45
        }
53
        }
46
        else                                                                                    //falling edge
54
        else                                                                                    //falling edge
47
        {
55
        {
48
                TCCR1B |= (1<<ICES1);                                                           //set rising egde
56
                TCCR1B |= (1<<ICES1);                                                           //set rising egde
49
                ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536);
57
                ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536);
50
                if ((ppm > 600) && (ppm < 2400))
58
                if ((ppm > 600) && (ppm < 2400))
51
                {
59
                {
52
                        if (ppm > 2100) ppm = 2100;
60
                        if (ppm > 2100) ppm = 2100;
53
                        if (ppm < 900) ppm = 900;
61
                        if (ppm < 900) ppm = 900;
54
                        ppm = (ppm_signal * 7 + ppm) / 8;
62
                        ppm = (ppm_signal * 7 + ppm) / 8;
55
                        ppm_signal = ppm;
63
                        ppm_signal = ppm;
56
                        ppm_new = 1;
64
                        ppm_new = 1;
57
                }
65
                }
58
               
66
               
59
        }
67
        }
60
 
68
 
61
}
69
}
62
 
70
 
63
 
71
 
64
 
72
 
65
 
73
 
66
 
74
 
67
SIGNAL(SIG_OVERFLOW0)
75
SIGNAL(SIG_OVERFLOW0)
68
{
76
{
-
 
77
        // this function is called every 32us,
-
 
78
        // it is very important that it's execution time is as short as possible
-
 
79
        // currently it's about 20us
-
 
80
 
69
        static unsigned char counter;
81
        static unsigned char counter = 254;
70
        static unsigned char ms1;
82
        static unsigned char ms1 = 0;
71
        unsigned char PORTB_BAK;
83
        unsigned char PORTB_BAK;
72
        unsigned char PORTD_BAK;       
84
        unsigned char PORTD_BAK;       
73
 
85
 
74
        PORTB_BAK = PORTB;
86
        PORTB_BAK = PORTB;
75
        PORTD_BAK = PORTD;
87
        PORTD_BAK = PORTD;
76
 
88
 
77
        if (counter++ == 254)
89
        if (counter++ == 254)
78
        {
90
        {
79
                PORTB_BAK LEDON (CH0_B | CH1_B | CH2_B);
91
                PORTB_BAK LEDON (CH0_B | CH1_B | CH2_B);
80
                PORTD_BAK LEDON (CH3_D | CH4_D | CH5_D);       
92
                PORTD_BAK LEDON (CH3_D | CH4_D | CH5_D);       
-
 
93
                ch0_tmp = ch0;
-
 
94
                ch1_tmp = ch1;
-
 
95
                ch2_tmp = ch2;
-
 
96
                ch3_tmp = ch3;
-
 
97
                ch4_tmp = ch4;
-
 
98
                ch5_tmp = ch5;         
81
                counter = 0;
99
                counter = 0;
82
        }
100
        }
83
 
101
 
84
        if (ch0 == counter)     PORTB_BAK LEDOFF CH0_B;
102
        if (ch0_tmp == counter) PORTB_BAK LEDOFF CH0_B;
85
        if (ch1 == counter)     PORTB_BAK LEDOFF CH1_B;
103
        if (ch1_tmp == counter) PORTB_BAK LEDOFF CH1_B;
86
        if (ch2 == counter)     PORTB_BAK LEDOFF CH2_B;
104
        if (ch2_tmp == counter) PORTB_BAK LEDOFF CH2_B;
87
        if (ch3 == counter)     PORTD_BAK LEDOFF CH3_D;
105
        if (ch3_tmp == counter) PORTD_BAK LEDOFF CH3_D;
88
        if (ch4 == counter)     PORTD_BAK LEDOFF CH4_D;
106
        if (ch4_tmp == counter) PORTD_BAK LEDOFF CH4_D;
89
        if (ch5 == counter)     PORTD_BAK LEDOFF CH5_D;
107
        if (ch5_tmp == counter) PORTD_BAK LEDOFF CH5_D;
90
       
108
       
91
        PORTB = PORTB_BAK;
109
        PORTB = PORTB_BAK;
92
        PORTD = PORTD_BAK;
110
        PORTD = PORTD_BAK;
93
 
111
 
94
        if (ms1++ == 32)
112
        if (ms1++ == 32)
95
        {
113
        {
96
                ms1=0;
114
                ms1=0;
97
                TMR1MS++;
115
                TMR1MS++;
98
        }
116
        }
99
       
117
       
100
 
118
 
101
 
119
 
102
 
120
 
103
}
121
}
104
 
122
 
105
 
123
 
106
 
124
 
107
unsigned int SetDelay (unsigned int t)
125
unsigned int SetDelay (unsigned int t)
108
{
126
{
109
        unsigned char temp_hi;
127
        unsigned char temp_hi;
110
        unsigned char temp_lo;  
128
        unsigned char temp_lo;  
111
 
129
 
112
        temp_hi = (TMR1MS >> 8);
130
        temp_hi = (TMR1MS >> 8);
113
        temp_lo = (TMR1MS & 0xff);
131
        temp_lo = (TMR1MS & 0xff);
114
        if (temp_hi != (TMR1MS >> 8)) temp_hi = (TMR1MS >> 8);
132
        if (temp_hi != (TMR1MS >> 8)) temp_hi = (TMR1MS >> 8);
115
 
133
 
116
        return(((temp_hi << 8) | temp_lo)  + t + 1);                                            
134
        return(((temp_hi << 8) | temp_lo)  + t + 1);                                            
117
 
135
 
118
}
136
}
119
 
137
 
120
 
138
 
121
char CheckDelay(unsigned int t)
139
char CheckDelay(unsigned int t)
122
{
140
{
123
        unsigned char temp_hi;
141
        unsigned char temp_hi;
124
        unsigned char temp_lo;  
142
        unsigned char temp_lo;  
125
 
143
 
126
        temp_hi = (TMR1MS >> 8);
144
        temp_hi = (TMR1MS >> 8);
127
        temp_lo = (TMR1MS & 0xff);
145
        temp_lo = (TMR1MS & 0xff);
128
        if (temp_hi != (TMR1MS >> 8)) temp_hi = (TMR1MS >> 8);
146
        if (temp_hi != (TMR1MS >> 8)) temp_hi = (TMR1MS >> 8);
129
 
147
 
130
        return(((t - ((temp_hi << 8) | temp_lo)) & 0x8000) >> 9);
148
        return(((t - ((temp_hi << 8) | temp_lo)) & 0x8000) >> 9);
131
 
149
 
132
}
150
}
133
 
151
 
134
 
152
 
135
 
153
 
136
 
154
 
137
/*##############################################################################*/
155
/*##############################################################################*/
138
void StartPWM(void)
156
void StartPWM(void)
139
{
157
{
140
        //Timer 0 Config for getting right timing for IR Pattern
158
        //Timer 0 Config for getting right timing for IR Pattern
141
        TCCR0 = (0<<CS02)|(0<<CS01)|(1<<CS00);          // (@8MHz) =  1/8us Clk = 256/8 = 32us overflow
159
        TCCR0 = (0<<CS02)|(0<<CS01)|(1<<CS00);          // (@8MHz) =  1/8us Clk = 256/8 = 32us overflow
142
        TIMSK setbit (1<<TOIE0);                                                // enable Int
160
        TIMSK setbit (1<<TOIE0);                                                // enable Int
143
 
161
 
144
}
162
}
145
 
163
 
146
 
164
 
147
 
-
 
148
 
165
 
149
/*##############################################################################*/
166
/*##############################################################################*/
150
void StartPPM(void)
167
void StartPPM(void)
151
{
168
{
152
       
169
       
153
        //global timer1 Config
170
        //global timer1 Config
154
        TCCR1A =        (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)|
171
        TCCR1A =        (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)|
155
                                (0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11);                
172
                                (0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11);                
156
    TCCR1B =    (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)|
173
    TCCR1B =    (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)|
157
                                (0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10);                               //ICP_POS_FLANKE
174
                                (0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10);                               //ICP_POS_FLANKE
158
 
175
 
159
        // interrupts
176
        // interrupts
160
        TIMSK |=        (1<<TICIE1)|(1<<TOIE1);                                                                 //ICP_INT_ENABLE and TIMER1_INT_ENABLE
177
        TIMSK |=        (1<<TICIE1)|(1<<TOIE1);                                                                 //ICP_INT_ENABLE and TIMER1_INT_ENABLE
161
 
178
 
162
}
179
}
163
 
180
 
164
 
181
 
-
 
182
 
165
 
183
/*##############################################################################*/
166
int GetPPM(void)
184
int GetPPM(void)
167
{
185
{
168
        //this routines seems to be nesseccary, as reading a 16 bit value
186
        //this routines seems to be nesseccary, as reading a 16 bit value
169
        //on a 8 bit machine is not atomic, so if an interrupt apears between reading
187
        //on a 8 bit machine is not atomic, so if an interrupt apears between reading
170
        //low and high byte of the 16 bit value a wrong result is possible
188
        //low and high byte of the 16 bit value a wrong result is possible
171
       
189
       
172
        unsigned char intmask;
190
        unsigned char intmask;
173
        unsigned int  ppm_temp;
191
        unsigned int  ppm_temp;
174
 
192
 
175
        intmask = TIMSK;                                //backup interupt enable bits
193
        intmask = TIMSK;                                //backup interupt enable bits
176
        TIMSK &= ~(1<<TICIE1);                  //disable ppm interrupt
194
        TIMSK &= ~(1<<TICIE1);                  //disable ppm interrupt
177
        ppm_temp = ppm_signal;
195
        ppm_temp = ppm_signal;
178
        TIMSK = intmask;                                //restore interupt enable bits
196
        TIMSK = intmask;                                //restore interupt enable bits
179
        return(ppm_temp);                               //return ppm_signal
197
        return(ppm_temp);                               //return ppm_signal
180
 
198
 
181
}
199
}
182
 
200
 
183
 
201
 
184
/*##############################################################################*/
202
/*##############################################################################*/
185
// MAIN
203
// MAIN
186
/*##############################################################################*/
204
/*##############################################################################*/
187
int main (void)
205
int main (void)
188
{
206
{
189
        unsigned int    i;
207
        unsigned int    i;
190
        unsigned char   colorState;
208
        unsigned char   colorState;
191
        unsigned char   nextcolorState;
209
        unsigned char   nextcolorState=0;
192
 
210
 
193
    DDRB  = (CH0_B|CH1_B|CH2_B);
211
    DDRB  = (CH0_B|CH1_B|CH2_B);
194
    PORTB = 0x00;
212
    PORTB = 0x00;
195
 
213
 
196
    DDRC  = (ledred);
214
    DDRC  = (ledred);
197
    PORTC = 0x00;
215
    PORTC = 0x00;
198
 
216
 
199
    DDRD  = (ledgreen|CH3_D|CH4_D|CH5_D);
217
    DDRD  = (ledgreen|CH3_D|CH4_D|CH5_D);
200
    PORTD = 0x00;
218
    PORTD = 0x00;
201
 
219
 
202
        ch0 = 0;
220
        ch0 = 0;
203
        ch1 = 0;
221
        ch1 = 0;
204
        ch2 = 0;
222
        ch2 = 0;
205
        ch3 = 0;
223
        ch3 = 0;
206
        ch4 = 0;
224
        ch4 = 0;
207
        ch5 = 0;       
225
        ch5 = 0;       
208
 
226
 
209
        //StartUART();
227
        //StartUART();
210
        StartPPM();
228
        StartPPM();
211
        //StartI2C();
229
        //StartI2C();
212
        StartPWM();
230
        StartPWM();
213
        sei();
231
        sei();
214
 
232
 
215
 
233
 
216
        //rot > Violett > Blau > Türkis > Grün > Gelb >
234
        // Farbablauf: rot > Violett > blau > tuerkis > gruen > gelb >
217
 
235
 
218
 
236
 
219
        colorState = 0;
237
        colorState = 0;
220
   
238
   
221
    while (1)
239
    while (1)
222
        {
240
        {
223
 
241
 
224
                //printf("%d ",ppm_signal);
242
                //printf("%d ",ppm_signal);
225
 
243
 
226
                for (i=0; i<=255; i++)
244
                for (i=0; i<=255; i++)
227
                {
245
                {
228
                        switch(colorState)
246
                        switch(colorState)
229
                        {
247
                        {
230
                        case 0:
248
                        case 0:
231
                                ch0 = i;                        //fade in (ch0) red
249
                                ch0 = i;                                //fade in (ch0) red
232
                                nextcolorState = 2;
250
                                nextcolorState = 2;
233
                                break;
251
                                break;
234
 
252
 
235
                        case 2:
253
                        case 2:
236
                                ch1 = i;                                //fade in (ch1) blue to get purple (red + blue)
254
                                ch1 = i;                                //fade in (ch1) blue to get pure purple (red + blue)
237
                                nextcolorState = 4;
255
                                nextcolorState = 4;
238
                                break;
256
                                break;
239
 
257
 
240
                        case 4:
258
                        case 4:
241
                                ch0 = 255 - i;                  //fade out (ch0) red to get pure blue
259
                                ch0 = 255 - i;                  //fade out (ch0) red to get pure blue
242
                                nextcolorState = 6;
260
                                nextcolorState = 6;
243
                                break;
261
                                break;
244
 
262
 
245
                        case 6:
263
                        case 6:
246
                                ch2 = i;                                //fade in  (ch2) green to get cyan (blue + green)
264
                                ch2 = i;                                //fade in  (ch2) green to get pure cyan (blue + green)
247
                                nextcolorState = 8;                            
265
                                nextcolorState = 8;                            
248
                                break;
266
                                break;
249
 
267
 
250
                        case 8:
268
                        case 8:
251
                                ch1 = 255 - i;                  //fade out (ch1) blue to get pure green
269
                                ch1 = 255 - i;                  //fade out (ch1) blue to get pure green
252
                                nextcolorState = 10;
270
                                nextcolorState = 10;
253
                                break;
271
                                break;
254
 
272
 
255
                        case 10:
273
                        case 10:
256
                                ch0 = i;                                //fade in  (ch0) red to get yellow (green + red)
274
                                ch0 = i;                                //fade in  (ch0) red to get yellow pure (green + red)
257
                                nextcolorState = 12;                           
275
                                nextcolorState = 12;                           
258
                                break;
276
                                break;
259
 
277
 
260
                        case 12:
278
                        case 12:
261
                                ch2 = 255 - i;                  //fade out (ch2) green to get pure red
279
                                ch2 = 255 - i;                  //fade out (ch2) green to get pure red
262
                                nextcolorState = 0;
280
                                nextcolorState = 0;
263
                                break;
281
                                break;
264
                        }
282
                        }
265
 
283
 
266
 
284
 
267
                        timer = SetDelay(1);
285
                        timer = SetDelay(5);            //wait 10ms
268
                        while (!CheckDelay(timer));
286
                        while (!CheckDelay(timer));
269
                }
287
                }
270
                       
288
                       
271
                colorState = nextcolorState;
289
                colorState = nextcolorState;
-
 
290
 
272
                timer = SetDelay(3);
291
                timer = SetDelay(3);                    //hold pure colors for additional 3ms
273
                while (!CheckDelay(timer));
292
                while (!CheckDelay(timer));
274
 
293
 
275
 
294
 
276
        }
295
        }
277
 
296
 
278
 
297
 
279
}
298
}
-
 
299
 
-
 
300
 
-
 
301
 
-
 
302
/*
-
 
303
 170 00fa 1F92                  push __zero_reg__
-
 
304
 171 00fc 0F92                  push __tmp_reg__
-
 
305
 172 00fe 0FB6                  in __tmp_reg__,__SREG__
-
 
306
 173 0100 0F92                  push __tmp_reg__
-
 
307
 174 0102 1124                  clr __zero_reg__
-
 
308
 175 0104 2F93                  push r18
-
 
309
 176 0106 3F93                  push r19
-
 
310
 177 0108 8F93                  push r24
-
 
311
 178 010a 9F93                  push r25
-
 
312
 181 010c 38B3                  in r19,56-0x20
-
 
313
 184 010e 22B3                  in r18,50-0x20
-
 
314
 187 0110 8091 0000             lds r24,counter.1797
-
 
315
 188 0114 8F5F                  subi r24,lo8(-(1))
-
 
316
 189 0116 8093 0000             sts counter.1797,r24
-
 
317
 190 011a 8F3F                  cpi r24,lo8(-1)
-
 
318
 191 011c 01F4                  brne .L15
-
 
319
 193 011e 3E60                  ori r19,lo8(14)
-
 
320
 195 0120 2863                  ori r18,lo8(56)
-
 
321
 197 0122 8091 0000             lds r24,ch0
-
 
322
 198 0126 8093 0000             sts ch0_tmp,r24
-
 
323
 200 012a 8091 0000             lds r24,ch1
-
 
324
 201 012e 8093 0000             sts ch1_tmp,r24
-
 
325
 203 0132 8091 0000             lds r24,ch2
-
 
326
 204 0136 8093 0000             sts ch2_tmp,r24
-
 
327
 206 013a 8091 0000             lds r24,ch3
-
 
328
 207 013e 8093 0000             sts ch3_tmp,r24
-
 
329
 209 0142 8091 0000             lds r24,ch4
-
 
330
 210 0146 8093 0000             sts ch4_tmp,r24
-
 
331
 212 014a 8091 0000             lds r24,ch5
-
 
332
 213 014e 8093 0000             sts ch5_tmp,r24
-
 
333
 215 0152 1092 0000             sts counter.1797,__zero_reg__
-
 
334
 218 0156 8091 0000             lds r24,ch0_tmp
-
 
335
 219 015a 9091 0000             lds r25,counter.1797
-
 
336
 220 015e 8917                  cp r24,r25
-
 
337
 221 0160 01F4                  brne .L17
-
 
338
 222 0162 377F                  andi r19,lo8(-9)
-
 
339
 225 0164 8091 0000             lds r24,ch1_tmp
-
 
340
 226 0168 8917                  cp r24,r25
-
 
341
 227 016a 01F4                  brne .L19
-
 
342
 228 016c 3B7F                  andi r19,lo8(-5)
-
 
343
 231 016e 8091 0000             lds r24,ch2_tmp
-
 
344
 232 0172 8917                  cp r24,r25
-
 
345
 233 0174 01F4                  brne .L21
-
 
346
 234 0176 3D7F                  andi r19,lo8(-3)
-
 
347
 237 0178 8091 0000             lds r24,ch3_tmp
-
 
348
 238 017c 8917                  cp r24,r25
-
 
349
 239 017e 01F4                  brne .L23
-
 
350
 240 0180 277F                  andi r18,lo8(-9)
-
 
351
 243 0182 8091 0000             lds r24,ch4_tmp
-
 
352
 244 0186 8917                  cp r24,r25
-
 
353
 245 0188 01F4                  brne .L25
-
 
354
 246 018a 2F7E                  andi r18,lo8(-17)
-
 
355
 249 018c 8091 0000             lds r24,ch5_tmp
-
 
356
 250 0190 8917                  cp r24,r25
-
 
357
 251 0192 01F4                  brne .L27
-
 
358
 252 0194 2F7D                  andi r18,lo8(-33)
-
 
359
 255 0196 38BB                  out 56-0x20,r19
-
 
360
 257 0198 22BB                  out 50-0x20,r18
-
 
361
 259 019a 8091 0000             lds r24,ms1.1798
-
 
362
 260 019e 8F5F                  subi r24,lo8(-(1))
-
 
363
 261 01a0 8093 0000             sts ms1.1798,r24
-
 
364
 262 01a4 8132                  cpi r24,lo8(33)
-
 
365
 263 01a6 01F4                  brne .L31
-
 
366
 265 01a8 1092 0000             sts ms1.1798,__zero_reg__
-
 
367
 267 01ac 8091 0000             lds r24,TMR1MS
-
 
368
 268 01b0 9091 0000             lds r25,(TMR1MS)+1
-
 
369
 269 01b4 0196                  adiw r24,1
-
 
370
 270 01b6 9093 0000             sts (TMR1MS)+1,r25
-
 
371
 271 01ba 8093 0000             sts TMR1MS,r24
-
 
372
 274 01be 9F91                  pop r25
-
 
373
 275 01c0 8F91                  pop r24
-
 
374
 276 01c2 3F91                  pop r19
-
 
375
 277 01c4 2F91                  pop r18
-
 
376
 278 01c6 0F90                  pop __tmp_reg__
-
 
377
 279 01c8 0FBE                  out __SREG__,__tmp_reg__
-
 
378
 280 01ca 0F90                  pop __tmp_reg__
-
 
379
 281 01cc 1F90                  pop __zero_reg__
-
 
380
 282 01ce 1895                  reti
-
 
381
 */
280
 
382