Page 1 of 1

ECIO

Posted: Sun Feb 20, 2011 4:08 pm
by JohnCrow
I have written a simple temperature measurment program using the LM35 IC Using a PIC16F877A on a V7 programmer
This has an output of 10mV/°C.
The program works as expected with the LM35 connected to ADC0 & LCD Display on PORTB

I have tried running the same code on the ECIO40, with the same connections, but the indicated value is approx 50% of the actual true value

Ive tried different ADCs on the ECIO with the same results.

i.e.Ambient temp 20°C 16F877A = 20.11 °C ECIO = 11.22°C
Any suggestions would be welcome. Thanks
Files attached
LM35-PIC16F877A.fcf
(7 KiB) Downloaded 344 times
LM35-ECIO40.fcf
(8 KiB) Downloaded 339 times

Re: ECIO

Posted: Tue Feb 22, 2011 8:45 pm
by JohnCrow
Hi

Tried looking at this from a different angle.
I connected the LM35 to Port A bit 0 on both the ECIO and the 16F877A in the V7 Programmer and read the ADC directly as floating point voltage.

Ambient temp in room is 23°C
The 16F877a gave a value of 0.2293 which equates to 22.93 °C i.e. correct (10mV/°C)
The ECIO gave a value of 1.8492

Is there somthing I'm missing in the data sheets
Tried a similar experiment with both boards and using read as byte and read as int, both ways gave totally different values for the different micros.
The ADC settings in flowcode were kept the same. :cry:
I only have the 1 ECIO so not able to verify if it has a fault by trying another device
Thanks

Re: ECIO

Posted: Thu Feb 24, 2011 9:56 am
by Sean
Hello,

I have tested your program using a 4K7 potentiometer as a voltage source. The temperature displayed on the LCD corresponds correctly with the input voltage across the full range:

0.3V - Temp = 30.00
5V - Temp = 499.2V

I also used an EB-061 ECIO Base Board to ensure that the port connections were correct.

Re: ECIO

Posted: Thu Feb 24, 2011 12:05 pm
by JohnCrow
Hi Sean
Thanks for having a look at the program. I also used the base board with the ECIO.

Tried using a 5k Pot between 5V and gnd with a 10k resistor from wiper to ADC0 in the ECIO and it works just perfectly.So I'm sure my ecio is fine.
Put the LM35 back in the protoboard and still gives an error.
Im suspecting it could be picking up some sort of interference. (Could the resonator on the ECIO cause this? as opposed to using a crystal with the eb006) ?

Thanks again