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 regarding pic programming and burning.

Status
Not open for further replies.

samarth123

Newbie level 6
Joined
Feb 13, 2010
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,371
hi i am mtech student. i tried to burn the the following program into pic using ezpic software during the burning process the led in the burner goes red and when i use the pic in the board it didnt work properly. i have tried to use pic16f873 simply to use as a 4bit remote control by initialising 4bits of the portb as input and other 4 bits as output. is there any problem in program??
here is the program

list p=16f873
include <p16f873.inc>
status equ 03h
portb equ 06h
trisb equ 86h
org 0x00
start
bcf status,6
bsf status,5
movlw 0fh
movwf trisb
bcf status,5
clrf portb
fir
btfss portb,0
goto sec
goto sw1
sec
btfss portb,1
goto thir
goto sw2
thir
btfss portb,2
goto fore
goto sw3
fore
btfss portb,3
goto fir
goto sw4
sw1
btfss portb,4
goto on_1
bcf portb,4
goto fir
on_1
bsf portb,4
goto fir
sw2
btfss portb,5
goto on_2
bcf portb,5
goto fir
on_2
bsf portb,5
goto fir
sw3
btfss portb,6
goto on_3
bcf portb,6
goto fir
on_3
bsf portb,6
goto fir
sw4
btfss portb,7
goto on_4
bcf portb,7
goto fir
on_4
bsf portb,7
goto fir
goto start
end
 

Attachments

  • 4 bit remote.txt
    742 bytes · Views: 52

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top