PIC/AVR PWM + RS232 simultaneously?

Aug 06, 2008 6 Replies

Are there any sub 10 USD AVR or PIC uC that can do hardware PWM at the same time as hardware RS232 ..? The source of my question is that I suspect that same timer is used both for bitrate generation and for PWM frequency+duty cycle.



Plenty of both that will do both...... RS232 is just a few bytes, as is pwm

You suspect wrong. RTFM. Bob

** Posted from
formatting link
**

I did google it. And read the datasheet but neither would give a consistent answer.

formatting link

I am using this now.

These are less the $10 in ones.

donald

The datasheet will only mention resource sharing - they won't bother explicitly writing that the timers and counters for PWM and UART are separate, since that is obvious to anyone who has any knowledge of microcontrollers, or who is able to think a little and use a little common sense.

Where resources are shared (sometimes several timers will share a prescaler, for example), the datasheet will say so.

Perhaps you are mixing up a feature that some microcontrollers have (such as MSP430 devices) that have a "UART mode" for their timers. This is an alternative mode for the timer (other modes include capture modes, and PWM) to make it easier to make a software UART. It is not a full hardware UART - it's just a timer mode.

The AtMega08 certainly can - it's doing it on my bench, right now. I expect the other AtMegas can too.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required