⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inter.txt

📁 picc_18v 8.35pl35 PIC18系列单片机开发C编译器
💻 TXT
字号:
Title: Interrupt demo

Target: PIC18F8720

Description:
    A project to demonstrates how multiple interrupt sources can
    be managed according to independent levels of prority.
    Interrupts can be enabled/disabled independently or globally.

    8 different interrupt sources are continually being triggered.
    
    If an interrupt event occurs, it will be displayed on the LED
    associated with that event. If the interrupt vectors to the
    HIGH priority interrupt routine, the associated BLUE LED will
    illuminate. If the interrupt vectors to the LOW priority
    routine, the associated RED LED will illuminate.

    The LED displays are updated periodically.

Controls:
    To enable any interrupts, firstly, a global interrupt bit needs
    to be set. The first switch globally enables/disables HIGH
    priority interrupts, the second switch gloabally enables/disables 
    LOW priority interrupts.

    Individual interrupts can be disabled using the BLUE DIP switch.
    The DIP switch in the virtual I/O display is used to tell the
    module which mode it is operating in. The switches correspond
    to bits ECCP1M3:1 of the ECCP1CON register. The mode that is
    selected will be displayed in the serial I/O display.

    The BLUE DIP switch determines the priority level for each
    interrupt source. To vector an interrupt to the low priority
    routine, it must first be enabled, then switch the corresponding
    BLUE DIP switch low.

Connections to the PIC18F8720:
    DIP BLUE         -> PORTB
    LED BLUE         -> PORTD
    Switch 1         -> PORTA0
    DIP RED          -> PORTC
    LED RED          -> PORTE
    Switch 2         -> PORTA1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -