2024年4月7日发(作者:大秀杰)
//
//-----------------------------------------------------------------------------
// F41x_External_Interrupts.c
//-----------------------------------------------------------------------------
// Copyright 2007 Silicon Laboratories, Inc.
//
//
// Program Description:
//
// This software shows the necessary configuration to use External Interrupt 0
// (/INT0) or External Interrupt 1 (/INT1) as an interrupt source. The code
// executes the initialization routines and then spins in an infinite while()
// loop. If the button on P1.4 (on the target board) is pressed, then the
// edge-triggered /INT0 input on P0.0 will cause an interrupt and toggle the
// LED.
//
// Pinout:
//
页脚内容1
//
// P0.0 - /INT0
// P0.1 - /INT1
//
// P1.4 - SW1 (Switch 1)
// P1.5 - SW2 (Switch 2)
// P2.1 - LED1
// P2.3 - LED2
//
// How To Test:
//
// 1) Compile and download code to a 'F41x target board.
// 2) On the target board, connect P1.4 and P1.5 signals on J5 to P0.0
// for /INT0 and P0.1 for /INT1.
// 3) Press the switches. Every time a switch is pressed, the P2.1 or P2.3
// LED should toggle.
//
// Target: C8051F41x
页脚内容2
2024年4月7日发(作者:大秀杰)
//
//-----------------------------------------------------------------------------
// F41x_External_Interrupts.c
//-----------------------------------------------------------------------------
// Copyright 2007 Silicon Laboratories, Inc.
//
//
// Program Description:
//
// This software shows the necessary configuration to use External Interrupt 0
// (/INT0) or External Interrupt 1 (/INT1) as an interrupt source. The code
// executes the initialization routines and then spins in an infinite while()
// loop. If the button on P1.4 (on the target board) is pressed, then the
// edge-triggered /INT0 input on P0.0 will cause an interrupt and toggle the
// LED.
//
// Pinout:
//
页脚内容1
//
// P0.0 - /INT0
// P0.1 - /INT1
//
// P1.4 - SW1 (Switch 1)
// P1.5 - SW2 (Switch 2)
// P2.1 - LED1
// P2.3 - LED2
//
// How To Test:
//
// 1) Compile and download code to a 'F41x target board.
// 2) On the target board, connect P1.4 and P1.5 signals on J5 to P0.0
// for /INT0 and P0.1 for /INT1.
// 3) Press the switches. Every time a switch is pressed, the P2.1 or P2.3
// LED should toggle.
//
// Target: C8051F41x
页脚内容2