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.

ADC and DAC of a sine wave in PIC18f452

Status
Not open for further replies.

mehrab ramzan

New Member
hi all,
I want to do adc in pic18f452. For verification i am applying a sine wave(amplitude=1v and frequency=2Hz) as an analog input to the pic and want to convert the digital output of pic again to analog sine wave using a dac0808
pic18f452 has a 10bit adc but i have adjusted the input voltage and Vref in such a way that digital output is in 8 bits.
I am using a 11Mhz crystal and MPLAB to build a hex file.
I tried to simulate it in proteus but the wave is not correctly reconstructed at the output.
Kindly help to identify the bug.
Attached are the files: 1) c code for adc(text file) 2)hex file 3)proteus design 4)MPLAB project and workspace
 

Attachments

  • adc files.zip
    25.4 KB · Views: 176
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top