I think I should just change my login ID to "confused" sometimes....or is that already taken?
Anyway I am currently using a 16f819 for an electric scooter control board overhaul. I currenly am using HPWM on PORTB.3/ CCP1 with no problems.
'short clip from my code
main:
adcin 1,B0 'Pot value is stored in B0 variable
hpwm 1,B0,1000 'B0 is fetched from ADC as an 8-bit value 0-255
'return
IF PORTB.7 = 0 Then blinkleft
IF PORTB.6 = 0 Then blinkright
IF PORTB.5 = 0 Then headlight
IF PORTB.4 = 0 Then brakelight
IF PORTA.3 = 0 THEN BEEP
return
goto main
What I am confused about is why there are (2) CCP1 pins (PORTB.2 & PORTB.3)? Why are they not labled CCP1 & CCP2 in the pin diagram? Even though I have in my code to use channel 1, I still am given the option to choose my CCP1 bit/channel under fuses with a drop down menu. After reading section 5.29 in the PBP manual I can only guess there are alternate pins for HPWM and they are just labeled the same in the pin diagram....?
Probably a dumb question but I really would like an answer.
thanks ahead of time.
Bookmarks