FastPWM and SPI

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
brad
Posts: 23
Joined: Thu Jan 13, 2011 2:51 am

FastPWM and SPI

Post by brad »

Hi,

I want to use my sub20 for concurrent SPI and PWM. I am hoping to get more information about the hardware's use of the SPI pins for the "Fast PWM." Is it possible to put the fast PWM on a different set of GPIOs so that SPI and Fast PWM can be used concurrently... or is this MCU hardware limitation?

thanks,
Brad

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: FastPWM and SPI

Post by xol »

Fast PWM output are sharing SS2,SS3 and SS4 SPI pins. This pins are slave select. They are not vital for SPI functionality and you can run fast PWM at the same time you run SPI transactions. For slave select you still have SS0 and SS1 available. If you do need mode then 2 slave selects you can use one of the GPIO instead of SS2..4.
OK?

brad
Posts: 23
Joined: Thu Jan 13, 2011 2:51 am

Re: FastPWM and SPI

Post by brad »

Thanks for the quick response. Sounds like it will work as I only need SS0 (for now). I didn't know if the SPI and fPWM were sharing resources on the MCU, sounds like they are independent apart from the pins.

-brad

Post Reply