Microchip pic Assembly

by 16:55 0 comments
This is small article about how to use microchip pic assembly ..

Write Assembly code in picc editor:

You can do that easy by type
#asm
    asm code here
#endasm

Basic instructions:


*BSF REG,PIN >> set pin PIN in register REG to 1

*BCF REG,PIN >> clear pin PIN in register REG to 0

*MOVLW VALUE >> put value VALUE in register W

*MOVWF REG >> put value of W register into register REG

*BTFSS REG,PIN >> if pin PIN in register REG is 1 skip next instruction

*BTFSC REG,PIN >> if pin PIN in register REG is 0 skip next instruction

*GOTO LABEL >> move to line named LABEL

*ADDWF VALUE,REG >> add VALUE to register REG

Now you can go throw the datasheet and try every thing and deep your knowledge about it.

Ammar Atef

Blog Creator

Always work and you will be happy, Writing code, designing system and learning some thing new, I call that real life, No matter what is the problem, humanity can solve it any way, Creative one who believes he is creative, Who really watch, think, try and success, World is watching us because we are engineers.

0 comments:

Post a Comment