Go Down

Topic: Help tweaking PCM audio example (Read 414 times) previous topic - next topic


I have successfully got the PCM audio example working:

However I want to use the SPI library to control a MCP23S17 (16bit I/O expander). 

The SPI library has to use pins 10,11,12 & 13 to connect to the MCP23S17.  However, the PCM audio example also outputs on pin 11.  Does anyone have a link to a reference table for all the constants used in the PCM example to setup the registers (e.g. COM2A1, COM2A0 etc).

Am I correct in thinking that if I change these constants, I should be able to use one of the PCM pins lower down the board (pin 3,5 or 6) instead of 11?


Nick Gammon

If you configure it correctly you should be able to user Timer 2 "B" output (pin D3).

Some stuff about timers:


Or you could use the USART in SPI mode to get the SPI going (if you don't mind not using the Serial output).


Please post technical questions on the forum, not by personal message. Thanks!

More info:


Wow, your page on interrupts is amazing!  I can't use the serial, but I can use pin D3, so guess the quick fix is to swap the COM2As for COM2Bs and vice versa in the Timer 2 setup.  I'll try and use your helper library soon though.  Will make the whole thing a lot easier! :)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131