Whenever use Proteus to simulate ADC, with FC6 no matter what Acquisition cycles delay time e.g 200 or conversion speed, then Proteus Simulation always displays the following: Enabled Diagnostics and the following was displayed: Changing Acquisition cycles delay time made no difference to conversion time.
I thought it should?
Although with FC7 the warnings have gone, but again changing Acquisition cycles delay time made no difference at all.
Here are conversion times with FC6 and FC7 and conversion speed is set to FRC: Should Acquisition cycles delay time made a difference or am I barking up the wrong tree?
Martin
Edit: Not sure why, but there is a not a delay for
Code: Select all
MX_UINT16 FC_CAL_ADC_Sample (MX_UINT8 Sample_Mode)
like there is within the function above.
Adding a delay for example:
Code: Select all
MX_UINT16 FC_CAL_ADC_Sample (MX_UINT8 Sample_Mode)
{
MX_UINT16 iRetVal;
while (adcon0 & 0x04);
if (Sample_Mode)
{
iRetVal = (adresh << 2); //10-bit ADC
iRetVal = iRetVal | (adresl >> 6);
}
else
iRetVal = adresh; //8-bit ADC
delay_us(50);
adcon0 = adcon0 | 0x04; //begin next conversion
return (iRetVal);
}