logo
HomeAbout  |  Products  |  ApplicationsDownload  |  Contact Us  |  中文
 
Home-> Products-> 8-bit MCU
 
IC Induction
Develop & Tool
Application Project
Customer Service
 
Quick Coding
1 IO Ports 2 AD Converter
3 Timers 4 Capture
5 Compare 6 PWM 7 Interval Timer and Buzzer 8 External Interrupts
9 SPI 10 UART 11 LVR 12 Watch Dog Timer
13 STOP Mode 14 HALT Mode    

7 Interval Timer and Buzzer

1. Generate pulse output using Buzzer function, which period is 1.024ms.

  lda   P_BUZ_Ctrl
  and   #$0F
  ora   #C_TBASE_Div_8k
  sta   P_BUZ_Ctrl

2. Generate 1.024ms interrupt using Time Base Interval Timer.

  lda   P_BUZ_Ctrl
  and   #$0F
  ora   #C_TBASE_Div_8k
  sta   P_BUZ_Ctrl
  set   P_INT_Flag2,CB_INT_ITVALIF
  set   P_INT_Ctrl2,CB_INT_ITVALIE
  ; Enable Interval Timer interrupt
  cli          ; enable INT


Copyright © BEIJING SUNNORTH TECHNOLOGY CO., LTD Web site:mcu.sunplusmcu.com online real name:凌阳单片机
Unauthorized copy or republish to the content of this website is forbidden. Any one cannot resume on ICP备05061966号