eccpdemo.txt
来自「Hitech microchip PIC C18 Compiler」· 文本 代码 · 共 31 行
TXT
31 行
Title: eccpdemoTarget: PIC18F458Description: A project that demonstrates the usage of the enhanced capture/ compare/PWM module.Controls: 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. There are two potentiometers in the virtual I/O display. These are used to control the duty cycle/period if the module is in PWM mode. The PWM output will appear on the LED and also on the logic analyser if it is started. In capture mode, the pushbutton is used to attempt a capture. When the capture is made, the TMR3 value at the time of the capture will be printed to the serial IO window.Connections to the PIC18F458: LED -> PORTD4 DIP switch [1:4] -> PORTC [0:3] Potentiometer 1 -> PORTA0 (period) Potentiometer 2 -> PORTA1 (duty cycle) Pushbutton -> PORTB4 & PORTD4 Analyser [0:3] -> PORTD [4:7]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?