Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

hardware issue with pic16f877a

Status
Not open for further replies.
Maybe the problem comes from the programmer. Did you verify that the PIC is correctly programmed ?
 

Zip and post the Proteus file and Code.

i have attached the code and schematic for my thermocouple project.There is 25 degree offset in simulation which i will manage later e.g if temperature is 50 then it is showing 75 .But the issue is the same, that there is so much variation in thermocouple reading in hardware.and also i am unable to run a simple program of led blinking on my controller .

- - - Updated - - -

In MPLAB IDE have you set to use Config words from Code. It might be using Config word from Project settings. If that is happening then Config in you code is not used.

Connect the LED to a different pin and try.



Amplify voltage to get 5V max for adc.

how can i check whether it is using config words from my code or project settings ?

- - - Updated - - -

Maybe the problem comes from the programmer. Did you verify that the PIC is correctly programmed ?

No programmer is fine .I have verified.Other students have no issue with it.

- - - Updated - - -

In MPLAB IDE have you set to use Config words from Code. It might be using Config word from Project settings. If that is happening then Config in you code is not used.

Connect the LED to a different pin and try.



Amplify voltage to get 5V max for adc.

I have checked.It is using configuration bits set in code.
 

Attachments

  • Thermocouple.rar
    136.5 KB · Views: 69

isnt there b a change in it for WRT_OFF as WRT_ON ??

__CONFIG( FOSC_HS & WDTE_OFF & PWRTE_ON & CP_OFF & BOREN_ON & LVP_OFF & CPD_OFF & WRT_OFF & DEBUG_OFF);
 

The other way around.

If you are not using an in-circuit debugger, which you've already deactivated in the configuration register settings, select "release" and recompile.

BigDog
I have tried each n every thing which you told but it is not working .I have attached my code and schematic .Please check.
 

Attachments

  • led.rar
    41.8 KB · Views: 62

See if this LED project works. Burn my hex file and see.

Maybe you have set for max optimization and hence delay code might be removed and you are not able to see led blinking. Reduce Code Optimization level.

In your Thermocouple code I don't see ADCON1 settings. Set ADCON1 and the project will work fine. See attached Thermocouple project. The thermocouple can measure temp > 1250. If your range of temperature measurement is 0 to 400 deg C. The the amplifier should give o/p of 5V for 400 deg C.
 

Attachments

  • mplab code.rar
    55.2 KB · Views: 53
  • Thermocouple v2.rar
    274.6 KB · Views: 54
Last edited:

Hi colleagues,
this topic start with
"I am trying simple led blinking code"
and until now we have 25 reply including from Super moderator, several Advanced members...
greath forum with proffesional approach,
that’s is reason WHY EDA BOARD is the best electronics forum on the world
best regards for all...
 

You Op Amp Circuit is wrong. You have supplied +12V and -12V to Op-Amp. The o/p of Op-Amp will swing between +12V and -12V which will damage ADC. Use a 5V rail to rail Op-Amp. Read the page in this link.

It shows the operating range for different types of thermocouple. Decide the range of temperature you want to measure. The find the max and min value of AD595/7 o/p. Use Op-Amp to amplify this mV to 0-5V range for ADC. If the function of thermocouple is not linear then use the necessary maths to calculate accurate temperatures.

http://instserv.com/rmocoupl.htm
 

You Op Amp Circuit is wrong. You have supplied +12V and -12V to Op-Amp. The o/p of Op-Amp will swing between +12V and -12V which will damage ADC. Use a 5V rail to rail Op-Amp. Read the page in this link.

It shows the operating range for different types of thermocouple. Decide the range of temperature you want to measure. The find the max and min value of AD595/7 o/p. Use Op-Amp to amplify this mV to 0-5V range for ADC. If the function of thermocouple is not linear then use the necessary maths to calculate accurate temperatures.

http://instserv.com/rmocoupl.htm

Thankyou so much

- - - Updated - - -

Maybe you have set for max optimization and hence delay code might be removed and you are not able to see led blinking. Reduce Code Optimization level.
.
t dont
I dont think so it is the matter of delay .I permanently turned on the led in code but still it was not glowing in the hardware.I think there is some issue with the configuration bits but don't know what .
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top