Page 1 of 2

Sample code of PR11 does not work on PIC16F877a

PostPosted: Tue Aug 30, 2011 12:38 pm
by altron11
Hi, I purchased the PIC16F877A from Cytron. I came across the sample code on the homepage and burn it into the PIC. But it did not work. I am building a similar circuit (temperature monitoring system using PIC16F877a and PT100 to display on 16x2 LCD). I need help on this.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Tue Sep 06, 2011 8:50 am
by ober
All the sample source code under DIY project were tested with the real circuit and component as shown in the detail description before we launched. So it is working sample code. Especially, PR11 as many has been using and modifying it.

A photo of the hardware is much more appreciated, the photo will give us some idea where might the cause be.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Sun Sep 11, 2011 4:00 pm
by altron11
Hi Ober,

I am currently re-designing my circuit.I will update again once it is done.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Sun Sep 11, 2011 4:06 pm
by altron11
ober WROTE:All the sample source code under DIY project were tested with the real circuit and component as shown in the detail description before we launched. So it is working sample code. Especially, PR11 as many has been using and modifying it.

A photo of the hardware is much more appreciated, the photo will give us some idea where might the cause be.


Hi Ober,
If i were to use a PT100 2-wire sensor instead of the lm35, can i connect to RA0 of the PIC as per PR11? Do i need to connect any other components?

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Wed Sep 14, 2011 6:09 pm
by ober
altron11 WROTE:Hi Ober,
If i were to use a PT100 2-wire sensor instead of the lm35, can i connect to RA0 of the PIC as per PR11? Do i need to connect any other components?

I am not familiar with PT100 2-wire sensor. Any link or datasheet explaining specification on this sensor?

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Fri Sep 16, 2011 1:05 am
by altron11
ober WROTE:
altron11 WROTE:Hi Ober,
If i were to use a PT100 2-wire sensor instead of the lm35, can i connect to RA0 of the PIC as per PR11? Do i need to connect any other components?

I am not familiar with PT100 2-wire sensor. Any link or datasheet explaining specification on this sensor?


Hi Ober,

I am unable to upload the datasheet as it is in pdf format. As follow is the link to the sensor. I am using the DM-303 model.
http://sg.element14.com/labfacility/dm- ... tt=1289667

Thanks & Regards,
Danny

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Fri Sep 16, 2011 6:17 pm
by ober
altron11 WROTE:I am unable to upload the datasheet as it is in pdf format. As follow is the link to the sensor. I am using the DM-303 model.
http://sg.element14.com/labfacility/dm- ... tt=1289667


From the link you provide, the datasheet does not eleborate much details about this device.

Anyway, from here: http://www.iqinstruments.com/iqshop/technical/pt100.html, we know PT100 is actually using Platinum to measure temperature. The resistance will change with the temperature, when temperature raise, the resistance increase too. There are 2 type of PT100, which refer to resistance at 100 degree C, is either 138.5 Ohm or 139 Ohm. At 0 degree C, the resistance should be 100 ohm. In other words, each degree C of temperature will change the resistance in 0.39 Ohm if the changes is linear.

OK, that is totally not same as LM35. LM35 is quite straight forward, giving voltage against temperature, 10mV/degree C. 0V at 0 degree C.

you can use resistor network/ladder to be voltage divider for PT100, yet the changes is very small, therefore you might need very precise resistor to offer good result.

Try google for sample application of PT100.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Fri Sep 16, 2011 10:56 pm
by Brian Griffin
The PT100 is probably a thermistor. The LM35 is a linear temperature sensor, which is 1 degrees celcius per 10 milivolts.

You might need interpolation tables for the thermistor due to such non-linearity.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Sat Oct 01, 2011 4:45 pm
by TeoYX
In this project, RA3 is as the Vref for the analogue sensor? If without this, can the sensor work too?

Please help. Thanks.

Re: Sample code of PR11 does not work on PIC16F877a

PostPosted: Sat Oct 01, 2011 5:12 pm
by robosang
TeoYX WROTE:In this project, RA3 is as the Vref for the analogue sensor? If without this, can the sensor work too

Not really study the circuit and code, anyway, if the code and the original schematic is using RA3 as Vref, you need it to make the whole thing work as expected.