what happen if you remove
Code:
DEFINE CCP1_REG PORTC ; HPWM 1 pin port
DEFINE CCP1_BIT 2 ; HPWM 1 pin bit
DEFINE CCP2_REG PORTC ; HPWM 2 pin port
DEFINE CCP2_BIT 1 ; HPWM 2 pin bit
Since this PIC don't have alternate pin for any CCPx, i don't know how it's handled.
And the obvious, if i can... did you really selected the right PIC in the editor?
Also, you should have a space between @ and __Config. But it could be a forum copy/paste problem so..
Also, even if not PWM related
Code:
DEFINE HSER_BAUD 9600 ; 9600 Baud USART
DEFINE HSER_RCSTA 90h ; Enable USART RX
DEFINE HSER_TXSTA 24h ; Enable USART TX
DEFINE HSER_SPBRG 51 ; 9600 Bauds
DEFINE HSER_CLROERR 1 ; Clear all USART errors as they happen
You have two definition of the Baudrate... one is false. Or you keep HSER_BAUD 9600 or you correct the HSER_SPBRG 51 to HSER_SPBRG 129. 51 is the right value for 8MHZ.
Last edited by mister_e; - 19th September 2006 at 05:58.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks