Arduino Projects    |   Raspberry Pi  |     Electronic Circuits    |    AVR    |    PIC    |    8051    |    Electronic Projects   |   Free TI Design & Simulation Tools 

after conversion stored adc value is hex value or decimal value

2 posts / 0 new
Last post
abhishekgaurav
abhishekgaurav's picture
Offline
Joined: 17/05/2011
Posts: 8
Points: 60
after conversion stored adc value is hex value or decimal value

i stored adc value after analog to digital conversion in variable int preset...but i m not sure this value is decimal value or hex...should i compare like ADC>>40 or ADC >>0X12 please help . i m not getting right result.

AJISH ALFRED
ajishalfred's picture
Offline
Joined: 10/01/2012
Posts: 1315
Points: 6200

 

As far as I know, the decimal or hex is a kind of value entry format in your IDE. For a particular value either if you use decimal or hex the compiler will eventually convert it into the same machine code. Also in the adc register the value is stored in its corresponding binary format.

Login or register to post comments
You are here