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.

ADC using pic 16f877a

Status
Not open for further replies.

sreejith

Member level 3
Joined
Apr 17, 2006
Messages
64
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Location
India
Activity points
1,781
I am trying to study pic 16f877a for my project works.
I programmed the chip with following codes(for adc) and it was verified ok in programmer.

DIM VM AS WORD
DIM I AS BYTE
DEFINE ADC_CLOCK = 3
DEFINE ADC_SAMPLEUS = 50
TRISA = 0xFF
TRISB = 0
ADCON1 = 0
FOR I = 0 TO 4
ADCIN 0, V(I)
NEXT I VM = 0
FOR I = 0 TO 4
VM = VM + V(I)
NEXT I VM = VM / 5
PORTB = VM.LB

I have connected a crystal oscillator across pins 13(osc1) and 14(osc2). Capacitors of 10µf are connected to each pin and grounded. But it do not give any o/p. I have tried different simple test programs and changed IC, oscillator and capacitors, but it is not working.

What will be the problem with this. Is there some additional codes required or is
any connection missing ? please help!
 

Sreejith,
U can solve the problem by connecting u'r interrupt enable pin(GIE) to gnd.
 

check if u have properly connected th e/MCLR pin...
 

    sreejith

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top