PDA

View Full Version : HPWM and pic16f88



lerameur
- 18th September 2008, 05:42
Hello,

I am using the pic16f88 and I am trying to get 10.5khz with 80% duty cycle.
I am not getting anything decent from my program:

INCLUDE "modedefs.bas" 'Includes supoprt for PicBasic language
@ DEVICE pic16F88, HS_OSC , CCPMX_ON
DEFINE OSC 20 'use external 20mhz crystal
PAUSE 100 ' start-up delay
TRISB=0
DEFINE CCP1_REG PORTB
DEFINE CCP1_BIT 3
HPWM 1,190,10500
HERE: GOTO HERE

I used a a program from another thread, but it had internal oscillation, which is not fast enough. somebody know why I am not getting any output?

thanks

K

skimask
- 18th September 2008, 11:42
I am using the pic16f88 and I am trying to get 10.5khz with 80% duty cycle.
I am not getting anything decent from my program:

Well, what ARE you getting out of the PIC?

lerameur
- 18th September 2008, 14:22
HUmm, well I got up this morning, tested the circuit again, and guess what? its working fine...

K

skimask
- 18th September 2008, 14:24
HUmm, well I got up this morning, tested the circuit again, and guess what? its working fine...

K

Hey...ain't that the best fix...let it fix itself! :D
Must've let the old electrons flush themselves out with some faster moving ones...