| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
MPC82L52 bảng dữ liệu(PDF) 62 Page - Megawin Technology Co., Ltd |
|
|
|||||||||||||||||||||||||||||
MPC82L52 bảng dữ liệu(HTML) 62 Page - Megawin Technology Co., Ltd |
|
62 / 144 page ![]() 62 MPC82x52 Data Sheet MEGAWIN (2). Required Function: Select Timer 0 clock source from SYSCLK (enable T0X12) Assembly Code Example: T0M0 EQU 01h T0M1 EQU 02h PT0 EQU 02h PT0H EQU 02h T0X12 EQU 80h ORG 0000h JMP main ORG 0000Bh time0_isr: to do … RETI main: ORL AUXR, #T0X12 ; Select SYSCLK/1 for Timer 0 clock input CLR TF0 ; Clear Timer 0 Flag ORL IP,#PT0 ; Select Timer 0 interrupt priority ORL IPH,#PT0H ; SETB ET0 ; Enable Timer 0 interrupt SETB EA ; Enable global interrupt MOV TH0, #(256 - 240) ;interrupt interval 20us MOV TL0, #(256 - 240) ; ANL TMOD,#0F0h ; Set Timer 0 to Mode 2 ORL TMOD,#T0M1 ; SETB TR0 ; Start Timer 0 running JMP $ C Code Example: #define T0M0 0x01 #define T0M1 0x02 #define PT0 0x02 #define PT0H 0x02 #define T0X12 0x80 AUXR |= T0X12 TF0 = 0; IP |= PT0; // Select Timer 0 interrupt priority IPH |= PT0H; ET0 = 1; // Enable Timer 0 interrupt EA = 1; // Enable global interrupt TH0 = TL0 = (256 - 240); TMOD &= 0xF0; // Set Timer 0 to Mode 2 TMOD |= T0M1; TR0 = 1; // Start Timer 0 running |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |