I was trying to program a PIC12F675 to work with this dimmer design and I am obviously missing something. I copied the code from the Dimmer example and it was not working so I moved to a breadboard to do some testing. I can not even make an output on these PIC's go high! I know I am missing something but I can't imagine what it is! Here is the code - as simple as it is:
@ DEVICE INTRC_OSC_NOCLKOUT & WDT_ON & MCLR_OFF & PWRT_ON & BOD_ON
PAUSE 500
CMCON=7 ' Disable analog comparator
ANSEL=0 ' Disable analog converter
TRISIO = %11111111
TRISIO.0 = 0
TRISIO.1 = 0
TRISIO.2 = 0
TRISIO.3 = 0
TRISIO.4 = 0
HIGH GPIO.0
HIGH GPIO.1
HIGH GPIO.2
HIGH GPIO.3
HIGH GPIO.4
Start:
GOTO Start
END
Now, correct me if I am wrong, but I should be able to measure 5V at each of the 5 outputs above. I get nothing. I have tried several PICs and get the same results. I've written hundreds of programs for different PICs and this one has beaten me. I know the solution is unbelieveabley simple, but GEEZ!




Bookmarks