I can help you if you zip and upload the schematic of your project. What sensor are you using and what compiler?
- - - Updated - - -
Do you want something like this.
Please find the attachment.
I need to modify the schematic by replacing the PICAXE with PIC18F452. And the code is found from edaboard.com i mentioned previous reply..
Thanks.
- - - Updated - - -
Yes. I need a conversion like you post. I will also need to display in PC with a data logger (i m trying with stamp plot). I also got some help from a friend... he send me the below code:
unsigned int temp_res;
unsigned char text[6];
void main()
{
int len=0;
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
do
{
temp_res = ADC_Read(2); // Get 10-bit results of AD conversion
if(temp_res>999)
len = 1;
else if(temp_res<1000 && temp_res>99)
len = 2;
else if(temp_res<100 && temp_res>9)
len = 3;
else
len = 4;
WordToStr(temp_res,text);
UART1_Write_Text(text+len);
UART1_Write(13);
Delay_ms(1000);
} while(1);
}
with mikro c i compiled this to hex with no error. Then loaded to MCU. I m using a dev board for PIC18F452.
Any more help from you is highly appreciated.
Thanks.