Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] The ADFM (bit 7 ) of ADCON1 register

Status
Not open for further replies.

PA3040

Advanced Member level 3
Advanced Member level 3
Joined
Aug 1, 2011
Messages
883
Helped
43
Reputation
88
Reaction score
43
Trophy points
1,308
Activity points
6,936
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 advanc
 

Hi,

Its just a convenient way of presenting the 10 bit result in two different layouts, depending on how use want to then use the data.

eg RJ ADRESH 000000xx ADRESL xxxxxxxx LJ ADRESH xxxxxxxx ADRESL xx000000, where x = adc result
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
You can use the left justified result if you want a 8bit result , then you can simply read the ADRESH value
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
You can use the left justified result if you want a 8bit result , then you can simply read the ADRESH value

Dear alexan and wp100 many thanks for reply

I need a another advice which is,
1.In ADC we can use VREF to reduce the step size. my problem is how we apply (-) VREF
2. If we use (+) VREF as 3V and (-) VREf as -2 volt, how we calculate the step size
please help
 

"(-) VREf " why u need neg ref ?
what range r u trying u measure ?
 

You can't use negative voltages in the Vref pin

pic16f877a_Vref.gif
 

Dear dselec thanks for reply

This is not for application, only for studding purpose
Hopefully you will help me

Thanks
 

Hi,

See Betwixts entry #3 on this post - https://www.edaboard.com/threads/221361/

As for calculating the step size its always the voltage range / 1024 ie 5v /1024 or 2.5/1024 etc.

If you have got a negative voltage that needs to be read, eg a ph probe then you need an op amp to convert it.
See Nigels ADC tutorial for details of how its done.
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
Dear All

The ADC module is working while The device in the SLEEP mode. As I know in the SLEEP mode the Fosc is stopped. so my question is, how ADC module will functioning while Fosc is stopped
please advice
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top