
Originally Posted by
HenrikOlsson
There are loads and loads of 18F series parts with 3 or more (E)CCP modules. I'm not entirely sure if the HPWM command supports more than 2 channels though but it's easy enough to configure the registers manually.
/Henrik.
After doing hours of googling, I stumbled across this post on a forum http://www.sonsivri.to/forum/index.php?topic=24131.0
Looking through his sample code it has
Code:
'PIC16F767 Device Controlling Red/White/Blue LED's
'Written July 2, 2009
'Copyright (c) PilotPTK
'U1 Main LED Driver
DEFINE OSC 20
ADCON1 = %10001101 'Port A0,A1 Analog, VREF+ = VDD, Right Justified Result
CCP1CON = %00001100 'CCP Setup (PWM Mode)
CCP2CON = %00001100 'CCP Setup (PWM Mode)
CCP3CON = %00001100 'CCP Setup (PWM Mode)
And then later down
Code:
HPWM 1,0,5000
HPWM 2,0,5000
HPWM 3,0,5000
So on that basis I would assume PBP's HPWM command support more than two channels.... so now to look for a chip that's 5v (as 3.3v is not supported on my development board) and has four ECCP modules, and then see if I can port the working code on the 18f4520 to it
Bookmarks