Timer channel names

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
dwculp
Posts: 12
Joined: Wed Jul 13, 2016 6:43 pm

Timer channel names

Post by dwculp » Thu Jul 14, 2016 9:10 pm

I setup a few test circuits to test out my Pyboard. One had a simple photo-resistor hooked to one of the ADC lines (X8). I then read the ADC and converted it to a 0-100 value and fed it into the duty cycle of a PWM channel. I used pin Y12 which according to the diagram is timer 1 channel "CH3N ". It worked except it was opposite of what I was expecting - I assume the "N" at the end of the channel name means inverted?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Timer channel names

Post by dhylands » Thu Jul 14, 2016 9:17 pm

Yes - N = negated or inverted (that was how they were labelled in the datasheets, so that naming was carried through when coming up with the names).

The N channels (of TIM1 and TIM8) are particularly useful when driving both halves of an H-Bridge. You use the non-N channel to drive the top of the H-Bridge, and N channel to drive the bottom (or vice-versa) and there is also a deadband parameter which controls the delay between the switching edges.

Post Reply