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.

Problem with PIC16f84 as it always outputs from ports logic1

Status
Not open for further replies.
Re: pic16f84 problem?

hi

thanks too much for your trying and me too reach dead end so need for sorry

about the oscillator and wiring .......i change the oscillator i even tryied useing RC instead of XT,wires ,reconstruct the circuit many times

but same problem ...........all ports of pic16f84 are always on !
 

Re: pic16f84 problem?

OK, I have to admit it's puzzling.

But...
I simulated this last code and I noticed that it can take up to 40sec. for the LED's to go off, assuming that the resistor and capacitor values for the external RC oscillator are 10k/27pF.
Are you sure you waited long enough for the LED's to go off?
Can you check the oscillator frequency? It should be about 5MHz, but if it's lower then the time will be even longer.

So first off, wait a little longer to see if the LED's go off.
Or, change the delay loops, maybe remove the last loop, to make things happen faster.
(I also noticed you do not initialize the counters; that is not healthy, you should always know where you start counting).
 

Re: pic16f84 problem?

You've gotten lots of good advice, but let me add
one more thing - is your power supply adequate?
I've been bitten by similar problems before, with
the µC constantly resetting itself. One trick I like
is to add a tiny routine to the beginning of every bit
of code during development to sound a piezo buzzer
when the code is executed. That way you can always
tell if you are resetting for any reason.

Nick
 

Re: pic16f84 problem?

Hello Try disable PORTB pull up's.

Best Regards

Alejandro
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top