PIC18F25K20 Fixed Voltage Reference Module (FVM)

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

PIC18F25K20 Fixed Voltage Reference Module (FVM)

Post by Jon Chandler » Sun Dec 19, 2010 4:15 pm

The PIC18F25K20 has what I think is a somewhat unique feature, a fixed voltage reference module.

This 1.2 volt reference can't be used as the ADC reference, but it's simple to use it to calibrate what the ADC reference voltage is. If the 18F25K20 is being battery powered, it's an easy task to use the FVM to calculate the battery voltage.

The FVM is read the same as any ADC channel - just read channel 15. I don't know if it's necessary or if it's handled someplace else, but I changed the 18F25K20.bas system file "Number of ADCs" from $0A to $0F to allow reading the FVM channel.

The details including Swordfish code are on Digital-DIY here.

Post Reply