PDA

View Full Version : 18F2525 A/D, Comparator and Vref modules



fbraun
- 20th May 2005, 01:04
Hello

I posted this on the Microchip website and don't have an answer yet. Perhaps someone here can shed some light on this for me.

Given that:
1. I've got my A/D module configured to use RA0 as its input
2. RA3 and RA2 are configured as external Vref- and Vref+ inputs

Questions:
1. Can the Comparator module be enabled simultaneously with the A/D module and use RA0 as its analog Vin- input while the A/D module uses RA0 as its analog input?
2. Can the Comparator module be enabled simultaneously with the A/D module AND the VREF module in the CM2:CM0 = 110 mode?

This project only needs one of the comparators to be used simultaneously with the A/D module and the VREF module. The end result should be that the comparator output bit will be monitored and once the threshold is exceeded would trigger the A/D which would keep reading and do a peak detect on the same analog input. Analog sgnal frequencies are relatively low ( in the 50Khz range).

Perhaps I've confused myself with the above givens and requirements. Any help would be greatly appreciated.

Thanks
Fritz

Melanie
- 20th May 2005, 09:19
I think this is one of those questions where you're going to have to stuff a PIC into a breadboard and do a simple test. There's nothing in the Datasheet to say you can't... but there's nothing to say you can either.

fbraun
- 20th May 2005, 23:17
Hi Melanie

I thought as much and had already started tests. Was hoping that someone had already used the three modules simultaneously.

Thanks
Fritz