Sample code of PR11 does not work on PIC16F877a

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Sample code of PR11 does not work on PIC16F877a

Postby altron11 » Tue Aug 30, 2011 12:38 pm

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.
altron11
Newbie
 
Posts: 14
Joined: Tue Aug 30, 2011 12:20 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby ober » Tue Sep 06, 2011 8:50 am

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.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby altron11 » Sun Sep 11, 2011 4:00 pm

Hi Ober,

I am currently re-designing my circuit.I will update again once it is done.
altron11
Newbie
 
Posts: 14
Joined: Tue Aug 30, 2011 12:20 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby altron11 » Sun Sep 11, 2011 4:06 pm

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?
altron11
Newbie
 
Posts: 14
Joined: Tue Aug 30, 2011 12:20 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby ober » Wed Sep 14, 2011 6:09 pm

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?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby altron11 » Fri Sep 16, 2011 1:05 am

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
altron11
Newbie
 
Posts: 14
Joined: Tue Aug 30, 2011 12:20 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby ober » Fri Sep 16, 2011 6:17 pm

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.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby Brian Griffin » Fri Sep 16, 2011 10:56 pm

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.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: Sample code of PR11 does not work on PIC16F877a

Postby TeoYX » Sat Oct 01, 2011 4:45 pm

In this project, RA3 is as the Vref for the analogue sensor? If without this, can the sensor work too?

Please help. Thanks.
TeoYX
Apprentice
 
Posts: 47
Joined: Fri Aug 12, 2011 10:47 pm

Re: Sample code of PR11 does not work on PIC16F877a

Postby robosang » Sat Oct 01, 2011 5:12 pm

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.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Next

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 2 guests

cron