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.

test pic16f877 with led

Status
Not open for further replies.

alaalwi11

Member level 1
Joined
Nov 30, 2010
Messages
32
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Al khurtum-Sudan
Activity points
1,626
hi anyone here, it first time to program microcontroller practical
i begin with pic16f877 with simple program to light and turn off led with delay
at begining the circut work correctly but after few test it damaged
i try to connect it again but there are no result
can any one give me some suggestion
 

You should put a resistor in series with the LED. Something like 330 Ohms maybe.

Either disable Low Voltage Programming in your configuration bits, or connect a 1k resistor from pin 36 (RB3/PGM) to ground.

The rest of the schematic seems reasonable, assuming that you are supplying good, stable power.
 

You need a current limiting resistor inline with the LED. Otherwise the you'll exceed the 25mA max source/sink per I/O pin current rating.

What was damaged the LED or PIC?
 

If it worked at the binging, current problem is man made problem
very difficult to solve such a problem, because real scenario with you

you have to follow following steps

first check MUC working order (using programmer) ( hardware ok , MCU found)
second check your hardware ( MCLR pin voltage 5V)
if you use 7805 IC try to change with new one
double check your power supply ( apply nose less power)
 

hello friends ,thank for reply
firstly in practcal experiment i use 150 ohm resistor with the led
secondly i use 7805 regulator circuit and it supplied 5v accuracy

thirdly as i say the circuit worked correctly at first and then it sometime works with error or doesn't work
finally there is some abnormal behavior when i connect the circuit completely the led dosn't work and when i disconnect the ground
from vss the led light continuously

Best regards,

alaalwi11
 

So what about LVP? Have you disabled it in code or from your programming software?

Have you tried 1k resistor from PGM pin to ground?

(see post number 2)
 

thank you indeed
my code is following :



void main()
{
TRISB=0;
loop:
PORTB=0xff;
delay_ms(1000);
PORTB=0;
delay_ms(1000);
goto loop;
}

i use the following digram after exchange pic16f84a by pic16f877 and change to adequate connection
using datasheet



 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top