Hi folks,
I've just started a project using a 16F785 and had problems with the opamps, i just couldn't get one of them to work. After some headscratching i found the fault in the M16F785.INC file. The registers OPA1CON and OPA2CON are mapped to the wrong adresses.
Original......
OPA1CON equ 11Dh ;
OPA2CON equ 11Eh ;
....should be ......
OPA1CON equ 11Ch ;
OPA2CON equ 11Dh ;
This may have been fixed in a later version(still using 2.46) but i can't se anything at Melabs that indicates this.
Bookmarks