?? abstract.txt
字號:
This example program demonstrates how to use the on-chip Comparators
of the Philips LPC767/768/769 Devices. The program configures CMP1 as
a Positive input (P0^4) with internal Vref(1.28V) as Neg input. Also,
the program configures CMP2 as a Pos input(P0^2) with CMPREF(P0^5) as
the neg input.
Both comparator outputs (CMP1 P0^6)(CMP2 P0^) are gated to output pins.
1. Build the program (Project-Build Target)
2. Start the Debugger (Debug-Start/Stop Debug Session)
3. Open the Comparator Dialog Box (Peripherals -> Analog Comparator)
6. Run the program while viewing the Comparators dialog.
7. Select View -> Periodic Update to view operation while running.
8. From the command line, enter CIN1A = x.x, where x.x is any value
between 0 and 5.0V. Watch CMP1 toggle with CIN1A above 1.28V.
9. From the command line, enter CMPREF = 2.5V. Enter CIN2A = x.x, where
x.x is any value from 0V to 5.0V. Watch CMP2 toggle above 2.5V.
Both comparators can be programmed to interrupt on a compare shift. The interrupt
flag must be reset by software. See the Philips databook for more details.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -