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.

Vref+ in ADC for 16F877A

Status
Not open for further replies.

freedoms

Newbie level 5
Joined
Sep 26, 2007
Messages
8
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,342
16f877a project

Hi,

I'm doing a project that using temperature sensor LM35DZ and 16F877A to show the temperature reading on LCD. Now I have a problem in ADC conversion. I using 10 bits results, so I set Vref+ = 1.03V mean each bits is 1.03V/1024 = 1mV. but I cannot get the reading on LCD display. Can I set the Vref+ = 1.03V?

pls advise! Thanks!
 

adc 16f877a

Hello,

Can you send me the algorithm and schematic please.

In my memory (I think), the ADRESH and ADRESL register are on 16 bits and you must extract 10 bits.

ADCON0 and ADCON1 managing the ADC and the inputs.

What are Vref+ and Vref- in volt?

What's happen for ADIF and GO operande?

Al
 

vref+

Hi,
What is the temperature range of interest to you? Assuming that you need a range of 0 to 100°C, the output of LM35 will be 1V at 100°C. If you amplify input by a gain of 3 and use a reference of 3.072 (1.024*3)V for ADC, the LSB of ADC will represent 0.1°C and you will have an over range measurement of upto 102.4°C. So if you do a binary to BCD conversion of the AD value and fix the decimal value in your display just before the LSD, you will get the correct reading.
Regards,
Laktronics
 

16f877a adc

freedoms said:
Hi,

I'm doing a project that using temperature sensor LM35DZ and 16F877A to show the temperature reading on LCD. Now I have a problem in ADC conversion. I using 10 bits results, so I set Vref+ = 1.03V mean each bits is 1.03V/1024 = 1mV. but I cannot get the reading on LCD display. Can I set the Vref+ = 1.03V?

pls advise! Thanks!

You have to set Vref+ at least 2.5V greater than Vref- (or GND)
I've used it on this and it works great, a 4.096V reference would make it a little easier to do the conversion though (less math)
**broken link removed**
The Cricket thermostat prototype.
 

lm324 connection with lm35

Hi,

attachment is my schematic and ASM code for my project.

pls advise. Thanks!
 
16f877 vref+ vref-

laktronics said:
Hi,
What is the temperature range of interest to you? Assuming that you need a range of 0 to 100°C, the output of LM35 will be 1V at 100°C. If you amplify input by a gain of 3 and use a reference of 3.072 (1.024*3)V for ADC, the LSB of ADC will represent 0.1°C and you will have an over range measurement of upto 102.4°C. So if you do a binary to BCD conversion of the AD value and fix the decimal value in your display just before the LSD, you will get the correct reading.
Regards,
Laktronics

Hi Laktronics,

yes! I need 0 to 100°C temperature range. you mean I need to add amplifer before go into microcontroller? it is mean that I cannot set the Vref+ = 1.03V? can you show me how to add the amplifier circuit?

Thanks for your help!!
 

asm 16f877a lm35

Hi,
Yes, you can not use a reference of 1.03V because the Specification of the controller requires +Vref>2.5V. You can use one of the opamps of LM324 in a noninverting mode with Rf/Ri = 2, (Rf=20K and Ri=10k). Apply the output of LM35 to noninverting input through a 6.8k. One more opamp from the IC may be used to derive the +Vref of 3.072 from 5V supply.

In the schematic, Vdd and Vss connection is not there, but I hope they are there. The crystal is not put, may be you are using internal RC? An adustable voltage for LCD brightness control may be required? But, the major mistake, you should put a reset circuit to MCLR, and not Vdd.

Regards,
Laktronics
 

lm324 with lm35

freedoms said:
Hi,

attachment is my schematic and ASM code for my project.

pls advise. Thanks!

Hi..i'm a newbie in assembler code for the PIC..
Mind askin that if my output of PIC using PORT B to the LCD and inpur PORT A to LM35 which different to your assembler code u post...
which part of the assembler code should i change...nid some advise and help...thx:D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top