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.

Real use of left and right alignment in ADC

Status
Not open for further replies.

Embedded_Geek

Full Member level 6
Joined
Jul 5, 2010
Messages
340
Helped
58
Reputation
116
Reaction score
56
Trophy points
1,318
Location
Germany
Activity points
2,948
Hello edaboard members,

I am using STM32F103. I want to know what is the real use of a left and right alignment of adc result. How does it help? What should be chosen ideally?

I googled but unfortunately could not get a concrete answer.

Thanks in advance,
Embedded_Geek
 

For 10 bit adc, if you need all 10 bits you are reading low and high value of conversion result using right alignment. If you need only 8 bits, you use left alignment and take only high value.
 

Hi,

Some think in LSBs. They like to use right aligned ADC values.

I like to think in "full scale" ...i like left aligned.

Some ADCs are available in 12, 14, 16 bit versions. If you use left aligned you don't need to change code.

Klaus
 

Real use of left and right alignment in ADC For 10 bit adc, if you need all 10 bits you are reading low and high value of conversion result using right alignment. If you need only 8 bits, you use left alignment and take only high value.To explain the use of the ADC, let's look at a basic example taking a single reading. ... ADFM = 1; //ADC result is right justified ADCON0bits. ... to the left by 8 and adding the ADRESL.If we do not wait at least 5us, the reading will be lower than the actual voltage applied to the pin.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top