#chip 16F767, 8 'mhz
#config MCLRE=off, WDT=off,pwrte=off, lvd=off, boren=off
dir portc.2 out 'ccp1
main:
do
'Turn up brightness over 2.5 seconds
For Bright = 1 to 255
HPWM 1, 40, Bright
wait 10 ms
next
'Turn down brightness over 2.5 seconds
For Bright = 255 to 1
HPWM 1, 40, Bright
wait 10 ms
next
loop
goto main
when I run this my chip draws alot of current and gets hot? ut if i tell it to just turn on the output it runs fine it is only when i use the hpwm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#chip 16F767, 8 'mhz
#config MCLRE=off, WDT=off,pwrte=off, lvd=off, boren=off
dir portc.2 out 'ccp1
main:
do
'Turn up brightness over 2.5 seconds
For Bright = 1 to 255
HPWM 1, 40, Bright
wait 10 ms
next
'Turn down brightness over 2.5 seconds
For Bright = 255 to 1
HPWM 1, 40, Bright
wait 10 ms
next
loop
goto main
when I run this my chip draws alot of current and gets hot? ut if i tell it to just turn on the output it runs fine it is only when i use the hpwm
Whats connected to the hpwm port.
What supply voltage is the PIC running off.