2861 views|1 replies

7

Posts

0

Resources
The OP
 

Problems with R7F0C8051 using timer 1 channel to generate PWM signal [Copy link]

This post was last edited by Korol on 2018-10-10 17:13 As the title says: How to use a 1-channel 16-bit timer as two 8-bit timers to generate PWM signals? Please give me some advice! (Note: This chip itself has the function of outputting PWM signals, but if the two timers of channel 0 and channel 1 are used together, the timers will not be enough. The manual says that the 16-bit timer of channel 1 can be used as two 8-bit timers (high 8 bits and low 8 bits), but the actual signal output is always a square wave, and the frequency is wrong. I don't know what's going on.) The following are two timer interrupt service routines (the low 8 bits control the period, and the high 8 bits control the duty cycle): __interrupt static void r_tau0_channel1_interrupt(void) { P4.0 = 1U ; R_TAU0_Channel1_Higher8bits_Start() ; } __interrupt static void r_tau0_channel1_higher8bits_interrupt(void) { P4.0 = 0U ; R_TAU0_Channel1_Higher8bits_Stop() ; }

This post is from Renesas Electronics MCUs

7

Posts

0

Resources
2
 
No one has used it like this?
This post is from Renesas Electronics MCUs
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list