00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #define TIMER0_PRESCALER_DIV_0 0
00029 #define TIMER0_PRESCALER_DIV_1 1
00030 #define TIMER0_PRESCALER_DIV_8 2
00031 #define TIMER0_PRESCALER_DIV_64 3
00032 #define TIMER0_PRESCALER_DIV_256 4
00033 #define TIMER0_PRESCALER_DIV_1024 5
00034 #define TIMER0_PRESCALER_DIV_FALL 6
00035 #define TIMER0_PRESCALER_DIV_RISE 7
00036
00037 #define TIMER0_PRESCALER_REG_0 0
00038 #define TIMER0_PRESCALER_REG_1 1
00039 #define TIMER0_PRESCALER_REG_2 8
00040 #define TIMER0_PRESCALER_REG_3 64
00041 #define TIMER0_PRESCALER_REG_4 256
00042 #define TIMER0_PRESCALER_REG_5 1024
00043 #define TIMER0_PRESCALER_REG_6 -1
00044 #define TIMER0_PRESCALER_REG_7 -2
00045
00046
00047 #define TIMER1_PRESCALER_DIV_0 0
00048 #define TIMER1_PRESCALER_DIV_1 1
00049 #define TIMER1_PRESCALER_DIV_8 2
00050 #define TIMER1_PRESCALER_DIV_64 3
00051 #define TIMER1_PRESCALER_DIV_256 4
00052 #define TIMER1_PRESCALER_DIV_1024 5
00053 #define TIMER1_PRESCALER_DIV_FALL 6
00054 #define TIMER1_PRESCALER_DIV_RISE 7
00055
00056 #define TIMER1_PRESCALER_REG_0 0
00057 #define TIMER1_PRESCALER_REG_1 1
00058 #define TIMER1_PRESCALER_REG_2 8
00059 #define TIMER1_PRESCALER_REG_3 64
00060 #define TIMER1_PRESCALER_REG_4 256
00061 #define TIMER1_PRESCALER_REG_5 1024
00062 #define TIMER1_PRESCALER_REG_6 -1
00063 #define TIMER1_PRESCALER_REG_7 -2
00064
00065
00066
00067 #define TIMER0_AVAILABLE
00068 #define TIMER0A_AVAILABLE
00069 #define TIMER0B_AVAILABLE
00070 #define TIMER1_AVAILABLE
00071 #define TIMER1A_AVAILABLE
00072 #define TIMER1B_AVAILABLE
00073
00074
00075 #define SIG_OVERFLOW0_NUM 0
00076 #define SIG_OVERFLOW1_NUM 1
00077 #define SIG_OVERFLOW_TOTAL_NUM 2
00078
00079
00080 #define SIG_OUTPUT_COMPARE0A_NUM 0
00081 #define SIG_OUTPUT_COMPARE0B_NUM 1
00082 #define SIG_OUTPUT_COMPARE1A_NUM 2
00083 #define SIG_OUTPUT_COMPARE1B_NUM 3
00084 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 4
00085
00086
00087 #define PWM0A_NUM 0
00088 #define PWM0B_NUM 1
00089 #define PWM1A_NUM 2
00090 #define PWM1B_NUM 3
00091 #define PWM_TOTAL_NUM 4
00092
00093
00094 #define SIG_INPUT_CAPTURE1_NUM 0
00095 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
00096
00097
00098
00099 #define AIN0D_REG DIDR
00100 #define AIN1D_REG DIDR
00101
00102
00103 #define CLKPS0_REG CLKPR
00104 #define CLKPS1_REG CLKPR
00105 #define CLKPS2_REG CLKPR
00106 #define CLKPS3_REG CLKPR
00107 #define CLKPCE_REG CLKPR
00108
00109
00110 #define WDP0_REG WDTCR
00111 #define WDP1_REG WDTCR
00112 #define WDP2_REG WDTCR
00113 #define WDE_REG WDTCR
00114 #define WDCE_REG WDTCR
00115 #define WDP3_REG WDTCR
00116 #define WDIE_REG WDTCR
00117 #define WDIF_REG WDTCR
00118
00119
00120 #define PCIE_REG GIMSK
00121 #define INT0_REG GIMSK
00122 #define INT1_REG GIMSK
00123
00124
00125 #define C_REG SREG
00126 #define Z_REG SREG
00127 #define N_REG SREG
00128 #define V_REG SREG
00129 #define S_REG SREG
00130 #define H_REG SREG
00131 #define T_REG SREG
00132 #define I_REG SREG
00133
00134
00135 #define DDB0_REG DDRB
00136 #define DDB1_REG DDRB
00137 #define DDB2_REG DDRB
00138 #define DDB3_REG DDRB
00139 #define DDB4_REG DDRB
00140 #define DDB5_REG DDRB
00141 #define DDB6_REG DDRB
00142 #define DDB7_REG DDRB
00143
00144
00145 #define USICNT0_REG USISR
00146 #define USICNT1_REG USISR
00147 #define USICNT2_REG USISR
00148 #define USICNT3_REG USISR
00149 #define USIDC_REG USISR
00150 #define USIPF_REG USISR
00151 #define USIOIF_REG USISR
00152 #define USISIF_REG USISR
00153
00154
00155 #define EEDR0_REG EEDR
00156 #define EEDR1_REG EEDR
00157 #define EEDR2_REG EEDR
00158 #define EEDR3_REG EEDR
00159 #define EEDR4_REG EEDR
00160 #define EEDR5_REG EEDR
00161 #define EEDR6_REG EEDR
00162 #define EEDR7_REG EEDR
00163
00164
00165 #define DDA0_REG DDRA
00166 #define DDA1_REG DDRA
00167 #define DDA2_REG DDRA
00168
00169
00170 #define WGM10_REG TCCR1A
00171 #define WGM11_REG TCCR1A
00172 #define COM1B0_REG TCCR1A
00173 #define COM1B1_REG TCCR1A
00174 #define COM1A0_REG TCCR1A
00175 #define COM1A1_REG TCCR1A
00176
00177
00178 #define PSR10_REG GTCCR
00179
00180
00181 #define CS10_REG TCCR1B
00182 #define CS11_REG TCCR1B
00183 #define CS12_REG TCCR1B
00184 #define WGM12_REG TCCR1B
00185 #define WGM13_REG TCCR1B
00186 #define ICES1_REG TCCR1B
00187 #define ICNC1_REG TCCR1B
00188
00189
00190 #define OCIE0A_REG TIMSK
00191 #define TOIE0_REG TIMSK
00192 #define OCIE0B_REG TIMSK
00193 #define ICIE1_REG TIMSK
00194 #define OCIE1B_REG TIMSK
00195 #define OCIE1A_REG TIMSK
00196 #define TOIE1_REG TIMSK
00197
00198
00199 #define MPCM_REG UCSRA
00200 #define U2X_REG UCSRA
00201 #define UPE_REG UCSRA
00202 #define DOR_REG UCSRA
00203 #define FE_REG UCSRA
00204 #define UDRE_REG UCSRA
00205 #define TXC_REG UCSRA
00206 #define RXC_REG UCSRA
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219 #define DDD0_REG DDRD
00220 #define DDD1_REG DDRD
00221 #define DDD2_REG DDRD
00222 #define DDD3_REG DDRD
00223 #define DDD4_REG DDRD
00224 #define DDD5_REG DDRD
00225 #define DDD6_REG DDRD
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238 #define ICR1H0_REG ICR1H
00239 #define ICR1H1_REG ICR1H
00240 #define ICR1H2_REG ICR1H
00241 #define ICR1H3_REG ICR1H
00242 #define ICR1H4_REG ICR1H
00243 #define ICR1H5_REG ICR1H
00244 #define ICR1H6_REG ICR1H
00245 #define ICR1H7_REG ICR1H
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258 #define TXB8_REG UCSRB
00259 #define RXB8_REG UCSRB
00260 #define UCSZ2_REG UCSRB
00261 #define TXEN_REG UCSRB
00262 #define RXEN_REG UCSRB
00263 #define UDRIE_REG UCSRB
00264 #define TXCIE_REG UCSRB
00265 #define RXCIE_REG UCSRB
00266
00267
00268 #define UCPOL_REG UCSRC
00269 #define UCSZ0_REG UCSRC
00270 #define UCSZ1_REG UCSRC
00271 #define USBS_REG UCSRC
00272 #define UPM0_REG UCSRC
00273 #define UPM1_REG UCSRC
00274 #define UMSEL_REG UCSRC
00275
00276
00277 #define SP0_REG SPL
00278 #define SP1_REG SPL
00279 #define SP2_REG SPL
00280 #define SP3_REG SPL
00281 #define SP4_REG SPL
00282 #define SP5_REG SPL
00283 #define SP6_REG SPL
00284 #define SP7_REG SPL
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297 #define PIND0_REG PIND
00298 #define PIND1_REG PIND
00299 #define PIND2_REG PIND
00300 #define PIND3_REG PIND
00301 #define PIND4_REG PIND
00302 #define PIND5_REG PIND
00303 #define PIND6_REG PIND
00304
00305
00306 #define GPIOR10_REG GPIOR1
00307 #define GPIOR11_REG GPIOR1
00308 #define GPIOR12_REG GPIOR1
00309 #define GPIOR13_REG GPIOR1
00310 #define GPIOR14_REG GPIOR1
00311 #define GPIOR15_REG GPIOR1
00312 #define GPIOR16_REG GPIOR1
00313 #define GPIOR17_REG GPIOR1
00314
00315
00316 #define ICR1L0_REG ICR1L
00317 #define ICR1L1_REG ICR1L
00318 #define ICR1L2_REG ICR1L
00319 #define ICR1L3_REG ICR1L
00320 #define ICR1L4_REG ICR1L
00321 #define ICR1L5_REG ICR1L
00322 #define ICR1L6_REG ICR1L
00323 #define ICR1L7_REG ICR1L
00324
00325
00326 #define UBRR8_REG UBRRH
00327 #define UBRR9_REG UBRRH
00328 #define UBRR10_REG UBRRH
00329 #define UBRR11_REG UBRRH
00330
00331
00332 #define GPIOR20_REG GPIOR2
00333 #define GPIOR21_REG GPIOR2
00334 #define GPIOR22_REG GPIOR2
00335 #define GPIOR23_REG GPIOR2
00336 #define GPIOR24_REG GPIOR2
00337 #define GPIOR25_REG GPIOR2
00338 #define GPIOR26_REG GPIOR2
00339 #define GPIOR27_REG GPIOR2
00340
00341
00342 #define UBRR0_REG UBRRL
00343 #define UBRR1_REG UBRRL
00344 #define UBRR2_REG UBRRL
00345 #define UBRR3_REG UBRRL
00346 #define UBRR4_REG UBRRL
00347 #define UBRR5_REG UBRRL
00348 #define UBRR6_REG UBRRL
00349 #define UBRR7_REG UBRRL
00350
00351
00352 #define PORF_REG MCUSR
00353 #define EXTRF_REG MCUSR
00354 #define BORF_REG MCUSR
00355 #define WDRF_REG MCUSR
00356
00357
00358 #define EERE_REG EECR
00359 #define EEPE_REG EECR
00360 #define EEMPE_REG EECR
00361 #define EERIE_REG EECR
00362 #define EEPM0_REG EECR
00363 #define EEPM1_REG EECR
00364
00365
00366 #define PCINT0_REG PCMSK
00367 #define PCINT1_REG PCMSK
00368 #define PCINT2_REG PCMSK
00369 #define PCINT3_REG PCMSK
00370 #define PCINT4_REG PCMSK
00371 #define PCINT5_REG PCMSK
00372 #define PCINT6_REG PCMSK
00373 #define PCINT7_REG PCMSK
00374
00375
00376 #define SPMEN_REG SPMCSR
00377 #define PGERS_REG SPMCSR
00378 #define PGWRT_REG SPMCSR
00379 #define RFLB_REG SPMCSR
00380 #define CTPB_REG SPMCSR
00381
00382
00383 #define CAL0_REG OSCCAL
00384 #define CAL1_REG OSCCAL
00385 #define CAL2_REG OSCCAL
00386 #define CAL3_REG OSCCAL
00387 #define CAL4_REG OSCCAL
00388 #define CAL5_REG OSCCAL
00389 #define CAL6_REG OSCCAL
00390
00391
00392 #define TCNT1L0_REG TCNT1L
00393 #define TCNT1L1_REG TCNT1L
00394 #define TCNT1L2_REG TCNT1L
00395 #define TCNT1L3_REG TCNT1L
00396 #define TCNT1L4_REG TCNT1L
00397 #define TCNT1L5_REG TCNT1L
00398 #define TCNT1L6_REG TCNT1L
00399 #define TCNT1L7_REG TCNT1L
00400
00401
00402 #define PORTB0_REG PORTB
00403 #define PORTB1_REG PORTB
00404 #define PORTB2_REG PORTB
00405 #define PORTB3_REG PORTB
00406 #define PORTB4_REG PORTB
00407 #define PORTB5_REG PORTB
00408 #define PORTB6_REG PORTB
00409 #define PORTB7_REG PORTB
00410
00411
00412 #define PORTD0_REG PORTD
00413 #define PORTD1_REG PORTD
00414 #define PORTD2_REG PORTD
00415 #define PORTD3_REG PORTD
00416 #define PORTD4_REG PORTD
00417 #define PORTD5_REG PORTD
00418 #define PORTD6_REG PORTD
00419
00420
00421 #define EEAR0_REG EEAR
00422 #define EEAR1_REG EEAR
00423 #define EEAR2_REG EEAR
00424 #define EEAR3_REG EEAR
00425 #define EEAR4_REG EEAR
00426 #define EEAR5_REG EEAR
00427 #define EEAR6_REG EEAR
00428
00429
00430 #define TCNT1H0_REG TCNT1H
00431 #define TCNT1H1_REG TCNT1H
00432 #define TCNT1H2_REG TCNT1H
00433 #define TCNT1H3_REG TCNT1H
00434 #define TCNT1H4_REG TCNT1H
00435 #define TCNT1H5_REG TCNT1H
00436 #define TCNT1H6_REG TCNT1H
00437 #define TCNT1H7_REG TCNT1H
00438
00439
00440 #define PORTA0_REG PORTA
00441 #define PORTA1_REG PORTA
00442 #define PORTA2_REG PORTA
00443
00444
00445 #define TCNT0_0_REG TCNT0
00446 #define TCNT0_1_REG TCNT0
00447 #define TCNT0_2_REG TCNT0
00448 #define TCNT0_3_REG TCNT0
00449 #define TCNT0_4_REG TCNT0
00450 #define TCNT0_5_REG TCNT0
00451 #define TCNT0_6_REG TCNT0
00452 #define TCNT0_7_REG TCNT0
00453
00454
00455 #define GPIOR00_REG GPIOR0
00456 #define GPIOR01_REG GPIOR0
00457 #define GPIOR02_REG GPIOR0
00458 #define GPIOR03_REG GPIOR0
00459 #define GPIOR04_REG GPIOR0
00460 #define GPIOR05_REG GPIOR0
00461 #define GPIOR06_REG GPIOR0
00462 #define GPIOR07_REG GPIOR0
00463
00464
00465 #define CS00_REG TCCR0B
00466 #define CS01_REG TCCR0B
00467 #define CS02_REG TCCR0B
00468 #define WGM02_REG TCCR0B
00469 #define FOC0B_REG TCCR0B
00470 #define FOC0A_REG TCCR0B
00471
00472
00473 #define OCF0A_REG TIFR
00474 #define TOV0_REG TIFR
00475 #define OCF0B_REG TIFR
00476 #define ICF1_REG TIFR
00477 #define OCF1B_REG TIFR
00478 #define OCF1A_REG TIFR
00479 #define TOV1_REG TIFR
00480
00481
00482 #define FOC1B_REG TCCR1C
00483 #define FOC1A_REG TCCR1C
00484
00485
00486 #define WGM00_REG TCCR0A
00487 #define WGM01_REG TCCR0A
00488 #define COM0B0_REG TCCR0A
00489 #define COM0B1_REG TCCR0A
00490 #define COM0A0_REG TCCR0A
00491 #define COM0A1_REG TCCR0A
00492
00493
00494 #define UDR0_REG UDR
00495 #define UDR1_REG UDR
00496 #define UDR2_REG UDR
00497 #define UDR3_REG UDR
00498 #define UDR4_REG UDR
00499 #define UDR5_REG UDR
00500 #define UDR6_REG UDR
00501 #define UDR7_REG UDR
00502
00503
00504 #define USITC_REG USICR
00505 #define USICLK_REG USICR
00506 #define USICS0_REG USICR
00507 #define USICS1_REG USICR
00508 #define USIWM0_REG USICR
00509 #define USIWM1_REG USICR
00510 #define USIOIE_REG USICR
00511 #define USISIE_REG USICR
00512
00513
00514 #define PINB0_REG PINB
00515 #define PINB1_REG PINB
00516 #define PINB2_REG PINB
00517 #define PINB3_REG PINB
00518 #define PINB4_REG PINB
00519 #define PINB5_REG PINB
00520 #define PINB6_REG PINB
00521 #define PINB7_REG PINB
00522
00523
00524 #define PCIF_REG EIFR
00525 #define INTF0_REG EIFR
00526 #define INTF1_REG EIFR
00527
00528
00529 #define ISC00_REG MCUCR
00530 #define ISC01_REG MCUCR
00531 #define ISC10_REG MCUCR
00532 #define ISC11_REG MCUCR
00533 #define SM0_REG MCUCR
00534 #define SE_REG MCUCR
00535 #define SM1_REG MCUCR
00536 #define PUD_REG MCUCR
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559 #define ACIS0_REG ACSR
00560 #define ACIS1_REG ACSR
00561 #define ACIC_REG ACSR
00562 #define ACIE_REG ACSR
00563 #define ACI_REG ACSR
00564 #define ACO_REG ACSR
00565 #define ACBG_REG ACSR
00566 #define ACD_REG ACSR
00567
00568
00569 #define PINA0_REG PINA
00570 #define PINA1_REG PINA
00571 #define PINA2_REG PINA
00572
00573
00574 #define USIDR0_REG USIDR
00575 #define USIDR1_REG USIDR
00576 #define USIDR2_REG USIDR
00577 #define USIDR3_REG USIDR
00578 #define USIDR4_REG USIDR
00579 #define USIDR5_REG USIDR
00580 #define USIDR6_REG USIDR
00581 #define USIDR7_REG USIDR
00582
00583
00584 #define AIN0_PORT PORTB
00585 #define AIN0_BIT 0
00586
00587 #define AIN1_PORT PORTB
00588 #define AIN1_BIT 1
00589
00590 #define OC0A_PORT PORTB
00591 #define OC0A_BIT 2
00592
00593 #define OC1A_PORT PORTB
00594 #define OC1A_BIT 3
00595
00596 #define OC1B_PORT PORTB
00597 #define OC1B_BIT 4
00598
00599 #define MOSI_PORT PORTB
00600 #define MOSI_BIT 5
00601 #define DI_PORT PORTB
00602 #define DI_BIT 5
00603
00604 #define MISO_PORT PORTB
00605 #define MISO_BIT 6
00606 #define DO_PORT PORTB
00607 #define DO_BIT 6
00608
00609 #define SCK_PORT PORTB
00610 #define SCK_BIT 7
00611 #define SCL_PORT PORTB
00612 #define SCL_BIT 7
00613
00614 #define RXD_PORT PORTD
00615 #define RXD_BIT 0
00616
00617 #define TXD_PORT PORTD
00618 #define TXD_BIT 1
00619
00620 #define INT0_PORT PORTD
00621 #define INT0_BIT 2
00622 #define XCK_PORT PORTD
00623 #define XCK_BIT 2
00624 #define CKOUT_PORT PORTD
00625 #define CKOUT_BIT 2
00626
00627 #define INT1_PORT PORTD
00628 #define INT1_BIT 3
00629
00630 #define T0_PORT PORTD
00631 #define T0_BIT 4
00632
00633 #define T1_PORT PORTD
00634 #define T1_BIT 5
00635 #define OC0B_PORT PORTD
00636 #define OC0B_BIT 5
00637
00638 #define ICP_PORT PORTD
00639 #define ICP_BIT 6
00640
00641