Change LED Blinking Rate | Cypress Semiconductor
Change LED Blinking Rate
Hello and this is a newbie question.
Using one of the labs for PSOC 4 and the 042 dev board, there are several ways to blink an LED. However, if I am using the PWM to drive the LED at a rate of, say, 1 blink/second (Clock == 800Hz, Prescale == x8, period == 254 and compare == 127, what if I want to change the rate to double or half in the code?
Can I simply change the prescaler via the
TCPWM_SetPrescaler(4) or TCPWM_SetPRescaler(16)? It does not seem to work. Ultimately I want to change the blinking rate (not duty cycle) of the LED w/the slider.
That it is not working tells me I am missing something such as initialization, etc. (I am starting the PWM).