ecaits
Member level 4
- Joined
- Jan 16, 2014
- Messages
- 76
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Activity points
- 579
Hello Gurus,
I am using PIC16F877 in MPLAB IDE 7.60, using Hitech C Compiler and MPLAB ICD debugger.
Now I want to display 10 bit ADC output in float point on 16x2 LCD. I am getting ADC output in HEX and by modulo division method I am getting individual decimal value and storing it in one array. In array I am getting exact decimal value but when i m taking it in any variable then it shows in hex format.
My input is 0-5V and i am getting 0-1023 range in ADC output. But I want to display 0.0 to 150.0 (like 145.9) on LCD. To reduce range from 0-1023 to 0.0 to 150.0, I have to divide 0-1023 range by 6.82 so I will get output in floating point to display on LCD.
To divide by 6.82, I should get range 0-1023 in decimal format but it always get in hex format in variable as well as registers.
How I Can solve the issue???
I am using PIC16F877 in MPLAB IDE 7.60, using Hitech C Compiler and MPLAB ICD debugger.
Now I want to display 10 bit ADC output in float point on 16x2 LCD. I am getting ADC output in HEX and by modulo division method I am getting individual decimal value and storing it in one array. In array I am getting exact decimal value but when i m taking it in any variable then it shows in hex format.
My input is 0-5V and i am getting 0-1023 range in ADC output. But I want to display 0.0 to 150.0 (like 145.9) on LCD. To reduce range from 0-1023 to 0.0 to 150.0, I have to divide 0-1023 range by 6.82 so I will get output in floating point to display on LCD.
To divide by 6.82, I should get range 0-1023 in decimal format but it always get in hex format in variable as well as registers.
How I Can solve the issue???