Hi Henrik,
tried your suggestion, didnīt work.
thought it was already in the defines, but tried that too.
Any more ideas?
thanks
Hi Henrik,
tried your suggestion, didnīt work.
thought it was already in the defines, but tried that too.
Any more ideas?
thanks
Hi,
Now I'm a bit confused, it seems like it IS defaulting to PortB.0 and not PortB.3 as I said earlier, so you shouldn't have to change anything. Either way I've tried it here and it works.... I can switch the PWM output between RB0 and RB3 by changing the CONFIG like shown in the previous message.
However, I don't see you setting the TRIS register anywhere and I don't know if HPWM does that for you, always best to do that your self.
/Henrik.
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