📄 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 + -