If you are using MPASM for the assembler, defines need to be all uppercase.
Code:define CCP1_REG PORTB DEFINE CCP1_bit 0
If you are using MPASM for the assembler, defines need to be all uppercase.
Code:define CCP1_REG PORTB DEFINE CCP1_bit 0
DT
Hello Darrel,
nice you took a look at my childish problem.
The config files you mentioned were in the upper part of the program
do I have to put them in the .inc file? Iīm confused.
And i was so frustrated I wrote code that used Portb.0 as switch
inside my simple program because I feared the chip was blown but it works.
it is just: I canīt get portb.0 as HPWM output AND the normal LCDout application at once. The LCD is the reason I canīt switch the port. got the boards already.
sream, howl, and so on
Try to set your fuse like this:where:Code:@ DEVICE PIC16F88, CCPMX_OFF
0 = "ON" CCP1 on RB3
1 = "OFF" CCP1 on RB0
You also need to set a register:HTHCode:CCP1CON = %00001100 'Select PWM Mode
Roger
Instead of using HPWM, try this:You won't need to declare/define T2CON, CCP1CON, PR2 and CCPR1L.Code:PWM PORTB.0,speed,1000
PS: I'm using MCS
Roger
Bookmarks