ARandomOWl
New Member
I am using a PIC 18F2458 with a modified version of the Microchip USb stack PICDEM demo. USB is working fine along with PWM on CCP1 to change the brightness of an LED using PC software. Ok, no problem.
But when I try to initialize the 2nd PWM channel (using OpenPWM2() in C18), USB stops working (windows reports an unidentified device). I have tried several things including stopping PWM1 first, changing CCP2 to multiplex with a different pin, messing with TMR2 settings, etc. but nothing has made a difference.
I have bypass caps on Vcc and Vusb and I'm using a 20MHz XTAL (using HSPLL and full speed USB). I found an old thread over at the Microchip forum but that didn't help.
Any ideas anyone?
But when I try to initialize the 2nd PWM channel (using OpenPWM2() in C18), USB stops working (windows reports an unidentified device). I have tried several things including stopping PWM1 first, changing CCP2 to multiplex with a different pin, messing with TMR2 settings, etc. but nothing has made a difference.
I have bypass caps on Vcc and Vusb and I'm using a 20MHz XTAL (using HSPLL and full speed USB). I found an old thread over at the Microchip forum but that didn't help.
Any ideas anyone?