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.

I have a problem with pic16f84a plz help??????????!!!!!!!!!!

Status
Not open for further replies.

salem_eng1

Member level 2
Joined
Dec 7, 2006
Messages
43
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,288
Location
Egypt
Activity points
1,606
I have a problem with pic16f84a that
when I am burning any progrem it gives me success burning and the Mc doesn't work right its output is all zeros all the time independent on the input I tried a simple code to check if the Mc is working or not the program is to out ones all the time to prortB but also it doesn't work
the code is:

#include <p16f84a.inc>
org 0
goto main
org 0x10
main
bsf status,rp0
clrf portb
bcf status,rp0
movlw 0x7f
movwf portb
goto main
end

After that I changed the chip 3 time
And also I change the burner 2 time

The output is the same in all different cases :cry: (all the pins is zero except VDD MCLR')

I am using Mplab & winpic
I asked here can I change the computer or that it is a silly question??

Plz could any one help ???
 

Re: I have a problem with pic16f84a plz help??????????!!!!!!

your controller is in reset state which all the ports are in 0 state.i dont see that u used the TRISB register. configure portb as output by using the instructions:
clr TRISB

by the way u wont see the change unless u r using scope.i can advise u to connect led to one output and serial 500 ohm resistor, and to delete the clr portb instruction.

hope it helps

avi.
 

    salem_eng1

    Points: 2
    Helpful Answer Positive Rating
Re: I have a problem with pic16f84a plz help??????????!!!!!!

Looks like you need to configure youre ports with TRISA & TRISB Get the data sheet for the 16F84A and it will show you how....
 

Re: I have a problem with pic16f84a plz help??????????!!!!!!

It works avi

That is my fault all the time I forget some thing in the code (we are a human) :D
 

Re: I have a problem with pic16f84a plz help??????????!!!!!!

i think u should make use of these:

Bank1
movlw b'00000000';
movwf TRISB
movlw b'00000000'
movwf TRISA

BANK0
clrf PORTA
clrf PORTB

my advice is to put this part of code in a macro and include it in ur program,
it is boring to write it every time.

hope u do good
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top