Tag Archives: OC1R

Polyphonic Keypad

Inspired by Paul Leamy’s dsPIC musical instrument, the microKey, I’ve just created a little polyphonic instrument of my own using a 12-button keypad that Richard Hayes gave me a couple of months ago. The code is set up to scan … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 3 Comments

Short dsPIC30F4011 program to test output compare SFR values

I’ve been playing around with the output compare feature of the dsPIC30F4011 microcontroller for the last day or two and finding out some interesting things about it. There are two output compare channels (OC1 on pin 23, OC2 on pin … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

PWM Sinewave generation using output compare on dsPIC30F4011

Reader Manu Abraham wrote in with an interesting query about sinusoidal variation of PWM duty cycle using the output compare feature of the dsPIC30F4011. The 30F4011 has two output compare channels which can be used to very easily generate periodic … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 10 Comments

Two square waves with arbitrary phase shift on dsPIC

Reader Imad wrote in with an interesting query about generating two square waves with equal frequency but an arbitrary phase shift between them using a dsPIC microcontroller. I’m still working out the fine details, but here’s the general gist of … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , | 32 Comments