Sorry. I did post a link to the datasheet. The exact chip is a PIC16F627. The datasheet doesnt mention ADCON anywhere so i assume it doesnt have it. Ive tried setting CMCON. I took a look again at the datasheet and tried a few values. Ive now found one that seems to work properly. From what i can see, all of porta is working as expected now.
While testing ALL pins ive noticed another problem. RB0 wont turn off. Im sure this is because its a special pin but i cant see what to do with it.
In that first link RA4 isnt a problem because its an input anyway.
Ive attached the full code so far as requested. Everything seems to work except RB0


The circuit can control mains bulbs and/or LEDs with brightness control.


Bookmarks