PDA

View Full Version : Opamps in the 16F785.



Ingvar
- 11th October 2007, 10:42
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.

Bruce
- 11th October 2007, 12:16
Hi Ingvar,

Someone must have noticed & corrected this. These are both mapped to the correct
address in M16F785.INC for v2.47 and v2.50.

Ingvar
- 12th October 2007, 07:32
Thanks Bruce, good to know.