Electronics > Microcontrollers

PIC internal ADC Aquisition Time delay



I've got a project with a programmable FM transmitter (Atmels ATA5749) and an RF power detector (MAX2015).
They are both connected to a single PIC, and I am trying to auto-adjust the power of the transmitter using the PIC as a controller.

The ATA5749 is initialised using SPI, then modulates whatever you send to it. The chip is designed for automotive applications - such as in a remote keyfob. Due to this, the chip only transmits when data is sent to it - as opposed to constantly sending a carrier wave.

The MAX2015 outputs an analogue voltage that I can read using my PIC's internal ADC, but I have to stop transmitting to read in the ADC.

Am I right in saying that by setting ADCON2.ACQT (A/D Acquisition Time Select) to 20TAD, I can delay the start of the acquisition by 20*TAD (where TAD equals ~1us) or ~20us.
By extension, I can set the delay to ~20us, tell the ADC to start, start the transmission, actually start ADC, complete ADC, complete transmission, and read the ADC - thereby getting the power level of the trasmission.

What do you gus think?

Many thanks,

p.s. I've already cut the PCB so I cant really add an op-amp hold circuit etc.

It should work that way, yes. Though you can use the adc to sample continuously as it has got a sample & hold circuit in it, so it is not a problem if the input is changing.

I think it depends on kind of PCI micro. There are some like dsPIC where you could just set the ADC to free run and dump the readings into RAM over DMA, and then find maximum when time critical part (transmission) is over.

Also, I have a strong feeling that ADCON2.ACQT adjusts rather sampling time (the time when input switch is on and input voltage is loading internal storage capacitor) rather than a plain delay.

Another option would be to utilize some stand-alone sample-and-hold amplifier which would be triggered with logic signal + some crude delay-timer (dunno if ne555 can do such speed, but it could be worth a try)

I'm using a pic18lf13k22 (or 14k22), and it seems to be working fine now.
By setting ADCON2.ACQT to 20, I am increasing the amount of time the input cap is charging effectively delaying the beginning of the conversion.
I dont know if I am getting the correct absolute values, but it is acceptable for relative values.

Thanks for your help


[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod