Skip to content

microchip-pic-avr-examples/pic18f47q10-cnano-tmr1-special-event-trigger-mcc

Repository files navigation

MCHP

PIC18F47Q10 Using TMR1 to trigger a special event

The PIC18F47Q10 features Timers with special event functions. This example shows how to use the TMR1 configured as a counter. The Capture/Compare/PWM (CCP) module will be configured with a user defined value. A GPIO pin will be configured as output and the event will toggle the logic value of this pin. The event will be triggered when the counted value from TMR1 will be equal with the CCP value.

Related Documentation

Software Used

Hardware Used

Setup

The PIC18F47Q10 Curiosity Nano Development Board is used as the test platform.

Pin Configuration
RB0 Digital Output

Demo:

Run the code. Pin RB0 is configured as digital output. The logic value of the pin will toggle every time the event occurs.

Hardware Setup