Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need program for ADC

Status
Not open for further replies.

nistelrooy

New Member
I'm using a PIC 16F84A and interfacing it with a LM35DZ temperature sensor, which has to be used with an ADC 0804 (national, 8-bit)

I need a program in MPLAB to enable the PIC to read the temperature from the ADC.

Thanks in advance.
 
nistelrooy said:
I'm using a PIC 16F84A and interfacing it with a LM35DZ temperature sensor, which has to be used with an ADC 0804 (national, 8-bit)

I need a program in MPLAB to enable the PIC to read the temperature from the ADC.

I suggest you dump the obselete 18F84, and use a current device instead, the 16F819 is pin compatible and includes 10 bit A2D internally, plus an internal clock oscillator. It would simplify, and reduce the cost of, your project considerably.
 
Hi, i made a circuit using ADC0832, is simplest...

1.- Activate CHIP SELECT
2.- Send to ADC de mux addres to select ADC port/channel using CLOCK signal
3.- Receive the byte of conversion, MSB firts (test bit in input pin of PIC and set/clear carry to shift left the Carry on ADC_Resul byte register) or LSB firts (idem but shift right). both method needs a counter of 8 bits.
4.- Once received ADC_Result, put CHIP SELECT to LOW to deselect ADC.


I hope this help you.

Bye
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top