질문게시판 > 답변 : ATMEGA128 TCCR2 = 0X0B가 의미하는것은 무엇인지 궁금합니다.

TODAY132 TOTAL2,230,931
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 질문게시판 | 답변 : ATMEGA128 TCCR2 = 0X0B가 의미하는것은 무엇인지 궁금합니다.

페이지 정보

작성자 master 작성일2022-05-12 06:15 조회612회 댓글1건

본문

	

 

//타이머0 오버플로우 인터럽트-------------------------------------------------------

    TCCR0=1; TCNT0=176; TIMSK=1; //16000000/1/(256-176),5us

    TCCR0=1; TCNT0= 96; TIMSK=1; //16000000/1/(256- 96),10us

 

    TCCR0=2; TCNT0=246; TIMSK=1; //16000000/8/(256-246),5us

    TCCR0=2; TCNT0=236; TIMSK=1; //16000000/8/(256-236),10us

    TCCR0=2; TCNT0=216; TIMSK=1; //16000000/8/(256-216),20us

    TCCR0=2; TCNT0=206; TIMSK=1; //16000000/8/(256-206),25us

    TCCR0=2; TCNT0=198; TIMSK=1; //16000000/8/(256-198),29us

    TCCR0=2; TCNT0=196; TIMSK=1; //16000000/8/(256-196),30us

    TCCR0=2; TCNT0=176; TIMSK=1; //16000000/8/(256-176),40us

    TCCR0=2; TCNT0=156; TIMSK=1; //16000000/8/(256-156),50us

    TCCR0=2; TCNT0=140; TIMSK=1; //16000000/8/(256-140),58us

    TCCR0=2; TCNT0=136; TIMSK=1; //16000000/8/(256-136),60us

    TCCR0=2; TCNT0=116; TIMSK=1; //16000000/8/(256-116),70us

    TCCR0=2; TCNT0= 96; TIMSK=1; //16000000/8/(256- 96),80us

    TCCR0=2; TCNT0= 76; TIMSK=1; //16000000/8/(256- 76),90us

    TCCR0=2; TCNT0= 56; TIMSK=1; //16000000/8/(256- 56),100us

 

    TCCR0=3; TCNT0=251; TIMSK=1; //16000000/32/(256-251),10us //Timer0만

    TCCR0=3; TCNT0=246; TIMSK=1; //16000000/32/(256-246),20us

    TCCR0=3; TCNT0=241; TIMSK=1; //16000000/32/(256-241),30us

    TCCR0=3; TCNT0=236; TIMSK=1; //16000000/32/(256-236),40us

    TCCR0=3; TCNT0=231; TIMSK=1; //16000000/32/(256-231),50us

    TCCR0=3; TCNT0=227; TIMSK=1; //16000000/32/(256-227),58us

    TCCR0=3; TCNT0=226; TIMSK=1; //16000000/32/(256-226),60us

    TCCR0=3; TCNT0=221; TIMSK=1; //16000000/32/(256-221),70us

    TCCR0=3; TCNT0=216; TIMSK=1; //16000000/32/(256-216),80us

    TCCR0=3; TCNT0=211; TIMSK=1; //16000000/32/(256-211),90us

    TCCR0=3; TCNT0=206; TIMSK=1; //16000000/32/(256-206),100us

    TCCR0=3; TCNT0=156; TIMSK=1; //16000000/32/(256-156),200us

    TCCR0=3; TCNT0=131; TIMSK=1; //16000000/32/(256-131),250us

    TCCR0=3; TCNT0=106; TIMSK=1; //16000000/32/(256-106),300us

    TCCR0=3; TCNT0= 56; TIMSK=1; //16000000/32/(256- 56),400us

    TCCR0=3; TCNT0=  6; TIMSK=1; //16000000/32/(256-  6),500us

 

    TCCR0=4; TCNT0=251; TIMSK=1; //16000000/64/(256-251),20us

    TCCR0=4; TCNT0=246; TIMSK=1; //16000000/64/(256-246),40us

    TCCR0=4; TCNT0=241; TIMSK=1; //16000000/64/(256-241),60us

    TCCR0=4; TCNT0=236; TIMSK=1; //16000000/64/(256-236),80us

    TCCR0=4; TCNT0=231; TIMSK=1; //16000000/64/(256-231),100us

    TCCR0=4; TCNT0=206; TIMSK=1; //16000000/64/(256-206),200us

    TCCR0=4; TCNT0=181; TIMSK=1; //16000000/64/(256-181),300us

    TCCR0=4; TCNT0=156; TIMSK=1; //16000000/64/(256-156),400us

    TCCR0=4; TCNT0=131; TIMSK=1; //16000000/64/(256-131),500us

    TCCR0=4; TCNT0=106; TIMSK=1; //16000000/64/(256-106),600us

    TCCR0=4; TCNT0= 81; TIMSK=1; //16000000/64/(256- 81),700us

    TCCR0=4; TCNT0= 56; TIMSK=1; //16000000/64/(256- 56),800us

    TCCR0=4; TCNT0= 31; TIMSK=1; //16000000/64/(256- 31),900us

    TCCR0=4; TCNT0=  6; TIMSK=1; //16000000/64/(256-  6),1ms

 

    TCCR0=5; TCNT0=251; TIMSK=1; //16000000/128/(256-251),40us //Timer0만

    TCCR0=5; TCNT0=246; TIMSK=1; //16000000/128/(256-246),80us

    TCCR0=5; TCNT0=231; TIMSK=1; //16000000/128/(256-231),200us

    TCCR0=5; TCNT0=206; TIMSK=1; //16000000/128/(256-206),400us

    TCCR0=5; TCNT0=181; TIMSK=1; //16000000/128/(256-181),600us

    TCCR0=5; TCNT0=156; TIMSK=1; //16000000/128/(256-156),800us

    TCCR0=5; TCNT0=131; TIMSK=1; //16000000/128/(256-131),1ms

    TCCR0=5; TCNT0=  6; TIMSK=1; //16000000/128/(256-  6),2ms

 

    TCCR0=6; TCNT0=251; TIMSK=1; //16000000/256/(256-251),80us

    TCCR0=6; TCNT0=231; TIMSK=1; //16000000/256/(256-231),400us

    TCCR0=6; TCNT0=206; TIMSK=1; //16000000/256/(256-206),800us

    TCCR0=6; TCNT0=131; TIMSK=1; //16000000/256/(256-131),2ms

    TCCR0=6; TCNT0=  6; TIMSK=1; //16000000/256/(256-  6),4ms

 

    TCCR0=7; TCNT0=131; TIMSK=1; //16000000/1024/(256-131),8ms

    TCCR0=7; TCNT0=100; TIMSK=1; //16000000/1024/(256-100),9.984ms

    TCCR0=7; TCNT0=  6; TIMSK=1; //16000000/1024/(256-  6),16ms

 

// 타이머0 CTC 비교 매치 인터럽트-------------------------------------------------------

    TCCR0=0x09; OCR0= 79; TIMSK=2; //16000000/1/(1+ 79),5us

    TCCR0=0x09; OCR0=159; TIMSK=2; //16000000/1/(1+159),10us

 

    TCCR0=0x0A; OCR0=  9; TIMSK=2; //16000000/8/(1+  9),5us

    TCCR0=0x0A; OCR0= 19; TIMSK=2; //16000000/8/(1+ 19),10us

    TCCR0=0x0A; OCR0= 39; TIMSK=2; //16000000/8/(1+ 39),20us

    TCCR0=0x0A; OCR0= 49; TIMSK=2; //16000000/8/(1+ 49),25us

    TCCR0=0x0A; OCR0= 57; TIMSK=2; //16000000/8/(1+ 57),29us

    TCCR0=0x0A; OCR0= 59; TIMSK=2; //16000000/8/(1+ 59),30us

    TCCR0=0x0A; OCR0= 79; TIMSK=2; //16000000/8/(1+ 79),40us

    TCCR0=0x0A; OCR0= 99; TIMSK=2; //16000000/8/(1+ 99),50us

    TCCR0=0x0A; OCR0=115; TIMSK=2; //16000000/8/(1+115),58us

    TCCR0=0x0A; OCR0=119; TIMSK=2; //16000000/8/(1+119),60us

    TCCR0=0x0A; OCR0=139; TIMSK=2; //16000000/8/(1+139),70us

    TCCR0=0x0A; OCR0=159; TIMSK=2; //16000000/8/(1+159),80us

    TCCR0=0x0A; OCR0=179; TIMSK=2; //16000000/8/(1+179),90us

    TCCR0=0x0A; OCR0=199; TIMSK=2; //16000000/8/(1+199),100us

 

    TCCR0=0x0B; OCR0=  4; TIMSK=2; //16000000/32/(1+  4),10us //Timer0만

    TCCR0=0x0B; OCR0=  9; TIMSK=2; //16000000/32/(1+  9),20us

    TCCR0=0x0B; OCR0= 14; TIMSK=2; //16000000/32/(1+ 14),30us

    TCCR0=0x0B; OCR0= 19; TIMSK=2; //16000000/32/(1+ 19),40us

    TCCR0=0x0B; OCR0= 24; TIMSK=2; //16000000/32/(1+ 24),50us

    TCCR0=0x0B; OCR0= 28; TIMSK=2; //16000000/32/(1+ 28),58us

    TCCR0=0x0B; OCR0= 29; TIMSK=2; //16000000/32/(1+ 29),60us

    TCCR0=0x0B; OCR0= 34; TIMSK=2; //16000000/32/(1+ 34),70us

    TCCR0=0x0B; OCR0= 39; TIMSK=2; //16000000/32/(1+ 39),80us

    TCCR0=0x0B; OCR0= 44; TIMSK=2; //16000000/32/(1+ 44),90us

    TCCR0=0x0B; OCR0= 49; TIMSK=2; //16000000/32/(1+ 49),100us

    TCCR0=0x0B; OCR0= 99; TIMSK=2; //16000000/32/(1+ 99),200us

    TCCR0=0x0B; OCR0=124; TIMSK=2; //16000000/32/(1+124),250us

    TCCR0=0x0B; OCR0=149; TIMSK=2; //16000000/32/(1+149),300us

    TCCR0=0x0B; OCR0=199; TIMSK=2; //16000000/32/(1+199),400us

    TCCR0=0x0B; OCR0=249; TIMSK=2; //16000000/32/(1+249),500us

 

    TCCR0=0x0C; OCR0=  4; TIMSK=2; //16000000/64/(1+  4),20us

    TCCR0=0x0C; OCR0=  9; TIMSK=2; //16000000/64/(1+  9),40us

    TCCR0=0x0C; OCR0= 14; TIMSK=2; //16000000/64/(1+ 14),60us

    TCCR0=0x0C; OCR0= 19; TIMSK=2; //16000000/64/(1+ 19),80us

    TCCR0=0x0C; OCR0= 24; TIMSK=2; //16000000/64/(1+ 24),100us

    TCCR0=0x0C; OCR0= 49; TIMSK=2; //16000000/64/(1+ 49),200us

    TCCR0=0x0C; OCR0= 74; TIMSK=2; //16000000/64/(1+ 74),300us

    TCCR0=0x0C; OCR0= 99; TIMSK=2; //16000000/64/(1+ 99),400us

    TCCR0=0x0C; OCR0=124; TIMSK=2; //16000000/64/(1+124),500us

    TCCR0=0x0C; OCR0=149; TIMSK=2; //16000000/64/(1+149),600us

    TCCR0=0x0C; OCR0=174; TIMSK=2; //16000000/64/(1+174),700us

    TCCR0=0x0C; OCR0=199; TIMSK=2; //16000000/64/(1+199),800us

    TCCR0=0x0C; OCR0=224; TIMSK=2; //16000000/64/(1+224),900us

    TCCR0=0x0C; OCR0=249; TIMSK=2; //16000000/64/(1+249),1ms

 

    TCCR0=0x0D; OCR0=  4; TIMSK=2; //16000000/128/(1+  4),40us //Timer0만

    TCCR0=0x0D; OCR0=  9; TIMSK=2; //16000000/128/(1+  9),80us

    TCCR0=0x0D; OCR0= 24; TIMSK=2; //16000000/128/(1+ 24),200us

    TCCR0=0x0D; OCR0= 49; TIMSK=2; //16000000/128/(1+ 49),400us

    TCCR0=0x0D; OCR0= 74; TIMSK=2; //16000000/128/(1+ 74),600us

    TCCR0=0x0D; OCR0= 99; TIMSK=2; //16000000/128/(1+ 99),800us

    TCCR0=0x0D; OCR0=124; TIMSK=2; //16000000/128/(1+124),1ms

    TCCR0=0x0D; OCR0=249; TIMSK=2; //16000000/128/(1+249),2ms

 

    TCCR0=0x0E; OCR0=  4; TIMSK=2; //16000000/256/(1+  4),80us

    TCCR0=0x0E; OCR0= 24; TIMSK=2; //16000000/256/(1+ 24),400us

    TCCR0=0x0E; OCR0= 49; TIMSK=2; //16000000/256/(1+ 49),800us

    TCCR0=0x0E; OCR0=124; TIMSK=2; //16000000/256/(1+124),2ms

    TCCR0=0x0E; OCR0=249; TIMSK=2; //16000000/256/(1+249),4ms

 

    TCCR0=0x0F; OCR0=124; TIMSK=2; //16000000/1024/(1+124),8ms

    TCCR0=0x0F; OCR0=155; TIMSK=2; //16000000/1024/(1+155),9.984ms

    TCCR0=0x0F; OCR0=249; TIMSK=2; //16000000/1024/(1+249),16ms

 

 

// 타이머0 CTC 토글 Mode-------------------------------------------------------

    TCCR0=0x99; OCR0= 79; //16000000/1/2/(1+ 79),10us

    TCCR0=0x99; OCR0=159; //16000000/1/2/(1+159),20us

 

    TCCR0=0x9A; OCR0=  9; //16000000/8/2/(1+  9),10us

    TCCR0=0x9A; OCR0= 19; //16000000/8/2/(1+ 19),20us

    TCCR0=0x9A; OCR0= 39; //16000000/8/2/(1+ 39),40us

    TCCR0=0x9A; OCR0= 49; //16000000/8/2/(1+ 49),50us

    TCCR0=0x9A; OCR0= 57; //16000000/8/2/(1+ 57),58us

    TCCR0=0x9A; OCR0= 59; //16000000/8/2/(1+ 59),60us

    TCCR0=0x9A; OCR0= 79; //16000000/8/2/(1+ 79),80us

    TCCR0=0x9A; OCR0= 99; //16000000/8/2/(1+ 99),100us

    TCCR0=0x9A; OCR0=115; //16000000/8/2/(1+115),116us

    TCCR0=0x9A; OCR0=119; //16000000/8/2/(1+119),120us

    TCCR0=0x9A; OCR0=139; //16000000/8/2/(1+139),140us

    TCCR0=0x9A; OCR0=159; //16000000/8/2/(1+159),160us

    TCCR0=0x9A; OCR0=179; //16000000/8/2/(1+179),180us

    TCCR0=0x9A; OCR0=199; //16000000/8/2/(1+199),200us

 

    TCCR0=0x9B; OCR0=  4; //16000000/32/2/(1+  4),20us

    TCCR0=0x9B; OCR0=  9; //16000000/32/2/(1+  9),40us

    TCCR0=0x9B; OCR0= 14; //16000000/32/2/(1+ 14),60us

    TCCR0=0x9B; OCR0= 19; //16000000/32/2/(1+ 19),80us

    TCCR0=0x9B; OCR0= 24; //16000000/32/2/(1+ 24),100us

    TCCR0=0x9B; OCR0= 28; //16000000/32/2/(1+ 28),116us

    TCCR0=0x9B; OCR0= 29; //16000000/32/2/(1+ 29),120us

    TCCR0=0x9B; OCR0= 34; //16000000/32/2/(1+ 34),140us

    TCCR0=0x9B; OCR0= 39; //16000000/32/2/(1+ 39),160us

    TCCR0=0x9B; OCR0= 44; //16000000/32/2/(1+ 44),180us

    TCCR0=0x9B; OCR0= 49; //16000000/32/2/(1+ 49),200us

    TCCR0=0x9B; OCR0= 99; //16000000/32/2/(1+ 99),400us

    TCCR0=0x9B; OCR0=124; //16000000/32/2/(1+124),500us

    TCCR0=0x9B; OCR0=149; //16000000/32/2/(1+149),600us

    TCCR0=0x9B; OCR0=199; //16000000/32/2/(1+199),800us

    TCCR0=0x9B; OCR0=249; //16000000/32/2/(1+249),1ms

 

    TCCR0=0x9C; OCR0=  4; //16000000/64/2/(1+  4),40us

    TCCR0=0x9C; OCR0=  9; //16000000/64/2/(1+  9),80us

    TCCR0=0x9C; OCR0= 14; //16000000/64/2/(1+ 14),120us

    TCCR0=0x9C; OCR0= 19; //16000000/64/2/(1+ 19),160us

    TCCR0=0x9C; OCR0= 24; //16000000/64/2/(1+ 24),200us

    TCCR0=0x9C; OCR0= 49; //16000000/64/2/(1+ 49),400us

    TCCR0=0x9C; OCR0= 74; //16000000/64/2/(1+ 74),600us

    TCCR0=0x9C; OCR0= 99; //16000000/64/2/(1+ 99),800us

    TCCR0=0x9C; OCR0=124; //16000000/64/2/(1+124),1ms

    TCCR0=0x9C; OCR0=149; //16000000/64/2/(1+149),1.2ms

    TCCR0=0x9C; OCR0=174; //16000000/64/2/(1+174),1.4ms

    TCCR0=0x9C; OCR0=199; //16000000/64/2/(1+199),1.6ms

    TCCR0=0x9C; OCR0=224; //16000000/64/2/(1+224),1.8ms

    TCCR0=0x9C; OCR0=249; //16000000/64/2/(1+249),2ms

 

    TCCR0=0x9D; OCR0=  4; //16000000/128/2/(1+  4),80us

    TCCR0=0x9D; OCR0=  9; //16000000/128/2/(1+  9),160us

    TCCR0=0x9D; OCR0= 24; //16000000/128/2/(1+ 24),400us

    TCCR0=0x9D; OCR0= 49; //16000000/128/2/(1+ 49),800us

    TCCR0=0x9D; OCR0= 74; //16000000/128/2/(1+ 74),1.2ms

    TCCR0=0x9D; OCR0= 99; //16000000/128/2/(1+ 99),1.6ms

    TCCR0=0x9D; OCR0=124; //16000000/128/2/(1+124),2ms

    TCCR0=0x9D; OCR0=249; //16000000/128/2/(1+249),4ms

 

    TCCR0=0x9E; OCR0=  4; //16000000/256/2/(1+  4),160us

    TCCR0=0x9E; OCR0= 24; //16000000/256/2/(1+ 24),800us

    TCCR0=0x9E; OCR0= 49; //16000000/256/2/(1+ 49),1.6ms

    TCCR0=0x9E; OCR0=124; //16000000/256/2/(1+124),4ms

    TCCR0=0x9E; OCR0=249; //16000000/256/2/(1+249),8ms

 

    TCCR0=0x9F; OCR0= 77; //16000000/1024/2/(1+ 77),9.984ms

    TCCR0=0x9F; OCR0=124; //16000000/1024/2/(1+124),16ms

    TCCR0=0x9F; OCR0=155; //16000000/1024/2/(1+155),19.968ms

    TCCR0=0x9F; OCR0=249; //16000000/1024/2/(1+249),32ms

 

 

// 타이머0 Fast PWM Mode // COM0x=2 Bottom(0x00)에서 Set(5V), OCR0에서 Clear(0V)

    TCCR0=0x69; //주기=16000000/   1/256=62500.0000000Hz=    16us

    TCCR0=0x6A; //주기=16000000/   8/256= 7812.5000000Hz=   128us

    TCCR0=0x6B; //주기=16000000/  32/256= 1953.1250000Hz=   512us

    TCCR0=0x6C; //주기=16000000/  64/256= 976.56250000Hz= 1.024ms

    TCCR0=0x6D; //주기=16000000/ 128/256= 488.28125000Hz= 2.048ms

    TCCR0=0x6E; //주기=16000000/ 256/256= 244.14062500Hz= 4.096ms

    TCCR0=0x6F; //주기=16000000/1024/256=  61.03515625Hz=16.384ms

 

// 타이머0 Fast PWM Mode // COM0x=3 Bottom(0x00)에서 Clear(0V), OCR0에서 Set(5V)

    TCCR0=0x79; //주기=16000000/   1/256=62500.0000000Hz=    16us

    TCCR0=0x7A; //주기=16000000/   8/256= 7812.5000000Hz=   128us

    TCCR0=0x7B; //주기=16000000/  32/256= 1953.1250000Hz=   512us

    TCCR0=0x7C; //주기=16000000/  64/256= 976.56250000Hz= 1.024ms

    TCCR0=0x7D; //주기=16000000/ 128/256= 488.28125000Hz= 2.048ms

    TCCR0=0x7E; //주기=16000000/ 256/256= 244.14062500Hz= 4.096ms

    TCCR0=0x7F; //주기=16000000/1024/256=  61.03515625Hz=16.384ms

 

 

// 타이머0 Phase Correct PWM Mode // COM0x=2 Bottom(0x00)~OCR0구간 Set(5V), OCR0~TOP구간 Clear(0V)

    TCCR0=0x61; //주기=16000000/   1/510=31372.549019607843137254901960784Hz=31.875us

    TCCR0=0x62; //주기=16000000/   8/510= 3921.568627450980392156862745098Hz=255us

    TCCR0=0x63; //주기=16000000/  32/510=980.39215686274509803921568627451Hz=1.02ms

    TCCR0=0x64; //주기=16000000/  64/510=490.19607843137254901960784313725Hz=2.04ms

    TCCR0=0x65; //주기=16000000/ 128/510=245.09803921568627450980392156863Hz=4.08ms

    TCCR0=0x66; //주기=16000000/ 256/510=122.54901960784313725490196078431Hz=8.16ms

    TCCR0=0x67; //주기=16000000/1024/510=30.637254901960784313725490196078Hz=32.64ms

 

// 타이머0 Phase Correct PWM Mode // COM0x=3 Bottom(0x00)~OCR0구간 Clear(0V), OCR0~TOP구간 Set(5V)

    TCCR0=0x71; //주기=16000000/   1/510=31372.549019607843137254901960784Hz=31.875us

    TCCR0=0x72; //주기=16000000/   8/510= 3921.568627450980392156862745098Hz=255us

    TCCR0=0x73; //주기=16000000/  32/510=980.39215686274509803921568627451Hz=1.02ms

    TCCR0=0x74; //주기=16000000/  64/510=490.19607843137254901960784313725Hz=2.04ms

    TCCR0=0x75; //주기=16000000/ 128/510=245.09803921568627450980392156863Hz=4.08ms

    TCCR0=0x76; //주기=16000000/ 256/510=122.54901960784313725490196078431Hz=8.16ms

    TCCR0=0x77; //주기=16000000/1024/510=30.637254901960784313725490196078Hz=32.64ms

 

 

//타이머2 오버플로우 인터럽트-------------------------------------------------------

    TCCR2=1; TCNT2=176; TIMSK=0x40; //16000000/1/(256-176),5us

    TCCR2=1; TCNT2= 96; TIMSK=0x40; //16000000/1/(256- 96),10us

 

    TCCR2=2; TCNT2=246; TIMSK=0x40; //16000000/8/(256-246),5us

    TCCR2=2; TCNT2=236; TIMSK=0x40; //16000000/8/(256-236),10us

    TCCR2=2; TCNT2=216; TIMSK=0x40; //16000000/8/(256-216),20us

    TCCR2=2; TCNT2=206; TIMSK=0x40; //16000000/8/(256-206),25us

    TCCR2=2; TCNT2=198; TIMSK=0x40; //16000000/8/(256-198),29us

    TCCR2=2; TCNT2=196; TIMSK=0x40; //16000000/8/(256-196),30us

    TCCR2=2; TCNT2=176; TIMSK=0x40; //16000000/8/(256-176),40us

    TCCR2=2; TCNT2=156; TIMSK=0x40; //16000000/8/(256-156),50us

    TCCR2=2; TCNT2=140; TIMSK=0x40; //16000000/8/(256-140),58us

    TCCR2=2; TCNT2=136; TIMSK=0x40; //16000000/8/(256-136),60us

    TCCR2=2; TCNT2=116; TIMSK=0x40; //16000000/8/(256-116),70us

    TCCR2=2; TCNT2= 96; TIMSK=0x40; //16000000/8/(256- 96),80us

    TCCR2=2; TCNT2= 76; TIMSK=0x40; //16000000/8/(256- 76),90us

    TCCR2=2; TCNT2= 56; TIMSK=0x40; //16000000/8/(256- 56),100us

 

    TCCR2=3; TCNT2=251; TIMSK=0x40; //16000000/64/(256-251),20us

    TCCR2=3; TCNT2=246; TIMSK=0x40; //16000000/64/(256-246),40us

    TCCR2=3; TCNT2=241; TIMSK=0x40; //16000000/64/(256-241),60us

    TCCR2=3; TCNT2=236; TIMSK=0x40; //16000000/64/(256-236),80us

    TCCR2=3; TCNT2=231; TIMSK=0x40; //16000000/64/(256-231),100us

    TCCR2=3; TCNT2=206; TIMSK=0x40; //16000000/64/(256-206),200us

    TCCR2=3; TCNT2=181; TIMSK=0x40; //16000000/64/(256-181),300us

    TCCR2=3; TCNT2=156; TIMSK=0x40; //16000000/64/(256-156),400us

    TCCR2=3; TCNT2=131; TIMSK=0x40; //16000000/64/(256-131),500us

    TCCR2=3; TCNT2=106; TIMSK=0x40; //16000000/64/(256-106),600us

    TCCR2=3; TCNT2= 81; TIMSK=0x40; //16000000/64/(256- 81),700us

    TCCR2=3; TCNT2= 56; TIMSK=0x40; //16000000/64/(256- 56),800us

    TCCR2=3; TCNT2= 31; TIMSK=0x40; //16000000/64/(256- 31),900us

    TCCR2=3; TCNT2=  6; TIMSK=0x40; //16000000/64/(256-  6),1ms

 

    TCCR2=4; TCNT2=251; TIMSK=0x40; //16000000/256/(256-251),80us

    TCCR2=4; TCNT2=231; TIMSK=0x40; //16000000/256/(256-231),400us

    TCCR2=4; TCNT2=206; TIMSK=0x40; //16000000/256/(256-206),800us

    TCCR2=4; TCNT2=131; TIMSK=0x40; //16000000/256/(256-131),2ms

    TCCR2=4; TCNT2=  6; TIMSK=0x40; //16000000/256/(256-  6),4ms

 

    TCCR2=5; TCNT2=131; TIMSK=0x40; //16000000/1024/(256-131),8ms

    TCCR2=5; TCNT2=100; TIMSK=0x40; //16000000/1024/(256-100),9.984ms

    TCCR2=5; TCNT2=  6; TIMSK=0x40; //16000000/1024/(256-  6),16ms

 

// 타이머2 CTC 비교 매치 인터럽트-------------------------------------------------------

    TCCR2=0x09; OCR2= 79; TIMSK=0x80; //16000000/1/(1+ 79),5us

    TCCR2=0x09; OCR2=159; TIMSK=0x80; //16000000/1/(1+159),10us

 

    TCCR2=0x0A; OCR2=  9; TIMSK=0x80; //16000000/8/(1+  9),5us

    TCCR2=0x0A; OCR2= 19; TIMSK=0x80; //16000000/8/(1+ 19),10us

    TCCR2=0x0A; OCR2= 39; TIMSK=0x80; //16000000/8/(1+ 39),20us

    TCCR2=0x0A; OCR2= 49; TIMSK=0x80; //16000000/8/(1+ 49),25us

    TCCR2=0x0A; OCR2= 57; TIMSK=0x80; //16000000/8/(1+ 57),29us

    TCCR2=0x0A; OCR2= 59; TIMSK=0x80; //16000000/8/(1+ 59),30us

    TCCR2=0x0A; OCR2= 79; TIMSK=0x80; //16000000/8/(1+ 79),40us

    TCCR2=0x0A; OCR2= 99; TIMSK=0x80; //16000000/8/(1+ 99),50us

    TCCR2=0x0A; OCR2=115; TIMSK=0x80; //16000000/8/(1+115),58us

    TCCR2=0x0A; OCR2=119; TIMSK=0x80; //16000000/8/(1+119),60us

    TCCR2=0x0A; OCR2=139; TIMSK=0x80; //16000000/8/(1+139),70us

    TCCR2=0x0A; OCR2=159; TIMSK=0x80; //16000000/8/(1+159),80us

    TCCR2=0x0A; OCR2=179; TIMSK=0x80; //16000000/8/(1+179),90us

    TCCR2=0x0A; OCR2=199; TIMSK=0x80; //16000000/8/(1+199),100us

 

    TCCR2=0x0B; OCR2=  4; TIMSK=0x80; //16000000/64/(1+  4),20us

    TCCR2=0x0B; OCR2=  9; TIMSK=0x80; //16000000/64/(1+  9),40us

    TCCR2=0x0B; OCR2= 14; TIMSK=0x80; //16000000/64/(1+ 14),60us

    TCCR2=0x0B; OCR2= 19; TIMSK=0x80; //16000000/64/(1+ 19),80us

    TCCR2=0x0B; OCR2= 24; TIMSK=0x80; //16000000/64/(1+ 24),100us

    TCCR2=0x0B; OCR2= 49; TIMSK=0x80; //16000000/64/(1+ 49),200us

    TCCR2=0x0B; OCR2= 74; TIMSK=0x80; //16000000/64/(1+ 74),300us

    TCCR2=0x0B; OCR2= 99; TIMSK=0x80; //16000000/64/(1+ 99),400us

    TCCR2=0x0B; OCR2=124; TIMSK=0x80; //16000000/64/(1+124),500us

    TCCR2=0x0B; OCR2=149; TIMSK=0x80; //16000000/64/(1+149),600us

    TCCR2=0x0B; OCR2=174; TIMSK=0x80; //16000000/64/(1+174),700us

    TCCR2=0x0B; OCR2=199; TIMSK=0x80; //16000000/64/(1+199),800us

    TCCR2=0x0B; OCR2=224; TIMSK=0x80; //16000000/64/(1+224),900us

    TCCR2=0x0B; OCR2=249; TIMSK=0x80; //16000000/64/(1+249),1ms

 

    TCCR2=0x0C; OCR2=  4; TIMSK=0x80; //16000000/256/(1+  4),80us

    TCCR2=0x0C; OCR2= 24; TIMSK=0x80; //16000000/256/(1+ 24),400us

    TCCR2=0x0C; OCR2= 49; TIMSK=0x80; //16000000/256/(1+ 49),800us

    TCCR2=0x0C; OCR2=124; TIMSK=0x80; //16000000/256/(1+124),2ms

    TCCR2=0x0C; OCR2=249; TIMSK=0x80; //16000000/256/(1+249),4ms

 

    TCCR2=0x0D; OCR2=124; TIMSK=0x80; //16000000/1024/(1+124),8ms

    TCCR2=0x0D; OCR2=155; TIMSK=0x80; //16000000/1024/(1+155),9.984ms

    TCCR2=0x0D; OCR2=249; TIMSK=0x80; //16000000/1024/(1+249),16ms

 

 

// 타이머2 CTC 토글 Mode-------------------------------------------------------

    TCCR2=0x99; OCR2= 79; //16000000/1/2/(1+ 79),10us

    TCCR2=0x99; OCR2=159; //16000000/1/2/(1+159),20us

 

    TCCR2=0x9A; OCR2=  9; //16000000/8/2/(1+  9),10us

    TCCR2=0x9A; OCR2= 19; //16000000/8/2/(1+ 19),20us

    TCCR2=0x9A; OCR2= 39; //16000000/8/2/(1+ 39),40us

    TCCR2=0x9A; OCR2= 49; //16000000/8/2/(1+ 49),50us

    TCCR2=0x9A; OCR2= 57; //16000000/8/2/(1+ 57),58us

    TCCR2=0x9A; OCR2= 59; //16000000/8/2/(1+ 59),60us

    TCCR2=0x9A; OCR2= 79; //16000000/8/2/(1+ 79),80us

    TCCR2=0x9A; OCR2= 99; //16000000/8/2/(1+ 99),100us

    TCCR2=0x9A; OCR2=115; //16000000/8/2/(1+115),116us

    TCCR2=0x9A; OCR2=119; //16000000/8/2/(1+119),120us

    TCCR2=0x9A; OCR2=139; //16000000/8/2/(1+139),140us

    TCCR2=0x9A; OCR2=159; //16000000/8/2/(1+159),160us

    TCCR2=0x9A; OCR2=179; //16000000/8/2/(1+179),180us

    TCCR2=0x9A; OCR2=199; //16000000/8/2/(1+199),200us

 

    TCCR2=0x9B; OCR2=  4; //16000000/64/2/(1+  4),40us

    TCCR2=0x9B; OCR2=  9; //16000000/64/2/(1+  9),80us

    TCCR2=0x9B; OCR2= 14; //16000000/64/2/(1+ 14),120us

    TCCR2=0x9B; OCR2= 19; //16000000/64/2/(1+ 19),160us

    TCCR2=0x9B; OCR2= 24; //16000000/64/2/(1+ 24),200us

    TCCR2=0x9B; OCR2= 49; //16000000/64/2/(1+ 49),400us

    TCCR2=0x9B; OCR2= 74; //16000000/64/2/(1+ 74),600us

    TCCR2=0x9B; OCR2= 99; //16000000/64/2/(1+ 99),800us

    TCCR2=0x9B; OCR2=124; //16000000/64/2/(1+124),1ms

    TCCR2=0x9B; OCR2=149; //16000000/64/2/(1+149),1.2ms

    TCCR2=0x9B; OCR2=174; //16000000/64/2/(1+174),1.4ms

    TCCR2=0x9B; OCR2=199; //16000000/64/2/(1+199),1.6mus

    TCCR2=0x9B; OCR2=224; //16000000/64/2/(1+224),1.8ms

    TCCR2=0x9B; OCR2=249; //16000000/64/2/(1+249),2ms

 

    TCCR2=0x9C; OCR2=  4; //16000000/256/2/(1+  4),160us

    TCCR2=0x9C; OCR2= 24; //16000000/256/2/(1+ 24),800us

    TCCR2=0x9C; OCR2= 49; //16000000/256/2/(1+ 49),1.6ms

    TCCR2=0x9C; OCR2=124; //16000000/256/2/(1+124),4ms

    TCCR2=0x9C; OCR2=249; //16000000/256/2/(1+249),8ms

 

    TCCR2=0x9D; OCR2= 77; //16000000/1024/2/(1+ 77),9.984ms

    TCCR2=0x9D; OCR2=124; //16000000/1024/2/(1+124),16ms

    TCCR2=0x9D; OCR2=155; //16000000/1024/2/(1+155),19.968ms

    TCCR2=0x9D; OCR2=249; //16000000/1024/2/(1+249),32ms

 

 

// 타이머2 Fast PWM Mode // COM0x=2 Bottom(0x00)에서 Set(5V), OCR2에서 Clear(0V)

    TCCR2=0x69; //주기=16000000/   1/256=62500.0000000Hz=    16us

    TCCR2=0x6A; //주기=16000000/   8/256= 7812.5000000Hz=   128us

    TCCR2=0x6B; //주기=16000000/  64/256= 976.56250000Hz= 1.024ms

    TCCR2=0x6C; //주기=16000000/ 256/256= 244.14062500Hz= 4.096ms

    TCCR2=0x6D; //주기=16000000/1024/256=  61.03515625Hz=16.384ms

 

// 타이머2 Fast PWM Mode // COM0x=3 Bottom(0x00)에서 Clear(0V), OCR2에서 Set(5V)

    TCCR2=0x79; //주기=16000000/   1/256=62500.0000000Hz=    16us

    TCCR2=0x7A; //주기=16000000/   8/256= 7812.5000000Hz=   128us

    TCCR2=0x7B; //주기=16000000/  64/256= 976.56250000Hz= 1.024ms

    TCCR2=0x7C; //주기=16000000/ 256/256= 244.14062500Hz= 4.096ms

    TCCR2=0x7D; //주기=16000000/1024/256=  61.03515625Hz=16.384ms

 

 

// 타이머2 Phase Correct PWM Mode // COM0x=2 Bottom(0x00)~OCR2구간 Set(5V), OCR2~TOP구간 Clear(0V)

    TCCR2=0x61; //주기=16000000/   1/510=31372.549019607843137254901960784Hz=31.875us

    TCCR2=0x62; //주기=16000000/   8/510= 3921.568627450980392156862745098Hz=255us

    TCCR2=0x63; //주기=16000000/  64/510=490.19607843137254901960784313725Hz=2.04ms

    TCCR2=0x64; //주기=16000000/ 256/510=122.54901960784313725490196078431Hz=8.16ms

    TCCR2=0x65; //주기=16000000/1024/510=30.637254901960784313725490196078Hz=32.64ms

 

// 타이머2 Phase Correct PWM Mode // COM0x=3 Bottom(0x00)~OCR2구간 Clear(0V), OCR2~TOP구간 Set(5V)

    TCCR2=0x71; //주기=16000000/   1/510=31372.549019607843137254901960784Hz=31.875us

    TCCR2=0x72; //주기=16000000/   8/510= 3921.568627450980392156862745098Hz=255us

    TCCR2=0x73; //주기=16000000/  64/510=490.19607843137254901960784313725Hz=2.04ms

    TCCR2=0x74; //주기=16000000/ 256/510=122.54901960784313725490196078431Hz=8.16ms

    TCCR2=0x75; //주기=16000000/1024/510=30.637254901960784313725490196078Hz=32.64ms

 

 

// 타이머1 오버플로우 인터럽트

    TCCR1B=1; TCNT1=65456; TIMSK=4; //5us

    TCCR1B=1; TCNT1=65376; TIMSK=4; //10us

    TCCR1B=1; TCNT1=65216; TIMSK=4; //20us

    TCCR1B=1; TCNT1=65136; TIMSK=4; //25us

    TCCR1B=1; TCNT1=65072; TIMSK=4; //29us

    TCCR1B=1; TCNT1=65056; TIMSK=4; //30us

    TCCR1B=1; TCNT1=64896; TIMSK=4; //40us

    TCCR1B=1; TCNT1=64736; TIMSK=4; //50us

    TCCR1B=1; TCNT1=64608; TIMSK=4; //58us

    TCCR1B=1; TCNT1=64576; TIMSK=4; //60us

    TCCR1B=1; TCNT1=64416; TIMSK=4; //70us

    TCCR1B=1; TCNT1=64256; TIMSK=4; //80us

    TCCR1B=1; TCNT1=64096; TIMSK=4; //90us

    TCCR1B=1; TCNT1=63936; TIMSK=4; //100us

    TCCR1B=1; TCNT1=62336; TIMSK=4; //200us

    TCCR1B=1; TCNT1=61536; TIMSK=4; //250us

    TCCR1B=1; TCNT1=60736; TIMSK=4; //300us

    TCCR1B=1; TCNT1=59136; TIMSK=4; //400us

    TCCR1B=1; TCNT1=57536; TIMSK=4; //500us

    TCCR1B=1; TCNT1=55936; TIMSK=4; //600us

    TCCR1B=1; TCNT1=54336; TIMSK=4; //700us

    TCCR1B=1; TCNT1=52736; TIMSK=4; //800us

    TCCR1B=1; TCNT1=51136; TIMSK=4; //900us

    TCCR1B=1; TCNT1=49536; TIMSK=4; //1ms

    TCCR1B=1; TCNT1=33536; TIMSK=4; //2ms

    TCCR1B=1; TCNT1=25536; TIMSK=4; //2.5ms

    TCCR1B=1; TCNT1=17536; TIMSK=4; //3ms

    TCCR1B=1; TCNT1= 1536; TIMSK=4; //4ms

 

    TCCR1B=2; TCNT1=65526; TIMSK=4; //5us

    TCCR1B=2; TCNT1=65516; TIMSK=4; //10us

    TCCR1B=2; TCNT1=65496; TIMSK=4; //20us

    TCCR1B=2; TCNT1=65486; TIMSK=4; //25us

    TCCR1B=2; TCNT1=65478; TIMSK=4; //29us

    TCCR1B=2; TCNT1=65476; TIMSK=4; //30us

    TCCR1B=2; TCNT1=65456; TIMSK=4; //40us

    TCCR1B=2; TCNT1=65436; TIMSK=4; //50us

    TCCR1B=2; TCNT1=65420; TIMSK=4; //58us

    TCCR1B=2; TCNT1=65416; TIMSK=4; //60us

    TCCR1B=2; TCNT1=65396; TIMSK=4; //70us

    TCCR1B=2; TCNT1=65376; TIMSK=4; //80us

    TCCR1B=2; TCNT1=65356; TIMSK=4; //90us

    TCCR1B=2; TCNT1=65336; TIMSK=4; //100us

    TCCR1B=2; TCNT1=65136; TIMSK=4; //200us

    TCCR1B=2; TCNT1=65036; TIMSK=4; //250us

    TCCR1B=2; TCNT1=64936; TIMSK=4; //300us

    TCCR1B=2; TCNT1=64736; TIMSK=4; //400us

    TCCR1B=2; TCNT1=64536; TIMSK=4; //500us

    TCCR1B=2; TCNT1=64336; TIMSK=4; //600us

    TCCR1B=2; TCNT1=64136; TIMSK=4; //700us

    TCCR1B=2; TCNT1=63936; TIMSK=4; //800us

    TCCR1B=2; TCNT1=63736; TIMSK=4; //900us

    TCCR1B=2; TCNT1=63536; TIMSK=4; //1ms

    TCCR1B=2; TCNT1=61536; TIMSK=4; //2ms

    TCCR1B=2; TCNT1=60536; TIMSK=4; //2.5ms

    TCCR1B=2; TCNT1=59536; TIMSK=4; //3ms

    TCCR1B=2; TCNT1=57536; TIMSK=4; //4ms

    TCCR1B=2; TCNT1=55536; TIMSK=4; //5ms

    TCCR1B=2; TCNT1=53536; TIMSK=4; //6ms

    TCCR1B=2; TCNT1=51536; TIMSK=4; //7ms

    TCCR1B=2; TCNT1=49536; TIMSK=4; //8ms

    TCCR1B=2; TCNT1=47536; TIMSK=4; //9ms

    TCCR1B=2; TCNT1=45536; TIMSK=4; //10ms

    TCCR1B=2; TCNT1=33536; TIMSK=4; //16ms

    TCCR1B=2; TCNT1=25536; TIMSK=4; //20ms

    TCCR1B=2; TCNT1=15536; TIMSK=4; //25ms

    TCCR1B=2; TCNT1= 5536; TIMSK=4; //30ms

 

    TCCR1B=3; TCNT1=65531; TIMSK=4; //20us

    TCCR1B=3; TCNT1=65526; TIMSK=4; //40us

    TCCR1B=3; TCNT1=65521; TIMSK=4; //60us

    TCCR1B=3; TCNT1=65516; TIMSK=4; //80us

    TCCR1B=3; TCNT1=65511; TIMSK=4; //100us

    TCCR1B=3; TCNT1=65486; TIMSK=4; //200us

    TCCR1B=3; TCNT1=65461; TIMSK=4; //300us

    TCCR1B=3; TCNT1=65436; TIMSK=4; //400us

    TCCR1B=3; TCNT1=65411; TIMSK=4; //500us

    TCCR1B=3; TCNT1=65386; TIMSK=4; //600us

    TCCR1B=3; TCNT1=65361; TIMSK=4; //700us

    TCCR1B=3; TCNT1=65336; TIMSK=4; //800us

    TCCR1B=3; TCNT1=65311; TIMSK=4; //900us

    TCCR1B=3; TCNT1=65286; TIMSK=4; //1ms

    TCCR1B=3; TCNT1=65036; TIMSK=4; //2ms

    TCCR1B=3; TCNT1=64911; TIMSK=4; //2.5ms

    TCCR1B=3; TCNT1=64786; TIMSK=4; //3ms

    TCCR1B=3; TCNT1=64536; TIMSK=4; //4ms

    TCCR1B=3; TCNT1=64286; TIMSK=4; //5ms

    TCCR1B=3; TCNT1=64036; TIMSK=4; //6ms

    TCCR1B=3; TCNT1=63786; TIMSK=4; //7ms

    TCCR1B=3; TCNT1=63536; TIMSK=4; //8ms

    TCCR1B=3; TCNT1=63286; TIMSK=4; //9ms

    TCCR1B=3; TCNT1=63036; TIMSK=4; //10ms

    TCCR1B=3; TCNT1=61536; TIMSK=4; //16ms

    TCCR1B=3; TCNT1=60536; TIMSK=4; //20ms

    TCCR1B=3; TCNT1=59286; TIMSK=4; //25ms

    TCCR1B=3; TCNT1=58036; TIMSK=4; //30ms

    TCCR1B=3; TCNT1=55536; TIMSK=4; //40ms

    TCCR1B=3; TCNT1=53036; TIMSK=4; //50ms

    TCCR1B=3; TCNT1=50536; TIMSK=4; //60ms

    TCCR1B=3; TCNT1=48036; TIMSK=4; //70ms

    TCCR1B=3; TCNT1=45536; TIMSK=4; //80ms

    TCCR1B=3; TCNT1=43036; TIMSK=4; //90ms

    TCCR1B=3; TCNT1=40536; TIMSK=4; //100ms

    TCCR1B=3; TCNT1=15536; TIMSK=4; //200ms

    TCCR1B=3; TCNT1= 3036; TIMSK=4; //250ms

 

    TCCR1B=4; TCNT1=65531; TIMSK=4; //80us

    TCCR1B=4; TCNT1=65511; TIMSK=4; //400us

    TCCR1B=4; TCNT1=65486; TIMSK=4; //800us

    TCCR1B=4; TCNT1=65411; TIMSK=4; //2ms

    TCCR1B=4; TCNT1=65286; TIMSK=4; //4ms

    TCCR1B=4; TCNT1=65161; TIMSK=4; //6ms

    TCCR1B=4; TCNT1=65036; TIMSK=4; //8ms

    TCCR1B=4; TCNT1=64911; TIMSK=4; //10ms

    TCCR1B=4; TCNT1=64536; TIMSK=4; //16ms

    TCCR1B=4; TCNT1=64286; TIMSK=4; //20ms

    TCCR1B=4; TCNT1=63661; TIMSK=4; //30ms

    TCCR1B=4; TCNT1=63036; TIMSK=4; //40ms

    TCCR1B=4; TCNT1=62411; TIMSK=4; //50ms

    TCCR1B=4; TCNT1=61786; TIMSK=4; //60ms

    TCCR1B=4; TCNT1=61161; TIMSK=4; //70ms

    TCCR1B=4; TCNT1=60536; TIMSK=4; //80ms

    TCCR1B=4; TCNT1=59911; TIMSK=4; //90ms

    TCCR1B=4; TCNT1=59286; TIMSK=4; //100ms

    TCCR1B=4; TCNT1=53036; TIMSK=4; //200ms

    TCCR1B=4; TCNT1=49911; TIMSK=4; //250ms

    TCCR1B=4; TCNT1=46786; TIMSK=4; //300ms

    TCCR1B=4; TCNT1=40536; TIMSK=4; //400ms

    TCCR1B=4; TCNT1=34286; TIMSK=4; //500ms

    TCCR1B=4; TCNT1=28036; TIMSK=4; //600ms

    TCCR1B=4; TCNT1=21786; TIMSK=4; //700ms

    TCCR1B=4; TCNT1=15536; TIMSK=4; //800ms

    TCCR1B=4; TCNT1= 9286; TIMSK=4; //900ms

    TCCR1B=4; TCNT1= 3036; TIMSK=4; //1sec

 

    TCCR1B=5; TCNT1=65411; TIMSK=4; //8ms

    TCCR1B=5; TCNT1=65286; TIMSK=4; //16ms

    TCCR1B=5; TCNT1=64911; TIMSK=4; //40ms

    TCCR1B=5; TCNT1=64286; TIMSK=4; //80ms

    TCCR1B=5; TCNT1=62411; TIMSK=4; //200ms

    TCCR1B=5; TCNT1=59286; TIMSK=4; //400ms

    TCCR1B=5; TCNT1=56161; TIMSK=4; //600ms

    TCCR1B=5; TCNT1=53036; TIMSK=4; //800ms

    TCCR1B=5; TCNT1=49911; TIMSK=4; //1sec

    TCCR1B=5; TCNT1=34286; TIMSK=4; //2sec

    TCCR1B=5; TCNT1=18661; TIMSK=4; //3sec

    TCCR1B=5; TCNT1= 3036; TIMSK=4; //4sec

 

 

// 타이머1 A매치 인터럽트

    TCCR1B=0x09; OCR1A=79; TIMSK=0x10; //5us

    TCCR1B=0x09; OCR1A=159; TIMSK=0x10; //10us

    TCCR1B=0x09; OCR1A=319; TIMSK=0x10; //20us

    TCCR1B=0x09; OCR1A=399; TIMSK=0x10; //25us

    TCCR1B=0x09; OCR1A=463; TIMSK=0x10; //29us

    TCCR1B=0x09; OCR1A=479; TIMSK=0x10; //30us

    TCCR1B=0x09; OCR1A=639; TIMSK=0x10; //40us

    TCCR1B=0x09; OCR1A=799; TIMSK=0x10; //50us

    TCCR1B=0x09; OCR1A=927; TIMSK=0x10; //58us

    TCCR1B=0x09; OCR1A=959; TIMSK=0x10; //60us

    TCCR1B=0x09; OCR1A=1119; TIMSK=0x10; //70us

    TCCR1B=0x09; OCR1A=1279; TIMSK=0x10; //80us

    TCCR1B=0x09; OCR1A=1439; TIMSK=0x10; //90us

    TCCR1B=0x09; OCR1A=1599; TIMSK=0x10; //100us

    TCCR1B=0x09; OCR1A=3199; TIMSK=0x10; //200us

    TCCR1B=0x09; OCR1A=3999; TIMSK=0x10; //250us

    TCCR1B=0x09; OCR1A=4799; TIMSK=0x10; //300us

    TCCR1B=0x09; OCR1A=6399; TIMSK=0x10; //400us

    TCCR1B=0x09; OCR1A=7999; TIMSK=0x10; //500us

    TCCR1B=0x09; OCR1A=9599; TIMSK=0x10; //600us

    TCCR1B=0x09; OCR1A=11199; TIMSK=0x10; //700us

    TCCR1B=0x09; OCR1A=12799; TIMSK=0x10; //800us

    TCCR1B=0x09; OCR1A=14399; TIMSK=0x10; //900us

    TCCR1B=0x09; OCR1A=15999; TIMSK=0x10; //1ms

    TCCR1B=0x09; OCR1A=31999; TIMSK=0x10; //2ms

    TCCR1B=0x09; OCR1A=39999; TIMSK=0x10; //2.5ms

    TCCR1B=0x09; OCR1A=47999; TIMSK=0x10; //3ms

    TCCR1B=0x09; OCR1A=63999; TIMSK=0x10; //4ms

 

    TCCR1B=0x0A; OCR1A=9; TIMSK=0x10; //5us

    TCCR1B=0x0A; OCR1A=19; TIMSK=0x10; //10us

    TCCR1B=0x0A; OCR1A=39; TIMSK=0x10; //20us

    TCCR1B=0x0A; OCR1A=49; TIMSK=0x10; //25us

    TCCR1B=0x0A; OCR1A=57; TIMSK=0x10; //29us

    TCCR1B=0x0A; OCR1A=59; TIMSK=0x10; //30us

    TCCR1B=0x0A; OCR1A=79; TIMSK=0x10; //40us

    TCCR1B=0x0A; OCR1A=99; TIMSK=0x10; //50us

    TCCR1B=0x0A; OCR1A=115; TIMSK=0x10; //58us

    TCCR1B=0x0A; OCR1A=119; TIMSK=0x10; //60us

    TCCR1B=0x0A; OCR1A=139; TIMSK=0x10; //70us

    TCCR1B=0x0A; OCR1A=159; TIMSK=0x10; //80us

    TCCR1B=0x0A; OCR1A=179; TIMSK=0x10; //90us

    TCCR1B=0x0A; OCR1A=199; TIMSK=0x10; //100us

    TCCR1B=0x0A; OCR1A=399; TIMSK=0x10; //200us

    TCCR1B=0x0A; OCR1A=499; TIMSK=0x10; //250us

    TCCR1B=0x0A; OCR1A=599; TIMSK=0x10; //300us

    TCCR1B=0x0A; OCR1A=799; TIMSK=0x10; //400us

    TCCR1B=0x0A; OCR1A=999; TIMSK=0x10; //500us

    TCCR1B=0x0A; OCR1A=1199; TIMSK=0x10; //600us

    TCCR1B=0x0A; OCR1A=1399; TIMSK=0x10; //700us

    TCCR1B=0x0A; OCR1A=1599; TIMSK=0x10; //800us

    TCCR1B=0x0A; OCR1A=1799; TIMSK=0x10; //900us

    TCCR1B=0x0A; OCR1A=1999; TIMSK=0x10; //1ms

    TCCR1B=0x0A; OCR1A=3999; TIMSK=0x10; //2ms

    TCCR1B=0x0A; OCR1A=4999; TIMSK=0x10; //2.5ms

    TCCR1B=0x0A; OCR1A=5999; TIMSK=0x10; //3ms

    TCCR1B=0x0A; OCR1A=7999; TIMSK=0x10; //4ms

    TCCR1B=0x0A; OCR1A=9999; TIMSK=0x10; //5ms

    TCCR1B=0x0A; OCR1A=11999; TIMSK=0x10; //6ms

    TCCR1B=0x0A; OCR1A=13999; TIMSK=0x10; //7ms

    TCCR1B=0x0A; OCR1A=15999; TIMSK=0x10; //8ms

    TCCR1B=0x0A; OCR1A=17999; TIMSK=0x10; //9ms

    TCCR1B=0x0A; OCR1A=19999; TIMSK=0x10; //10ms

    TCCR1B=0x0A; OCR1A=31999; TIMSK=0x10; //16ms

    TCCR1B=0x0A; OCR1A=39999; TIMSK=0x10; //20ms

    TCCR1B=0x0A; OCR1A=49999; TIMSK=0x10; //25ms

    TCCR1B=0x0A; OCR1A=59999; TIMSK=0x10; //30ms

 

    TCCR1B=0x0B; OCR1A=4; TIMSK=0x10; //20us

    TCCR1B=0x0B; OCR1A=9; TIMSK=0x10; //40us

    TCCR1B=0x0B; OCR1A=14; TIMSK=0x10; //60us

    TCCR1B=0x0B; OCR1A=19; TIMSK=0x10; //80us

    TCCR1B=0x0B; OCR1A=24; TIMSK=0x10; //100us

    TCCR1B=0x0B; OCR1A=49; TIMSK=0x10; //200us

    TCCR1B=0x0B; OCR1A=74; TIMSK=0x10; //300us

    TCCR1B=0x0B; OCR1A=99; TIMSK=0x10; //400us

    TCCR1B=0x0B; OCR1A=124; TIMSK=0x10; //500us

    TCCR1B=0x0B; OCR1A=149; TIMSK=0x10; //600us

    TCCR1B=0x0B; OCR1A=174; TIMSK=0x10; //700us

    TCCR1B=0x0B; OCR1A=199; TIMSK=0x10; //800us

    TCCR1B=0x0B; OCR1A=224; TIMSK=0x10; //900us

    TCCR1B=0x0B; OCR1A=249; TIMSK=0x10; //1ms

    TCCR1B=0x0B; OCR1A=499; TIMSK=0x10; //2ms

    TCCR1B=0x0B; OCR1A=624; TIMSK=0x10; //2.5ms

    TCCR1B=0x0B; OCR1A=749; TIMSK=0x10; //3ms

    TCCR1B=0x0B; OCR1A=999; TIMSK=0x10; //4ms

    TCCR1B=0x0B; OCR1A=1249; TIMSK=0x10; //5ms

    TCCR1B=0x0B; OCR1A=1499; TIMSK=0x10; //6ms

    TCCR1B=0x0B; OCR1A=1749; TIMSK=0x10; //7ms

    TCCR1B=0x0B; OCR1A=1999; TIMSK=0x10; //8ms

    TCCR1B=0x0B; OCR1A=2249; TIMSK=0x10; //9ms

    TCCR1B=0x0B; OCR1A=2499; TIMSK=0x10; //10ms

    TCCR1B=0x0B; OCR1A=3999; TIMSK=0x10; //16ms

    TCCR1B=0x0B; OCR1A=4999; TIMSK=0x10; //20ms

    TCCR1B=0x0B; OCR1A=6249; TIMSK=0x10; //25ms

    TCCR1B=0x0B; OCR1A=7499; TIMSK=0x10; //30ms

    TCCR1B=0x0B; OCR1A=9999; TIMSK=0x10; //40ms

    TCCR1B=0x0B; OCR1A=12499; TIMSK=0x10; //50ms

    TCCR1B=0x0B; OCR1A=14999; TIMSK=0x10; //60ms

    TCCR1B=0x0B; OCR1A=17499; TIMSK=0x10; //70ms

    TCCR1B=0x0B; OCR1A=19999; TIMSK=0x10; //80ms

    TCCR1B=0x0B; OCR1A=22499; TIMSK=0x10; //90ms

    TCCR1B=0x0B; OCR1A=24999; TIMSK=0x10; //100ms

    TCCR1B=0x0B; OCR1A=49999; TIMSK=0x10; //200ms

    TCCR1B=0x0B; OCR1A=62499; TIMSK=0x10; //250ms

 

    TCCR1B=0x0C; OCR1A=4; TIMSK=0x10; //80us

    TCCR1B=0x0C; OCR1A=24; TIMSK=0x10; //400us

    TCCR1B=0x0C; OCR1A=49; TIMSK=0x10; //800us

    TCCR1B=0x0C; OCR1A=124; TIMSK=0x10; //2ms

    TCCR1B=0x0C; OCR1A=249; TIMSK=0x10; //4ms

    TCCR1B=0x0C; OCR1A=374; TIMSK=0x10; //6ms

    TCCR1B=0x0C; OCR1A=499; TIMSK=0x10; //8ms

    TCCR1B=0x0C; OCR1A=624; TIMSK=0x10; //10ms

    TCCR1B=0x0C; OCR1A=999; TIMSK=0x10; //16ms

    TCCR1B=0x0C; OCR1A=1249; TIMSK=0x10; //20ms

    TCCR1B=0x0C; OCR1A=1874; TIMSK=0x10; //30ms

    TCCR1B=0x0C; OCR1A=2499; TIMSK=0x10; //40ms

    TCCR1B=0x0C; OCR1A=3124; TIMSK=0x10; //50ms

    TCCR1B=0x0C; OCR1A=3749; TIMSK=0x10; //60ms

    TCCR1B=0x0C; OCR1A=4374; TIMSK=0x10; //70ms

    TCCR1B=0x0C; OCR1A=4999; TIMSK=0x10; //80ms

    TCCR1B=0x0C; OCR1A=5624; TIMSK=0x10; //90ms

    TCCR1B=0x0C; OCR1A=6249; TIMSK=0x10; //100ms

    TCCR1B=0x0C; OCR1A=12499; TIMSK=0x10; //200ms

    TCCR1B=0x0C; OCR1A=15624; TIMSK=0x10; //250ms

    TCCR1B=0x0C; OCR1A=18749; TIMSK=0x10; //300ms

    TCCR1B=0x0C; OCR1A=24999; TIMSK=0x10; //400ms

    TCCR1B=0x0C; OCR1A=31249; TIMSK=0x10; //500ms

    TCCR1B=0x0C; OCR1A=37499; TIMSK=0x10; //600ms

    TCCR1B=0x0C; OCR1A=43749; TIMSK=0x10; //700ms

    TCCR1B=0x0C; OCR1A=49999; TIMSK=0x10; //800ms

    TCCR1B=0x0C; OCR1A=56249; TIMSK=0x10; //900ms

    TCCR1B=0x0C; OCR1A=62499; TIMSK=0x10; //1sec

 

    TCCR1B=0x0D; OCR1A=124; TIMSK=0x10; //8ms

    TCCR1B=0x0D; OCR1A=249; TIMSK=0x10; //16ms

    TCCR1B=0x0D; OCR1A=624; TIMSK=0x10; //40ms

    TCCR1B=0x0D; OCR1A=1249; TIMSK=0x10; //80ms

    TCCR1B=0x0D; OCR1A=3124; TIMSK=0x10; //200ms

    TCCR1B=0x0D; OCR1A=6249; TIMSK=0x10; //400ms

    TCCR1B=0x0D; OCR1A=9374; TIMSK=0x10; //600ms

    TCCR1B=0x0D; OCR1A=12499; TIMSK=0x10; //800ms

    TCCR1B=0x0D; OCR1A=15624; TIMSK=0x10; //1sec

    TCCR1B=0x0D; OCR1A=31249; TIMSK=0x10; //2sec

    TCCR1B=0x0D; OCR1A=46874; TIMSK=0x10; //3sec

    TCCR1B=0x0D; OCR1A=62499; TIMSK=0x10; //4sec

 

// 타이머1 CTC 토글 Mode-------------------------------------------------------

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=39; // 5us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=79; // 10us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=159; // 20us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=199; // 25us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=231; // 29us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=239; // 30us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=319; // 40us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=399; // 50us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=463; // 58us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=479; // 60us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=559; // 70us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=639; // 80us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=719; // 90us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=799; // 100us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=1599; // 200us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=1999; // 250us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=2399; // 300us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=3199; // 400us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=3999; // 500us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=4799; // 600us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=5599; // 700us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=6399; // 800us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=7199; // 900us

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=7999; // 1ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=15999; // 2ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=19999; // 2.5ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=23999; // 3ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=31999; // 4ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=39999; // 5ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=47999; // 6ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=55999; // 7ms

    TCCR1A=0x40; TCCR1B=9; TCCR1C=0x80; OCR1A=63999; // 8ms

 

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=4; // 5us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=9; // 10us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=19; // 20us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=24; // 25us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=28; // 29us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=29; // 30us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=39; // 40us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=49; // 50us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=57; // 58us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=59; // 60us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=69; // 70us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=79; // 80us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=89; // 90us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=99; // 100us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=199; // 200us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=249; // 250us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=299; // 300us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=399; // 400us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=499; // 500us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=599; // 600us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=699; // 700us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=799; // 800us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=899; // 900us

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=999; // 1ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=1999; // 2ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=2499; // 2.5ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=2999; // 3ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=3999; // 4ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=4999; // 5ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=5999; // 6ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=6999; // 7ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=7999; // 8ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=8999; // 9ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=9999; // 10ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=15999; // 16ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=19999; // 20ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=24999; // 25ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=29999; // 30ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=39999; // 40ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=49999; // 50ms

    TCCR1A=0x40; TCCR1B=0x0A; TCCR1C=0x80; OCR1A=59999; // 60ms

 

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=4; // 40us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=9; // 80us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=24; // 200us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=49; // 400us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=74; // 600us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=99; // 800us

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=124; // 1ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=249; // 2ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=374; // 3ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=499; // 4ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=624; // 5ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=749; // 6ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=874; // 7ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=999; // 8ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=1124; // 9ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=1249; // 10ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=1999; // 16ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=2499; // 20ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=3124; // 25ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=3749; // 30ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=4999; // 40ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=6249; // 50ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=7499; // 60ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=8749; // 70ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=9999; // 80ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=11249; // 90ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=12499; // 100ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=24999; // 200ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=31249; // 250ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=37499; // 300ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=49999; // 400ms

    TCCR1A=0x40; TCCR1B=0x0B; TCCR1C=0x80; OCR1A=62499; // 500ms

 

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=24; // 800us

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=124; // 4ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=249; // 8ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=499; // 16ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=624; // 20ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=1249; // 40ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=1874; // 60ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=2499; // 80ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=3124; // 100ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=6249; // 200ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=9374; // 300ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=12499; // 400ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=15624; // 500ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=18749; // 600ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=21874; // 700ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=24999; // 800ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=28124; // 900ms

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=31249; // 1sec

    TCCR1A=0x40; TCCR1B=0x0C; TCCR1C=0x80; OCR1A=62499; // 2sec

 

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=124; // 16ms

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=624; // 80ms

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=3124; // 400ms

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=6249; // 800ms

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=15624; // 2sec

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=31249; // 4sec

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=46874; // 6sec

    TCCR1A=0x40; TCCR1B=0x0D; TCCR1C=0x80; OCR1A=62499; // 8sec

 

 

 

// 타이머3 오버플로우 인터럽트

    TCCR3B=1; TCNT3H=65456>>8; TCNT3L=65456&0xFF; ETIMSK=4; //5us

    TCCR3B=1; TCNT3H=65376>>8; TCNT3L=65376&0xFF; ETIMSK=4; //10us

    TCCR3B=1; TCNT3H=65216>>8; TCNT3L=65216&0xFF; ETIMSK=4; //20us

    TCCR3B=1; TCNT3H=65136>>8; TCNT3L=65136&0xFF; ETIMSK=4; //25us

    TCCR3B=1; TCNT3H=65072>>8; TCNT3L=65072&0xFF; ETIMSK=4; //29us

    TCCR3B=1; TCNT3H=65056>>8; TCNT3L=65056&0xFF; ETIMSK=4; //30us

    TCCR3B=1; TCNT3H=64896>>8; TCNT3L=64896&0xFF; ETIMSK=4; //40us

    TCCR3B=1; TCNT3H=64736>>8; TCNT3L=64736&0xFF; ETIMSK=4; //50us

    TCCR3B=1; TCNT3H=64608>>8; TCNT3L=64608&0xFF; ETIMSK=4; //58us

    TCCR3B=1; TCNT3H=64576>>8; TCNT3L=64576&0xFF; ETIMSK=4; //60us

    TCCR3B=1; TCNT3H=64416>>8; TCNT3L=64416&0xFF; ETIMSK=4; //70us

    TCCR3B=1; TCNT3H=64256>>8; TCNT3L=64256&0xFF; ETIMSK=4; //80us

    TCCR3B=1; TCNT3H=64096>>8; TCNT3L=64096&0xFF; ETIMSK=4; //90us

    TCCR3B=1; TCNT3H=63936>>8; TCNT3L=63936&0xFF; ETIMSK=4; //100us

    TCCR3B=1; TCNT3H=62336>>8; TCNT3L=62336&0xFF; ETIMSK=4; //200us

    TCCR3B=1; TCNT3H=61536>>8; TCNT3L=61536&0xFF; ETIMSK=4; //250us

    TCCR3B=1; TCNT3H=60736>>8; TCNT3L=60736&0xFF; ETIMSK=4; //300us

    TCCR3B=1; TCNT3H=59136>>8; TCNT3L=59136&0xFF; ETIMSK=4; //400us

    TCCR3B=1; TCNT3H=57536>>8; TCNT3L=57536&0xFF; ETIMSK=4; //500us

    TCCR3B=1; TCNT3H=55936>>8; TCNT3L=55936&0xFF; ETIMSK=4; //600us

    TCCR3B=1; TCNT3H=54336>>8; TCNT3L=54336&0xFF; ETIMSK=4; //700us

    TCCR3B=1; TCNT3H=52736>>8; TCNT3L=52736&0xFF; ETIMSK=4; //800us

    TCCR3B=1; TCNT3H=51136>>8; TCNT3L=51136&0xFF; ETIMSK=4; //900us

    TCCR3B=1; TCNT3H=49536>>8; TCNT3L=49536&0xFF; ETIMSK=4; //1ms

    TCCR3B=1; TCNT3H=33536>>8; TCNT3L=33536&0xFF; ETIMSK=4; //2ms

    TCCR3B=1; TCNT3H=25536>>8; TCNT3L=25536&0xFF; ETIMSK=4; //2.5ms

    TCCR3B=1; TCNT3H=17536>>8; TCNT3L=17536&0xFF; ETIMSK=4; //3ms

    TCCR3B=1; TCNT3H= 1536>>8; TCNT3L= 1536&0xFF; ETIMSK=4; //4ms

 

    TCCR3B=2; TCNT3H=65526>>8; TCNT3L=65526&0xFF; ETIMSK=4; //5us

    TCCR3B=2; TCNT3H=65516>>8; TCNT3L=65516&0xFF; ETIMSK=4; //10us

    TCCR3B=2; TCNT3H=65496>>8; TCNT3L=65496&0xFF; ETIMSK=4; //20us

    TCCR3B=2; TCNT3H=65486>>8; TCNT3L=65486&0xFF; ETIMSK=4; //25us

    TCCR3B=2; TCNT3H=65478>>8; TCNT3L=65478&0xFF; ETIMSK=4; //29us

    TCCR3B=2; TCNT3H=65476>>8; TCNT3L=65476&0xFF; ETIMSK=4; //30us

    TCCR3B=2; TCNT3H=65456>>8; TCNT3L=65456&0xFF; ETIMSK=4; //40us

    TCCR3B=2; TCNT3H=65436>>8; TCNT3L=65436&0xFF; ETIMSK=4; //50us

    TCCR3B=2; TCNT3H=65420>>8; TCNT3L=65420&0xFF; ETIMSK=4; //58us

    TCCR3B=2; TCNT3H=65416>>8; TCNT3L=65416&0xFF; ETIMSK=4; //60us

    TCCR3B=2; TCNT3H=65396>>8; TCNT3L=65396&0xFF; ETIMSK=4; //70us

    TCCR3B=2; TCNT3H=65376>>8; TCNT3L=65376&0xFF; ETIMSK=4; //80us

    TCCR3B=2; TCNT3H=65356>>8; TCNT3L=65356&0xFF; ETIMSK=4; //90us

    TCCR3B=2; TCNT3H=65336>>8; TCNT3L=65336&0xFF; ETIMSK=4; //100us

    TCCR3B=2; TCNT3H=65136>>8; TCNT3L=65136&0xFF; ETIMSK=4; //200us

    TCCR3B=2; TCNT3H=65036>>8; TCNT3L=65036&0xFF; ETIMSK=4; //250us

    TCCR3B=2; TCNT3H=64936>>8; TCNT3L=64936&0xFF; ETIMSK=4; //300us

    TCCR3B=2; TCNT3H=64736>>8; TCNT3L=64736&0xFF; ETIMSK=4; //400us

    TCCR3B=2; TCNT3H=64536>>8; TCNT3L=64536&0xFF; ETIMSK=4; //500us

    TCCR3B=2; TCNT3H=64336>>8; TCNT3L=64336&0xFF; ETIMSK=4; //600us

    TCCR3B=2; TCNT3H=64136>>8; TCNT3L=64136&0xFF; ETIMSK=4; //700us

    TCCR3B=2; TCNT3H=63936>>8; TCNT3L=63936&0xFF; ETIMSK=4; //800us

    TCCR3B=2; TCNT3H=63736>>8; TCNT3L=63736&0xFF; ETIMSK=4; //900us

    TCCR3B=2; TCNT3H=63536>>8; TCNT3L=63536&0xFF; ETIMSK=4; //1ms

    TCCR3B=2; TCNT3H=61536>>8; TCNT3L=61536&0xFF; ETIMSK=4; //2ms

    TCCR3B=2; TCNT3H=60536>>8; TCNT3L=60536&0xFF; ETIMSK=4; //2.5ms

    TCCR3B=2; TCNT3H=59536>>8; TCNT3L=59536&0xFF; ETIMSK=4; //3ms

    TCCR3B=2; TCNT3H=57536>>8; TCNT3L=57536&0xFF; ETIMSK=4; //4ms

    TCCR3B=2; TCNT3H=55536>>8; TCNT3L=55536&0xFF; ETIMSK=4; //5ms

    TCCR3B=2; TCNT3H=53536>>8; TCNT3L=53536&0xFF; ETIMSK=4; //6ms

    TCCR3B=2; TCNT3H=51536>>8; TCNT3L=51536&0xFF; ETIMSK=4; //7ms

    TCCR3B=2; TCNT3H=49536>>8; TCNT3L=49536&0xFF; ETIMSK=4; //8ms

    TCCR3B=2; TCNT3H=47536>>8; TCNT3L=47536&0xFF; ETIMSK=4; //9ms

    TCCR3B=2; TCNT3H=45536>>8; TCNT3L=45536&0xFF; ETIMSK=4; //10ms

    TCCR3B=2; TCNT3H=33536>>8; TCNT3L=33536&0xFF; ETIMSK=4; //16ms

    TCCR3B=2; TCNT3H=25536>>8; TCNT3L=25536&0xFF; ETIMSK=4; //20ms

    TCCR3B=2; TCNT3H=15536>>8; TCNT3L=15536&0xFF; ETIMSK=4; //25ms

    TCCR3B=2; TCNT3H= 5536>>8; TCNT3L= 5536&0xFF; ETIMSK=4; //30ms

 

    TCCR3B=3; TCNT3H=65531>>8; TCNT3L=65531&0xFF; ETIMSK=4; //20us

    TCCR3B=3; TCNT3H=65526>>8; TCNT3L=65526&0xFF; ETIMSK=4; //40us

    TCCR3B=3; TCNT3H=65521>>8; TCNT3L=65521&0xFF; ETIMSK=4; //60us

    TCCR3B=3; TCNT3H=65516>>8; TCNT3L=65516&0xFF; ETIMSK=4; //80us

    TCCR3B=3; TCNT3H=65511>>8; TCNT3L=65511&0xFF; ETIMSK=4; //100us

    TCCR3B=3; TCNT3H=65486>>8; TCNT3L=65486&0xFF; ETIMSK=4; //200us

    TCCR3B=3; TCNT3H=65461>>8; TCNT3L=65461&0xFF; ETIMSK=4; //300us

    TCCR3B=3; TCNT3H=65436>>8; TCNT3L=65436&0xFF; ETIMSK=4; //400us

    TCCR3B=3; TCNT3H=65411>>8; TCNT3L=65411&0xFF; ETIMSK=4; //500us

    TCCR3B=3; TCNT3H=65386>>8; TCNT3L=65386&0xFF; ETIMSK=4; //600us

    TCCR3B=3; TCNT3H=65361>>8; TCNT3L=65361&0xFF; ETIMSK=4; //700us

    TCCR3B=3; TCNT3H=65336>>8; TCNT3L=65336&0xFF; ETIMSK=4; //800us

    TCCR3B=3; TCNT3H=65311>>8; TCNT3L=65311&0xFF; ETIMSK=4; //900us

    TCCR3B=3; TCNT3H=65286>>8; TCNT3L=65286&0xFF; ETIMSK=4; //1ms

    TCCR3B=3; TCNT3H=65036>>8; TCNT3L=65036&0xFF; ETIMSK=4; //2ms

    TCCR3B=3; TCNT3H=64911>>8; TCNT3L=64911&0xFF; ETIMSK=4; //2.5ms

    TCCR3B=3; TCNT3H=64786>>8; TCNT3L=64786&0xFF; ETIMSK=4; //3ms

    TCCR3B=3; TCNT3H=64536>>8; TCNT3L=64536&0xFF; ETIMSK=4; //4ms

    TCCR3B=3; TCNT3H=64286>>8; TCNT3L=64286&0xFF; ETIMSK=4; //5ms

    TCCR3B=3; TCNT3H=64036>>8; TCNT3L=64036&0xFF; ETIMSK=4; //6ms

    TCCR3B=3; TCNT3H=63786>>8; TCNT3L=63786&0xFF; ETIMSK=4; //7ms

    TCCR3B=3; TCNT3H=63536>>8; TCNT3L=63536&0xFF; ETIMSK=4; //8ms

    TCCR3B=3; TCNT3H=63286>>8; TCNT3L=63286&0xFF; ETIMSK=4; //9ms

    TCCR3B=3; TCNT3H=63036>>8; TCNT3L=63036&0xFF; ETIMSK=4; //10ms

    TCCR3B=3; TCNT3H=61536>>8; TCNT3L=61536&0xFF; ETIMSK=4; //16ms

    TCCR3B=3; TCNT3H=60536>>8; TCNT3L=60536&0xFF; ETIMSK=4; //20ms

    TCCR3B=3; TCNT3H=59286>>8; TCNT3L=59286&0xFF; ETIMSK=4; //25ms

    TCCR3B=3; TCNT3H=58036>>8; TCNT3L=58036&0xFF; ETIMSK=4; //30ms

    TCCR3B=3; TCNT3H=55536>>8; TCNT3L=55536&0xFF; ETIMSK=4; //40ms

    TCCR3B=3; TCNT3H=53036>>8; TCNT3L=53036&0xFF; ETIMSK=4; //50ms

    TCCR3B=3; TCNT3H=50536>>8; TCNT3L=50536&0xFF; ETIMSK=4; //60ms

    TCCR3B=3; TCNT3H=48036>>8; TCNT3L=48036&0xFF; ETIMSK=4; //70ms

    TCCR3B=3; TCNT3H=45536>>8; TCNT3L=45536&0xFF; ETIMSK=4; //80ms

    TCCR3B=3; TCNT3H=43036>>8; TCNT3L=43036&0xFF; ETIMSK=4; //90ms

    TCCR3B=3; TCNT3H=40536>>8; TCNT3L=40536&0xFF; ETIMSK=4; //100ms

    TCCR3B=3; TCNT3H=15536>>8; TCNT3L=15536&0xFF; ETIMSK=4; //200ms

    TCCR3B=3; TCNT3H= 3036>>8; TCNT3L= 3036&0xFF; ETIMSK=4; //250ms

 

    TCCR3B=4; TCNT3H=65531>>8; TCNT3L=65531&0xFF; ETIMSK=4; //80us

    TCCR3B=4; TCNT3H=65511>>8; TCNT3L=65511&0xFF; ETIMSK=4; //400us

    TCCR3B=4; TCNT3H=65486>>8; TCNT3L=65486&0xFF; ETIMSK=4; //800us

    TCCR3B=4; TCNT3H=65411>>8; TCNT3L=65411&0xFF; ETIMSK=4; //2ms

    TCCR3B=4; TCNT3H=65286>>8; TCNT3L=65286&0xFF; ETIMSK=4; //4ms

    TCCR3B=4; TCNT3H=65161>>8; TCNT3L=65161&0xFF; ETIMSK=4; //6ms

    TCCR3B=4; TCNT3H=65036>>8; TCNT3L=65036&0xFF; ETIMSK=4; //8ms

    TCCR3B=4; TCNT3H=64911>>8; TCNT3L=64911&0xFF; ETIMSK=4; //10ms

    TCCR3B=4; TCNT3H=64536>>8; TCNT3L=64536&0xFF; ETIMSK=4; //16ms

    TCCR3B=4; TCNT3H=64286>>8; TCNT3L=64286&0xFF; ETIMSK=4; //20ms

    TCCR3B=4; TCNT3H=63661>>8; TCNT3L=63661&0xFF; ETIMSK=4; //30ms

    TCCR3B=4; TCNT3H=63036>>8; TCNT3L=63036&0xFF; ETIMSK=4; //40ms

    TCCR3B=4; TCNT3H=62411>>8; TCNT3L=62411&0xFF; ETIMSK=4; //50ms

    TCCR3B=4; TCNT3H=61786>>8; TCNT3L=61786&0xFF; ETIMSK=4; //60ms

    TCCR3B=4; TCNT3H=61161>>8; TCNT3L=61161&0xFF; ETIMSK=4; //70ms

    TCCR3B=4; TCNT3H=60536>>8; TCNT3L=60536&0xFF; ETIMSK=4; //80ms

    TCCR3B=4; TCNT3H=59911>>8; TCNT3L=59911&0xFF; ETIMSK=4; //90ms

    TCCR3B=4; TCNT3H=59286>>8; TCNT3L=59286&0xFF; ETIMSK=4; //100ms

    TCCR3B=4; TCNT3H=53036>>8; TCNT3L=53036&0xFF; ETIMSK=4; //200ms

    TCCR3B=4; TCNT3H=49911>>8; TCNT3L=49911&0xFF; ETIMSK=4; //250ms

    TCCR3B=4; TCNT3H=46786>>8; TCNT3L=46786&0xFF; ETIMSK=4; //300ms

    TCCR3B=4; TCNT3H=40536>>8; TCNT3L=40536&0xFF; ETIMSK=4; //400ms

    TCCR3B=4; TCNT3H=34286>>8; TCNT3L=34286&0xFF; ETIMSK=4; //500ms

    TCCR3B=4; TCNT3H=28036>>8; TCNT3L=28036&0xFF; ETIMSK=4; //600ms

    TCCR3B=4; TCNT3H=21786>>8; TCNT3L=21786&0xFF; ETIMSK=4; //700ms

    TCCR3B=4; TCNT3H=15536>>8; TCNT3L=15536&0xFF; ETIMSK=4; //800ms

    TCCR3B=4; TCNT3H= 9286>>8; TCNT3L= 9286&0xFF; ETIMSK=4; //900ms

    TCCR3B=4; TCNT3H= 3036>>8; TCNT3L= 3036&0xFF; ETIMSK=4; //1sec

 

    TCCR3B=5; TCNT3H=65411>>8; TCNT3L=65411&0xFF; ETIMSK=4; //8ms

    TCCR3B=5; TCNT3H=65286>>8; TCNT3L=65286&0xFF; ETIMSK=4; //16ms

    TCCR3B=5; TCNT3H=64911>>8; TCNT3L=64911&0xFF; ETIMSK=4; //40ms

    TCCR3B=5; TCNT3H=64286>>8; TCNT3L=64286&0xFF; ETIMSK=4; //80ms

    TCCR3B=5; TCNT3H=62411>>8; TCNT3L=62411&0xFF; ETIMSK=4; //200ms

    TCCR3B=5; TCNT3H=59286>>8; TCNT3L=59286&0xFF; ETIMSK=4; //400ms

    TCCR3B=5; TCNT3H=56161>>8; TCNT3L=56161&0xFF; ETIMSK=4; //600ms

    TCCR3B=5; TCNT3H=53036>>8; TCNT3L=53036&0xFF; ETIMSK=4; //800ms

    TCCR3B=5; TCNT3H=49911>>8; TCNT3L=49911&0xFF; ETIMSK=4; //1sec

    TCCR3B=5; TCNT3H=34286>>8; TCNT3L=34286&0xFF; ETIMSK=4; //2sec

    TCCR3B=5; TCNT3H=18661>>8; TCNT3L=18661&0xFF; ETIMSK=4; //3sec

    TCCR3B=5; TCNT3H= 3036>>8; TCNT3L= 3036&0xFF; ETIMSK=4; //4sec

 

// 타이머3 A매치 인터럽트

    TCCR3B=0x09; OCR3AH= 79>>8; OCR3AL= 79&0xFF; ETIMSK=0x10; //5us

    TCCR3B=0x09; OCR3AH=159>>8; OCR3AL=159&0xFF; ETIMSK=0x10; //10us

    TCCR3B=0x09; OCR3AH=319>>8; OCR3AL=319&0xFF; ETIMSK=0x10; //20us

    TCCR3B=0x09; OCR3AH=399>>8; OCR3AL=399&0xFF; ETIMSK=0x10; //25us

    TCCR3B=0x09; OCR3AH=463>>8; OCR3AL=463&0xFF; ETIMSK=0x10; //29us

    TCCR3B=0x09; OCR3AH=479>>8; OCR3AL=479&0xFF; ETIMSK=0x10; //30us

    TCCR3B=0x09; OCR3AH=639>>8; OCR3AL=639&0xFF; ETIMSK=0x10; //40us

    TCCR3B=0x09; OCR3AH=799>>8; OCR3AL=799&0xFF; ETIMSK=0x10; //50us

    TCCR3B=0x09; OCR3AH=927>>8; OCR3AL=927&0xFF; ETIMSK=0x10; //58us

    TCCR3B=0x09; OCR3AH=959>>8; OCR3AL=959&0xFF; ETIMSK=0x10; //60us

    TCCR3B=0x09; OCR3AH=1119>>8; OCR3AL=1119&0xFF; ETIMSK=0x10; //70us

    TCCR3B=0x09; OCR3AH=1279>>8; OCR3AL=1279&0xFF; ETIMSK=0x10; //80us

    TCCR3B=0x09; OCR3AH=1439>>8; OCR3AL=1439&0xFF; ETIMSK=0x10; //90us

    TCCR3B=0x09; OCR3AH=1599>>8; OCR3AL=1599&0xFF; ETIMSK=0x10; //100us

    TCCR3B=0x09; OCR3AH=3199>>8; OCR3AL=3199&0xFF; ETIMSK=0x10; //200us

    TCCR3B=0x09; OCR3AH=3999>>8; OCR3AL=3999&0xFF; ETIMSK=0x10; //250us

    TCCR3B=0x09; OCR3AH=4799>>8; OCR3AL=4799&0xFF; ETIMSK=0x10; //300us

    TCCR3B=0x09; OCR3AH=6399>>8; OCR3AL=6399&0xFF; ETIMSK=0x10; //400us

    TCCR3B=0x09; OCR3AH=7999>>8; OCR3AL=7999&0xFF; ETIMSK=0x10; //500us

    TCCR3B=0x09; OCR3AH=9599>>8; OCR3AL=9599&0xFF; ETIMSK=0x10; //600us

    TCCR3B=0x09; OCR3AH=11199>>8; OCR3AL=11199&0xFF; ETIMSK=0x10; //700us

    TCCR3B=0x09; OCR3AH=12799>>8; OCR3AL=12799&0xFF; ETIMSK=0x10; //800us

    TCCR3B=0x09; OCR3AH=14399>>8; OCR3AL=14399&0xFF; ETIMSK=0x10; //900us

    TCCR3B=0x09; OCR3AH=15999>>8; OCR3AL=15999&0xFF; ETIMSK=0x10; //1ms

    TCCR3B=0x09; OCR3AH=31999>>8; OCR3AL=31999&0xFF; ETIMSK=0x10; //2ms

    TCCR3B=0x09; OCR3AH=39999>>8; OCR3AL=39999&0xFF; ETIMSK=0x10; //2.5ms

    TCCR3B=0x09; OCR3AH=47999>>8; OCR3AL=47999&0xFF; ETIMSK=0x10; //3ms

    TCCR3B=0x09; OCR3AH=63999>>8; OCR3AL=63999&0xFF; ETIMSK=0x10; //4ms

 

    TCCR3B=0x0A; OCR3AH=  9>>8; OCR3AL=  9&0xFF; ETIMSK=0x10; //5us

    TCCR3B=0x0A; OCR3AH= 19>>8; OCR3AL= 19&0xFF; ETIMSK=0x10; //10us

    TCCR3B=0x0A; OCR3AH= 39>>8; OCR3AL= 39&0xFF; ETIMSK=0x10; //20us

    TCCR3B=0x0A; OCR3AH= 49>>8; OCR3AL= 49&0xFF; ETIMSK=0x10; //25us

    TCCR3B=0x0A; OCR3AH= 57>>8; OCR3AL= 57&0xFF; ETIMSK=0x10; //29us

    TCCR3B=0x0A; OCR3AH= 59>>8; OCR3AL= 59&0xFF; ETIMSK=0x10; //30us

    TCCR3B=0x0A; OCR3AH= 79>>8; OCR3AL= 79&0xFF; ETIMSK=0x10; //40us

    TCCR3B=0x0A; OCR3AH= 99>>8; OCR3AL= 99&0xFF; ETIMSK=0x10; //50us

    TCCR3B=0x0A; OCR3AH=115>>8; OCR3AL=115&0xFF; ETIMSK=0x10; //58us

    TCCR3B=0x0A; OCR3AH=119>>8; OCR3AL=119&0xFF; ETIMSK=0x10; //60us

    TCCR3B=0x0A; OCR3AH=139>>8; OCR3AL=139&0xFF; ETIMSK=0x10; //70us

    TCCR3B=0x0A; OCR3AH=159>>8; OCR3AL=159&0xFF; ETIMSK=0x10; //80us

    TCCR3B=0x0A; OCR3AH=179>>8; OCR3AL=179&0xFF; ETIMSK=0x10; //90us

    TCCR3B=0x0A; OCR3AH=199>>8; OCR3AL=199&0xFF; ETIMSK=0x10; //100us

    TCCR3B=0x0A; OCR3AH=399>>8; OCR3AL=399&0xFF; ETIMSK=0x10; //200us

    TCCR3B=0x0A; OCR3AH=499>>8; OCR3AL=499&0xFF; ETIMSK=0x10; //250us

    TCCR3B=0x0A; OCR3AH=599>>8; OCR3AL=599&0xFF; ETIMSK=0x10; //300us

    TCCR3B=0x0A; OCR3AH=799>>8; OCR3AL=799&0xFF; ETIMSK=0x10; //400us

    TCCR3B=0x0A; OCR3AH=999>>8; OCR3AL=999&0xFF; ETIMSK=0x10; //500us

    TCCR3B=0x0A; OCR3AH=1199>>8; OCR3AL=1199&0xFF; ETIMSK=0x10; //600us

    TCCR3B=0x0A; OCR3AH=1399>>8; OCR3AL=1399&0xFF; ETIMSK=0x10; //700us

    TCCR3B=0x0A; OCR3AH=1599>>8; OCR3AL=1599&0xFF; ETIMSK=0x10; //800us

    TCCR3B=0x0A; OCR3AH=1799>>8; OCR3AL=1799&0xFF; ETIMSK=0x10; //900us

    TCCR3B=0x0A; OCR3AH=1999>>8; OCR3AL=1999&0xFF; ETIMSK=0x10; //1ms

    TCCR3B=0x0A; OCR3AH=3999>>8; OCR3AL=3999&0xFF; ETIMSK=0x10; //2ms

    TCCR3B=0x0A; OCR3AH=4999>>8; OCR3AL=4999&0xFF; ETIMSK=0x10; //2.5ms

    TCCR3B=0x0A; OCR3AH=5999>>8; OCR3AL=5999&0xFF; ETIMSK=0x10; //3ms

    TCCR3B=0x0A; OCR3AH=7999>>8; OCR3AL=7999&0xFF; ETIMSK=0x10; //4ms

    TCCR3B=0x0A; OCR3AH=9999>>8; OCR3AL=9999&0xFF; ETIMSK=0x10; //5ms

    TCCR3B=0x0A; OCR3AH=11999>>8; OCR3AL=11999&0xFF; ETIMSK=0x10; //6ms

    TCCR3B=0x0A; OCR3AH=13999>>8; OCR3AL=13999&0xFF; ETIMSK=0x10; //7ms

    TCCR3B=0x0A; OCR3AH=15999>>8; OCR3AL=15999&0xFF; ETIMSK=0x10; //8ms

    TCCR3B=0x0A; OCR3AH=17999>>8; OCR3AL=17999&0xFF; ETIMSK=0x10; //9ms

    TCCR3B=0x0A; OCR3AH=19999>>8; OCR3AL=19999&0xFF; ETIMSK=0x10; //10ms

    TCCR3B=0x0A; OCR3AH=31999>>8; OCR3AL=31999&0xFF; ETIMSK=0x10; //16ms

    TCCR3B=0x0A; OCR3AH=39999>>8; OCR3AL=39999&0xFF; ETIMSK=0x10; //20ms

    TCCR3B=0x0A; OCR3AH=49999>>8; OCR3AL=49999&0xFF; ETIMSK=0x10; //25ms

    TCCR3B=0x0A; OCR3AH=59999>>8; OCR3AL=59999&0xFF; ETIMSK=0x10; //30ms

 

    TCCR3B=0x0B; OCR3AH=  4>>8; OCR3AL=  4&0xFF; ETIMSK=0x10; //20us

    TCCR3B=0x0B; OCR3AH=  9>>8; OCR3AL=  9&0xFF; ETIMSK=0x10; //40us

    TCCR3B=0x0B; OCR3AH= 14>>8; OCR3AL= 14&0xFF; ETIMSK=0x10; //60us

    TCCR3B=0x0B; OCR3AH= 19>>8; OCR3AL= 19&0xFF; ETIMSK=0x10; //80us

    TCCR3B=0x0B; OCR3AH= 24>>8; OCR3AL= 24&0xFF; ETIMSK=0x10; //100us

    TCCR3B=0x0B; OCR3AH= 49>>8; OCR3AL= 49&0xFF; ETIMSK=0x10; //200us

    TCCR3B=0x0B; OCR3AH= 74>>8; OCR3AL= 74&0xFF; ETIMSK=0x10; //300us

    TCCR3B=0x0B; OCR3AH= 99>>8; OCR3AL= 99&0xFF; ETIMSK=0x10; //400us

    TCCR3B=0x0B; OCR3AH=124>>8; OCR3AL=124&0xFF; ETIMSK=0x10; //500us

    TCCR3B=0x0B; OCR3AH=149>>8; OCR3AL=149&0xFF; ETIMSK=0x10; //600us

    TCCR3B=0x0B; OCR3AH=174>>8; OCR3AL=174&0xFF; ETIMSK=0x10; //700us

    TCCR3B=0x0B; OCR3AH=199>>8; OCR3AL=199&0xFF; ETIMSK=0x10; //800us

    TCCR3B=0x0B; OCR3AH=224>>8; OCR3AL=224&0xFF; ETIMSK=0x10; //900us

    TCCR3B=0x0B; OCR3AH=249>>8; OCR3AL=249&0xFF; ETIMSK=0x10; //1ms

    TCCR3B=0x0B; OCR3AH=499>>8; OCR3AL=499&0xFF; ETIMSK=0x10; //2ms

    TCCR3B=0x0B; OCR3AH=624>>8; OCR3AL=624&0xFF; ETIMSK=0x10; //2.5ms

    TCCR3B=0x0B; OCR3AH=749>>8; OCR3AL=749&0xFF; ETIMSK=0x10; //3ms

    TCCR3B=0x0B; OCR3AH=999>>8; OCR3AL=999&0xFF; ETIMSK=0x10; //4ms

    TCCR3B=0x0B; OCR3AH=1249>>8; OCR3AL=1249&0xFF; ETIMSK=0x10; //5ms

    TCCR3B=0x0B; OCR3AH=1499>>8; OCR3AL=1499&0xFF; ETIMSK=0x10; //6ms

    TCCR3B=0x0B; OCR3AH=1749>>8; OCR3AL=1749&0xFF; ETIMSK=0x10; //7ms

    TCCR3B=0x0B; OCR3AH=1999>>8; OCR3AL=1999&0xFF; ETIMSK=0x10; //8ms

    TCCR3B=0x0B; OCR3AH=2249>>8; OCR3AL=2249&0xFF; ETIMSK=0x10; //9ms

    TCCR3B=0x0B; OCR3AH=2499>>8; OCR3AL=2499&0xFF; ETIMSK=0x10; //10ms

    TCCR3B=0x0B; OCR3AH=3999>>8; OCR3AL=3999&0xFF; ETIMSK=0x10; //16ms

    TCCR3B=0x0B; OCR3AH=4999>>8; OCR3AL=4999&0xFF; ETIMSK=0x10; //20ms

    TCCR3B=0x0B; OCR3AH=6249>>8; OCR3AL=6249&0xFF; ETIMSK=0x10; //25ms

    TCCR3B=0x0B; OCR3AH=7499>>8; OCR3AL=7499&0xFF; ETIMSK=0x10; //30ms

    TCCR3B=0x0B; OCR3AH=9999>>8; OCR3AL=9999&0xFF; ETIMSK=0x10; //40ms

    TCCR3B=0x0B; OCR3AH=12499>>8; OCR3AL=12499&0xFF; ETIMSK=0x10; //50ms

    TCCR3B=0x0B; OCR3AH=14999>>8; OCR3AL=14999&0xFF; ETIMSK=0x10; //60ms

    TCCR3B=0x0B; OCR3AH=17499>>8; OCR3AL=17499&0xFF; ETIMSK=0x10; //70ms

    TCCR3B=0x0B; OCR3AH=19999>>8; OCR3AL=19999&0xFF; ETIMSK=0x10; //80ms

    TCCR3B=0x0B; OCR3AH=22499>>8; OCR3AL=22499&0xFF; ETIMSK=0x10; //90ms

    TCCR3B=0x0B; OCR3AH=24999>>8; OCR3AL=24999&0xFF; ETIMSK=0x10; //100ms

    TCCR3B=0x0B; OCR3AH=49999>>8; OCR3AL=49999&0xFF; ETIMSK=0x10; //200ms

    TCCR3B=0x0B; OCR3AH=62499>>8; OCR3AL=62499&0xFF; ETIMSK=0x10; //250ms

 

    TCCR3B=0x0C; OCR3AH=  4>>8; OCR3AL=  4&0xFF; ETIMSK=0x10; //80us

    TCCR3B=0x0C; OCR3AH= 24>>8; OCR3AL= 24&0xFF; ETIMSK=0x10; //400us

    TCCR3B=0x0C; OCR3AH= 49>>8; OCR3AL= 49&0xFF; ETIMSK=0x10; //800us

    TCCR3B=0x0C; OCR3AH=124>>8; OCR3AL=124&0xFF; ETIMSK=0x10; //2ms

    TCCR3B=0x0C; OCR3AH=249>>8; OCR3AL=249&0xFF; ETIMSK=0x10; //4ms

    TCCR3B=0x0C; OCR3AH=374>>8; OCR3AL=374&0xFF; ETIMSK=0x10; //6ms

    TCCR3B=0x0C; OCR3AH=499>>8; OCR3AL=499&0xFF; ETIMSK=0x10; //8ms

    TCCR3B=0x0C; OCR3AH=624>>8; OCR3AL=624&0xFF; ETIMSK=0x10; //10ms

    TCCR3B=0x0C; OCR3AH=999>>8; OCR3AL=999&0xFF; ETIMSK=0x10; //16ms

    TCCR3B=0x0C; OCR3AH=1249>>8; OCR3AL=1249&0xFF; ETIMSK=0x10; //20ms

    TCCR3B=0x0C; OCR3AH=1874>>8; OCR3AL=1874&0xFF; ETIMSK=0x10; //30ms

    TCCR3B=0x0C; OCR3AH=2499>>8; OCR3AL=2499&0xFF; ETIMSK=0x10; //40ms

    TCCR3B=0x0C; OCR3AH=3124>>8; OCR3AL=3124&0xFF; ETIMSK=0x10; //50ms

    TCCR3B=0x0C; OCR3AH=3749>>8; OCR3AL=3749&0xFF; ETIMSK=0x10; //60ms

    TCCR3B=0x0C; OCR3AH=4374>>8; OCR3AL=4374&0xFF; ETIMSK=0x10; //70ms

    TCCR3B=0x0C; OCR3AH=4999>>8; OCR3AL=4999&0xFF; ETIMSK=0x10; //80ms

    TCCR3B=0x0C; OCR3AH=5624>>8; OCR3AL=5624&0xFF; ETIMSK=0x10; //90ms

    TCCR3B=0x0C; OCR3AH=6249>>8; OCR3AL=6249&0xFF; ETIMSK=0x10; //100ms

    TCCR3B=0x0C; OCR3AH=12499>>8; OCR3AL=12499&0xFF; ETIMSK=0x10; //200ms

    TCCR3B=0x0C; OCR3AH=15624>>8; OCR3AL=15624&0xFF; ETIMSK=0x10; //250ms

    TCCR3B=0x0C; OCR3AH=18749>>8; OCR3AL=18749&0xFF; ETIMSK=0x10; //300ms

    TCCR3B=0x0C; OCR3AH=24999>>8; OCR3AL=24999&0xFF; ETIMSK=0x10; //400ms

    TCCR3B=0x0C; OCR3AH=31249>>8; OCR3AL=31249&0xFF; ETIMSK=0x10; //500ms

    TCCR3B=0x0C; OCR3AH=37499>>8; OCR3AL=37499&0xFF; ETIMSK=0x10; //600ms

    TCCR3B=0x0C; OCR3AH=43749>>8; OCR3AL=43749&0xFF; ETIMSK=0x10; //700ms

    TCCR3B=0x0C; OCR3AH=49999>>8; OCR3AL=49999&0xFF; ETIMSK=0x10; //800ms

    TCCR3B=0x0C; OCR3AH=56249>>8; OCR3AL=56249&0xFF; ETIMSK=0x10; //900ms

    TCCR3B=0x0C; OCR3AH=62499>>8; OCR3AL=62499&0xFF; ETIMSK=0x10; //1sec

 

    TCCR3B=0x0D; OCR3AH=124>>8; OCR3AL=124&0xFF; ETIMSK=0x10; //8ms

    TCCR3B=0x0D; OCR3AH=249>>8; OCR3AL=249&0xFF; ETIMSK=0x10; //16ms

    TCCR3B=0x0D; OCR3AH=624>>8; OCR3AL=624&0xFF; ETIMSK=0x10; //40ms

    TCCR3B=0x0D; OCR3AH=1249>>8; OCR3AL=1249&0xFF; ETIMSK=0x10; //80ms

    TCCR3B=0x0D; OCR3AH=3124>>8; OCR3AL=3124&0xFF; ETIMSK=0x10; //200ms

    TCCR3B=0x0D; OCR3AH=6249>>8; OCR3AL=6249&0xFF; ETIMSK=0x10; //400ms

    TCCR3B=0x0D; OCR3AH=9374>>8; OCR3AL=9374&0xFF; ETIMSK=0x10; //600ms

    TCCR3B=0x0D; OCR3AH=12499>>8; OCR3AL=12499&0xFF; ETIMSK=0x10; //800ms

    TCCR3B=0x0D; OCR3AH=15624>>8; OCR3AL=15624&0xFF; ETIMSK=0x10; //1sec

    TCCR3B=0x0D; OCR3AH=31249>>8; OCR3AL=31249&0xFF; ETIMSK=0x10; //2sec

    TCCR3B=0x0D; OCR3AH=46874>>8; OCR3AL=46874&0xFF; ETIMSK=0x10; //3sec

    TCCR3B=0x0D; OCR3AH=62499>>8; OCR3AL=62499&0xFF; ETIMSK=0x10; //4sec

 

// 타이머3 CTC 토글 Mode-------------------------------------------------------

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH= 39>>8; OCR3AL= 39&0xFF; // 5us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH= 79>>8; OCR3AL= 79&0xFF; // 10us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=159>>8; OCR3AL=159&0xFF; // 20us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=199>>8; OCR3AL=199&0xFF; // 25us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=231>>8; OCR3AL=231&0xFF; // 29us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=239>>8; OCR3AL=239&0xFF; // 30us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=319>>8; OCR3AL=319&0xFF; // 40us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=399>>8; OCR3AL=399&0xFF; // 50us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=463>>8; OCR3AL=463&0xFF; // 58us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=479>>8; OCR3AL=479&0xFF; // 60us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=559>>8; OCR3AL=559&0xFF; // 70us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=639>>8; OCR3AL=639&0xFF; // 80us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=719>>8; OCR3AL=719&0xFF; // 90us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=799>>8; OCR3AL=799&0xFF; // 100us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=1599>>8; OCR3AL=1599&0xFF; // 200us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=1999>>8; OCR3AL=1999&0xFF; // 250us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=2399>>8; OCR3AL=2399&0xFF; // 300us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=3199>>8; OCR3AL=3199&0xFF; // 400us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=3999>>8; OCR3AL=3999&0xFF; // 500us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=4799>>8; OCR3AL=4799&0xFF; // 600us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=5599>>8; OCR3AL=5599&0xFF; // 700us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=6399>>8; OCR3AL=6399&0xFF; // 800us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=7199>>8; OCR3AL=7199&0xFF; // 900us

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=7999>>8; OCR3AL=7999&0xFF; // 1ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=15999>>8; OCR3AL=15999&0xFF; // 2ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=19999>>8; OCR3AL=19999&0xFF; // 2.5ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=23999>>8; OCR3AL=23999&0xFF; // 3ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=31999>>8; OCR3AL=31999&0xFF; // 4ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=39999>>8; OCR3AL=39999&0xFF; // 5ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=47999>>8; OCR3AL=47999&0xFF; // 6ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=55999>>8; OCR3AL=55999&0xFF; // 7ms

    TCCR3A=0x40; TCCR3B=9; TCCR3C=0x80; OCR3AH=63999>>8; OCR3AL=63999&0xFF; // 8ms

 

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH= 4>>8; OCR3AL= 4&0xFF; // 5us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH= 9>>8; OCR3AL= 9&0xFF; // 10us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=19>>8; OCR3AL=19&0xFF; // 20us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=24>>8; OCR3AL=24&0xFF; // 25us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=28>>8; OCR3AL=28&0xFF; // 29us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=29>>8; OCR3AL=29&0xFF; // 30us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=39>>8; OCR3AL=39&0xFF; // 40us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=49>>8; OCR3AL=49&0xFF; // 50us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=57>>8; OCR3AL=57&0xFF; // 58us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=59>>8; OCR3AL=59&0xFF; // 60us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=69>>8; OCR3AL=69&0xFF; // 70us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=79>>8; OCR3AL=79&0xFF; // 80us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=89>>8; OCR3AL=89&0xFF; // 90us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=99>>8; OCR3AL=99&0xFF; // 100us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=199>>8; OCR3AL=199&0xFF; // 200us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=249>>8; OCR3AL=249&0xFF; // 250us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=299>>8; OCR3AL=299&0xFF; // 300us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=399>>8; OCR3AL=399&0xFF; // 400us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=499>>8; OCR3AL=499&0xFF; // 500us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=599>>8; OCR3AL=599&0xFF; // 600us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=699>>8; OCR3AL=699&0xFF; // 700us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=799>>8; OCR3AL=799&0xFF; // 800us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=899>>8; OCR3AL=899&0xFF; // 900us

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=999>>8; OCR3AL=999&0xFF; // 1ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=1999>>8; OCR3AL=1999&0xFF; // 2ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=2499>>8; OCR3AL=2499&0xFF; // 2.5ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=2999>>8; OCR3AL=2999&0xFF; // 3ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=3999>>8; OCR3AL=3999&0xFF; // 4ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=4999>>8; OCR3AL=4999&0xFF; // 5ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=5999>>8; OCR3AL=5999&0xFF; // 6ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=6999>>8; OCR3AL=6999&0xFF; // 7ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=7999>>8; OCR3AL=7999&0xFF; // 8ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=8999>>8; OCR3AL=8999&0xFF; // 9ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=9999>>8; OCR3AL=9999&0xFF; // 10ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=15999>>8; OCR3AL=15999&0xFF; // 16ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=19999>>8; OCR3AL=19999&0xFF; // 20ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=24999>>8; OCR3AL=24999&0xFF; // 25ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=29999>>8; OCR3AL=29999&0xFF; // 30ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=39999>>8; OCR3AL=39999&0xFF; // 40ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=49999>>8; OCR3AL=49999&0xFF; // 50ms

    TCCR3A=0x40; TCCR3B=0x0A; TCCR3C=0x80; OCR3AH=59999>>8; OCR3AL=59999&0xFF; // 60ms

 

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH= 4>>8; OCR3AL= 4&0xFF; // 40us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH= 9>>8; OCR3AL= 9&0xFF; // 80us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=24>>8; OCR3AL=24&0xFF; // 200us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=49>>8; OCR3AL=49&0xFF; // 400us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=74>>8; OCR3AL=74&0xFF; // 600us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=99>>8; OCR3AL=99&0xFF; // 800us

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=124>>8; OCR3AL=124&0xFF; // 1ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=249>>8; OCR3AL=249&0xFF; // 2ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=374>>8; OCR3AL=374&0xFF; // 3ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=499>>8; OCR3AL=499&0xFF; // 4ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=624>>8; OCR3AL=624&0xFF; // 5ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=749>>8; OCR3AL=749&0xFF; // 6ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=874>>8; OCR3AL=874&0xFF; // 7ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=999>>8; OCR3AL=999&0xFF; // 8ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=1124>>8; OCR3AL=1124&0xFF; // 9ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=1249>>8; OCR3AL=1249&0xFF; // 10ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=1999>>8; OCR3AL=1999&0xFF; // 16ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=2499>>8; OCR3AL=2499&0xFF; // 20ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=3124>>8; OCR3AL=3124&0xFF; // 25ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=3749>>8; OCR3AL=3749&0xFF; // 30ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=4999>>8; OCR3AL=4999&0xFF; // 40ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=6249>>8; OCR3AL=6249&0xFF; // 50ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=7499>>8; OCR3AL=7499&0xFF; // 60ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=8749>>8; OCR3AL=8749&0xFF; // 70ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=9999>>8; OCR3AL=9999&0xFF; // 80ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=11249>>8; OCR3AL=11249&0xFF; // 90ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=12499>>8; OCR3AL=12499&0xFF; // 100ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=24999>>8; OCR3AL=24999&0xFF; // 200ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=31249>>8; OCR3AL=31249&0xFF; // 250ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=37499>>8; OCR3AL=37499&0xFF; // 300ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=49999>>8; OCR3AL=49999&0xFF; // 400ms

    TCCR3A=0x40; TCCR3B=0x0B; TCCR3C=0x80; OCR3AH=62499>>8; OCR3AL=62499&0xFF; // 500ms

 

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH= 24>>8; OCR3AL= 24&0xFF; // 800us

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=124>>8; OCR3AL=124&0xFF; // 4ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=249>>8; OCR3AL=249&0xFF; // 8ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=499>>8; OCR3AL=499&0xFF; // 16ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=624>>8; OCR3AL=624&0xFF; // 20ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=1249>>8; OCR3AL=1249&0xFF; // 40ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=1874>>8; OCR3AL=1874&0xFF; // 60ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=2499>>8; OCR3AL=2499&0xFF; // 80ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=3124>>8; OCR3AL=3124&0xFF; // 100ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=6249>>8; OCR3AL=6249&0xFF; // 200ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=9374>>8; OCR3AL=9374&0xFF; // 300ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=12499>>8; OCR3AL=12499&0xFF; // 400ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=15624>>8; OCR3AL=15624&0xFF; // 500ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=18749>>8; OCR3AL=18749&0xFF; // 600ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=21874>>8; OCR3AL=21874&0xFF; // 700ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=24999>>8; OCR3AL=24999&0xFF; // 800ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=28124>>8; OCR3AL=28124&0xFF; // 900ms

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=31249>>8; OCR3AL=31249&0xFF; // 1sec

    TCCR3A=0x40; TCCR3B=0x0C; TCCR3C=0x80; OCR3AH=62499>>8; OCR3AL=62499&0xFF; // 2sec

 

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH= 124>>8; OCR3AL= 124&0xFF; // 16ms

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH= 624>>8; OCR3AL= 624&0xFF; // 80ms

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=3124>>8; OCR3AL=3124&0xFF; // 400ms

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=6249>>8; OCR3AL=6249&0xFF; // 800ms

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=15624>>8; OCR3AL=15624&0xFF; // 2sec

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=31249>>8; OCR3AL=31249&0xFF; // 4sec

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=46874>>8; OCR3AL=46874&0xFF; // 6sec

    TCCR3A=0x40; TCCR3B=0x0D; TCCR3C=0x80; OCR3AH=62499>>8; OCR3AL=62499&0xFF; // 8sec

 

  • BASIC4MCU 작성글 SNS에 공유하기
  • 페이스북으로 보내기
  • 트위터로 보내기
  • 구글플러스로 보내기

댓글 1

조회수 612

dfas123님의 댓글

dfas123 작성일

진심으로 감사합니다!

질문게시판HOME > 질문게시판 목록

MCU, AVR, 아두이노 등 전자공학에 관련된 질문을 무료회원가입 후 작성해주시면 전문가가 답변해드립니다.
ATMEGA128PWMLED초음파
아두이노AVR블루투스LCD
UART모터적외선ATMEGA
전체 스위치 센서
질문게시판 목록
제목 작성자 작성일 조회
질문 ATmega128, ATmega28 RS232통신 이미지첨부파일 Moon4201 22-06-24 219
답변 답변글 답변 : ATmega128, ATmega28 RS232통신댓글[1] master 22-06-25 208
질문 atmega128 avr usart 질문 snoflak 22-06-21 179
답변 답변글 답변 : atmega128 avr usart 질문댓글[5] master 22-06-21 340
질문 atmega128댓글[1] 이미지 양의노래 22-06-20 204
질문 ATMEGA128 UART,FND 연동 질문 JMOD 22-06-19 223
답변 답변글 답변 : ATMEGA128 UART,FND 연동 질문댓글[1] master 22-06-20 131
질문 atmega128 초음파 센서로 신호등 시간초 늘리기 서동씨 22-06-18 187
답변 답변글 답변 : atmega128 초음파 센서로 신호등 시간초 늘리기댓글[1] master 22-06-18 225
질문 atmega128댓글[2] 망경이 22-06-18 246
질문 안녕하세요 atmega128 질문드리고 싶습니다. (자동 분리수거 기계, 소리 주파수 변환)댓글[3] dlcldl 22-06-17 347
질문 ATMEGA128 HIGH LOW신호 수신 질문 yhj2644 22-06-16 237
답변 답변글 답변 : ATMEGA128 HIGH LOW신호 수신 질문댓글[3] master 22-06-17 252
질문 codevision atmega128 코딩 알려주세요 ㅠㅠ댓글[4] 이미지 goodjob 22-06-16 312
질문 atmega128 인터럽트 이용한 dc모터 제어댓글[2] 이미지첨부파일 박맹 22-06-10 389
질문 atmega128 순차적신호 질문있습니다댓글[1] 이미지첨부파일 졸업예정 22-06-10 284
답변 답변글 답변 : atmega128 순차적신호 질문있습니다 master 22-06-10 332
질문 ATMEGA128 인터럽트 관련질문입니다댓글[2] 짜요쩌요 22-06-09 420
질문 atmega128에서 초음파 센서(HC-SR04)를 통해 부저 소리를 내려합니다. seung 22-06-08 374
답변 답변글 답변 : atmega128에서 초음파 센서(HC-SR04)를 통해 부저 소리를 내려합니다.댓글[1] master 22-06-08 353
질문 Atmega128 코딩 도와주세요,,! 이미지첨부파일 화니뿌뿌 22-06-07 413
답변 답변글 답변 : Atmega128 코딩 도와주세요,,!댓글[3] master 22-06-08 377
질문 atmega128 코드 질문있습니다 콜뚜기 22-06-07 297
답변 답변글 답변 : atmega128 코드 질문있습니다댓글[3] master 22-06-07 420
질문 ATMEGA128질문입니다.댓글[1] suid82 22-06-06 407
질문 atmega128 프로젝트 외주 사례합니다댓글[1] 공돌ㅇ 22-06-05 376
질문 atmega128 프로테우스 부저소리 관련하여..댓글[1] 꿍다라링 22-06-04 276
질문 atmega128 조도센서를 이용하여 서보모터와 dc모터 제어하는거 봐주실수있나요ㅠㅠ 이미지첨부파일 화니뿌뿌 22-06-02 518
답변 답변글 답변 : atmega128 조도센서를 이용하여 서보모터와 dc모터 제어하는거 봐주실수있나요ㅠㅠ댓글[4] master 22-06-02 1036
질문 ATMEGA128 채터링(chattering)관련 질문입니다.댓글[1] 아지개구리 22-06-02 567
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기