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.

programming in pic16f877a using mplab

Status
Not open for further replies.

avantika

Newbie level 1
Joined
Mar 22, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
hii,
I m trying to write a program code to generate prime numbers using pic16f877a in mplab simulator.
And most important using indirect mode of addressing. Ill b happy if someone helps me with this. Thanks in advance.
 

CBLOCK 20h
REGA
REGB
REGC
REGD
ENDC


movlw REGA
movwf FSR

Now use any instruction on INDF and it will modify the contents of the register pointed by FSR.

To point to the next or previous register, use INCF/DECF FSR,F.

Hope this helps.

Cheers

Ravi
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top