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 making portC=ff in pic16f876

Status
Not open for further replies.

suwaii

Member level 4
Joined
Jan 21, 2006
Messages
68
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,830
i try to programme pic16f876 and i successful by using IC-PROG
to make portC=ff then when i remove the pic from programmer and connect the pic with +5V and RC oslliatorand MCLR=5V i do not get anything
and this is the code:

LIST p=16f876, R=DEC
#include "p16f876.inc"
org 0x00
bsf STATUS,RP0
movlw 0x00
movwf TRISC
bcf STATUS,RP0
movlw 0x0F
movwf PORTC
circle goto circle
end



then the problem come from where from code or from

the circuit likr RC osillator ...please help me to make portC=ff
 

pic16f875-i/p

Hi suwaii

I cannot find any data on the PIC you are using - did you mean 16F785?
Oh .. no ...
I see in your post you mean the 16F876

The Interupt Vector of the 16F876 is at 0x004
You may not put normal code here.
Try this code:
Code:
LIST p=16f876, R=DEC
#include "p16f876.inc"
     org 0x000
     goto INIT
     org 0x004
IntVec
     retfie
     org 0x010
INIT
     bsf STATUS,RP0
     movlw 0x00
     movwf TRISC
     bcf STATUS,RP0
     movlw 0x0F
     movwf PORTC
circle goto circle
end

hope this helps ... Polymath
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top