Question about Atmega8U2 and MCUs with USB.

Hi all,

I'm designing a circuit containing 3 microcontrollers that communicate with different applications on a PC through USB. These are connected to the circuit together through a USB-hub IC.

For the main MCU I used an atmega32u4, but since the other only uses a PWM output I wanted to keep them smaller and cheaper. I wrongly thought the attiny85 had real USB capabilities due to these, only to find out after soldering my first prototype that it's VUSB.

My idea now would be to go for the Atmega8u2, but I'm not sure they have PWM outputs. On the datasheet, I saw one pin (PB7) and something about PWM, but I'm not sure if it means the internal clock. Do they? Are there other small, cheaper MCUs with USB capabilities maybe? Ideally with an internal oscillator, so I can keep my circuit simpler. I've seen the at90usb series too but they seem similar in size and more expensive than the 8u2.

Yes, it can do PWM:

Peripheral Features
– One 8-bit Timer/Counters with Separate Prescaler and Compare Mode (two 8-bit PWM channels)
– One 16-bit Timer/Counter with Separate Prescaler, Compare and Capture Mode (three 8-bit PWM channels)

How many PWM outputs are you after? Maybe adding an SX1509 with 16 PWM outputs would fit the bill.

CrossRoads:
Yes, it can do PWM:

Peripheral Features
– One 8-bit Timer/Counters with Separate Prescaler and Compare Mode (two 8-bit PWM channels)
– One 16-bit Timer/Counter with Separate Prescaler, Compare and Capture Mode (three 8-bit PWM channels)

http://ww1.microchip.com/downloads/en/DeviceDoc/doc7799.pdf

Thanks! so PB7 and PC6 would be the PWM outputs, right?

CrossRoads:
How many PWM outputs are you after? Maybe adding an SX1509 with 16 PWM outputs would fit the bill.

Actually just one pro chip, that's why I wanted to use Attiny85. Maybe my project would be possible with VUSB too but I didn't write the code for those two secondary MCUs and I want to focus on the hardware design. The main MCU is the one needy of extra outputs and inputs but I already got him covered with enough multiplexers.