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.

[SOLVED] PIC16F877A not working with LED flashing program

Status
Not open for further replies.

LeoStar

Member level 2
Member level 2
Joined
Nov 19, 2014
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
500
Greetings to the Champions of electronics.
I must say that I am just a novice in this field and am working on projects like gsm automation and automatic toll collector system using pic16f877a.
I have managed to complete the hardware, everything seems to be fine.
I am using pickit2 programmer which shows the attempt to program as successful. But I cant see it working on the hardware. I have no idea where the problem lies.
I am using 4 Mhz crystal oscillator. Also the lcd display program is not working.
I am trying to toggle PORTB every 2 secs but it doesn't work and the PORTB is continuosly high for all the time.
Please help me as quickly as possible as it is very important for me.
Thanks in advance.
 

Without a schematic or program it is difficult to predict what might be wrong!

Things to check:
1. is MCLR high? (if it is low or not pulled high the PIC will be stuck in reset mode)
2. Is the oscillator actually running? Do you have it set to XT mode and have you followed the connection guidleines?
3. Do you have decoupling capacitors across VSS and VDD pins and are they as close as possible to the pins?

Brian.
 

if your led is on that means pic seems ok, if the mclr pin is low, a port or a port bit can never go high...i think you hav set the portb high and used delay but you forgot to clear the portb, once you set the portb high , it vl remain high until you clear the port... like below:
Code:
movlw   h'ff'
movwf  portb
call       delay
clrf       portb
call       delay
goto      start

for the blinking operation you need to set port to high the w8 sm time and clear the port again and repeat the procedure so you can get the led flashing...
 

Thank you so much for your replies, Brothers! I managed to sort out the problem. Now the LEDs are flashing and the LCD is displaying the text perfectly.
It was something to do with the configuration of the controller. I had to change from MicroC.
And I must say I have crossed ahlf the way to my destnation.
I guess this forum is lucky for me.
One more thing Bros., how long should I wait before checking for a reply to the post?
 

gud to hear that you solved your problem, for replies, chk the timing of your post and other posts, you almost got 2 replies in just around 3-4 hours....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top