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!
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!