Page 1 of 1
PIC16F527 and FC10
Posted: Sun Apr 13, 2025 10:48 pm
by alanwms
I see that the 16F527 has internal operational amplifiers. I started a new project to look at this and can't figure out how to use these peripherals. Do we have examples or info on this?
Re: PIC16F527 and FC10
Posted: Sun Apr 13, 2025 11:10 pm
by mnfisher
You'll need to handle the Analog peripheral setup in C by accessing the relevant registers..
APFCON, CM1CON0/CM2CON0 and OPACON
to:
Enable the op amp
Configure input selection
Enable output routing
Set gain mode
Do you have a specific use in mind?
Re: PIC16F527 and FC10
Posted: Mon Apr 14, 2025 2:33 pm
by alanwms
Sure - I want to setup a gain of around 25:1 so I can read a low signal. I'm not proficient writing C code to achieve my goal.
Re: PIC16F527 and FC10
Posted: Mon Apr 14, 2025 8:57 pm
by mnfisher
The documentation (datasheet) verges on the flimsy here - a little on the thin side.....
Apart from table 16-16 showing unity gain mode - there is little info (apart from two bits in OPACON to enable the op-amps)
Looking at the
https://ww1.microchip.com/downloads/en/ ... 03280A.pdf document - reveals a lot more control - but the registers mentioned (for example OPA1CON0 don't seem to be present on the PIC16F527.
Do you have any info on it?
Re: PIC16F527 and FC10
Posted: Mon Apr 14, 2025 10:04 pm
by mnfisher
Seems o be more set up as a comparator than an op-amp
Martin
Re: PIC16F527 and FC10
Posted: Mon Apr 14, 2025 10:37 pm
by chipfryer27
Hi
This document is a bit more applicable.
Regards
Re: PIC16F527 and FC10
Posted: Thu Apr 17, 2025 10:53 pm
by alanwms
Thanks People!
On the flip side, do you know of better choices for a uP with opamp capacity?
Re: PIC16F527 and FC10
Posted: Fri Apr 18, 2025 6:31 am
by mnfisher
PIC16F176x or PIC16F177x series might be worth a look...