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.

PIC microcontroller analog to digital converter

Status
Not open for further replies.

milindmiet

Newbie level 4
Joined
Jul 22, 2007
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,338
hi i m developing a display system on pic 16f73/76 by this i want to measure ac mains for which i have to use on chip adc in pic micro can any body help me to unstand the programming of adc in assembly please help me its urgent
 

Sorry i don't do asm
but be careful when you meassuring mains your olnly allowed 5 max dc into pic

but do a google search you should find plenty ig info

wizpic
 

i han't done pros on 16f73 or 76.But i have done some coding for pic16f877.
following is the code which i used to test ADC . which read a anlog value and display it on 8 leds.
Hope it help ful for u.

===============================================
see the attachment


===============================================

Thes are the basic step i have followed

1.setup the analog pins as inputs
2.setup ADCON1 and ADCON0 register
3.Start ADC
4.check werher ADC proccess i s over
5.when it done copy the value form the adrsel reister
6.Display it on portb leds

Regards
Dilan

Added after 2 minutes:

sorry attachment is missing
 

    milindmiet

    Points: 2
    Helpful Answer Positive Rating
Right,o

I have to mention something here;

PLEASE do not go putting 240/110V AC any place even remotely close to your project board unless you have extensive knowledge of, and procedures regarding, high voltage safety. Yes, yes, I know I am a killjoy but mains AC is a killyou. Preferably use a mains measuring module double insulated with optoisolated TTL outputs, I shudder to think of the circuit containing live 110/240 ac all ending up at the pin of a PIC in 0-5v levels.

Please be very careful with this project and make sure you ask for help in the analogue electronics section of the forum for assistance with measuring and converting mains AC to TTL levels.

Good luck and be safe.
 

milindmiet said:
hi i m developing a display system on pic 16f73/76 by this i want to measure ac mains for which i have to use on chip adc in pic micro can any body help me to unstand the programming of adc in assembly please help me its urgent

Application note AN557 from Microchip, although for measuring and multiplexing with PIC16C71x, but must be useful for you.

You should read the book "Microcontrol'n Apps" (former name: PIC'n up the Pace) of David Benson, he wrote a very good book for you to practise with ADC and PICs.

They are all in assembly.

nguyennam
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top