Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dear All
The ADFM (bit 7 ) of ADCON1 register is used for result justification. please advice me what is the benefit this justification and what kind of Technic we can use, using this justification
This is reference to 16f877a MCU
Please advice
Thanks in advance
hi,
If the A2D output is left justified into the ADRESH register, reading the BYTE from the ADRESH register it will give a count value of 0 to 255 for a +5V input when a Vref of +5V is used.
Right justified will give a value in the ADRESH and ADRESL registers, reading the WORD from these two registers will give a count value of 0 to 1023 for a +5V input when a Vref of +5V is used.
Dear Sir Thanks for reply But I am not yet well understand
Basically it just makes it very easy to use the ten bit A2D as an 8 bit A2D.
To read ten bits requires two reads in different banks, this bit allows you to read the top 8 bits (giving 8 bit resolution) in a single read from a single bank.
It will cause a interrupt when done with conversion that will wake the pic from sleep
It's like this the cap charged up interrupt fires and the clock starts running to send the value out.
It will cause a interrupt when done with conversion that will wake the pic from sleep
It's like this the cap charged up interrupt fires and the clock starts running to send the value out.
Dear be80be,
Thanks for reply
I need to know a little thing, The ADC interrupts fire after the conversion. so I am asking how is ADC process done while in the SLEEP mode, because Fosc is nun functioning in the SLEEP mode
Please Help
Pommie said:The ADC can only cause an interrupt during sleep if the internal oscillator is used. See the relevant data sheet.
Mike.
Operation in Sleep mode requires the A/D FRC clock to
be selected. If bits ACQT2:ACQT0 are set to ‘000’ and
a conversion is started, the conversion will be delayed
one instruction cycle to allow execution of the SLEEP
instruction and entry to Sleep mode. The IDLEN bit
(OSCCON<7>) must have already been cleared prior
to starting the conversion.
The ADC has it's own internal oscillator that has to be selected, see the data sheet for details.
Edit, missed both your replies above.
Mike.
Jon he has been reading the data sheet
micropad said:Dear Pommie thanks for reply
What do you mean of ADC has it own oscillator