F5HLA

 

[fr]

[en]

Flash info!!
PalmpProp is dead...welcome iProp (for iPhone) [HERE].
Introduction

+ Curriculum Vitae
+ Shack
+ Who are you?

Technic&leisure

+ iPhone
+ My sharewares
+ Electronic
+ Computer science
+ Ham radio
+ HLAPRS
+ Mathematic games

PhD thesis work

 Leitmotiv
 Short informations
 Publications
 Thesis

Webmaster - Infos
Write to Gilles Petit  Webmaster
Add to favourites  Favorites
Recommend this site to a friend  Recommend
mobile Version   mobile Version
Visits

   visitors

   visitors online

PIC - Datasheet

The purpuse of this little page is just to give basics about PIC 16F84 (or 16C84).

mnemonic

Instructions on registers ( octets )modified bits
ADDWF f,dd:=W+fC,DC,Z
ANDWF f,dd:=W AND fZ
CLRF ff:=0Z
CLRWW:=0Z
COMF f,d d:=NOT(f) Z
DECF f,dd:=f-1Z
DECFSZ f,dd:=f-1 ; Skip if Zero.
INCF f,dd:=f+1Z
INCFSZ f,dd:=f+1 ; Skip if Zero.
IORWF f,dd:=W OR fZ
MOVF f,dd:=f ( good test of f=0 while doing MOVF f,1 )z
MOVWF ff:=W.
NOPno operation.
RLF f,dd=f SHL 1 C
RRF f,dd=f SHR 1 C
SUBWF f,dd:= f-W (2 complement--> d:=f + not (W) +1 )C,DC,Z
SWAPF f,dd:= f[4..7] <--> f[0..3] .
XORWF f,dd:= W XOR fZ


mnemonicInstructions on registers ( bit per bit )modified bits
BCF f,bf[b]:=0 (put the b bit of f to 0).
BSF f,bf[b]:=1 (put the b bit of f to 1).
BTFSC f,btest bit b of f ; Skip if Clear ( 0 ).
BTFSS f,btest bit b of f ; Skip if Set ( 1 ).


mnemonicControl Instructionsmodified bits
ADDLW kW:=W+kC,DC,Z
ANDLW kW:=W AND kZ
CALL kcall a subprogram.
CLRWDTclear watchdog timerTO,PD
GOTO kjump to adress k.
IORLW kW:=W OR kZ
MOVLW kW:=k.
RETFIEreturn of an interruption.
RETLW kw:=k , and return of a sub program.
RETURNand return of a sub program.
SLEEPsleep mode and oscillator in off modeTO,PD
SUBLW kW:=k-WC,DC,Z
XORLW kW:=W XOR kZ

d can be 0 or 1. If d is 0, d is W, else if d is 1, d is f (the register on which we are working on).

I suggest to define W EQU 0 andF EQU 1 at the beggining of the program and to use W or F where to stock the result. If you use include files (P16F84.inc), those constants are already defined there.


The full datasheet of the pic16f84 is available [HERE].


Creation date : 06/12/2004 @ 04:00
Last update : 11/01/2005 @ 20:02
Category : Electronic
Page read 10724 times


Print preview Print preview     Print the page Print the page

Connection...

Nickname:

Password:

[ Password lost ? ]


[ Become a member ]



Users online


Ip: 3.141.192.219

Search




Poll
What's about CW (morse code)
 
Great, I practice every day !
Amaising, sometimes
I'd like to learn
Very old fashionned
Boring, wanna know why it is still in use
Results
Calendrier
World News
   up  Top  up  

"The needs of the many, outweigh the needs of the few", Capt. Spock

Site running with GuppY v4.0.3 - CeCILL free License - © 2004-2006
Contnts created and completed by F4HLA - Copyright Gilles Petit - © 1996-2228

Page loaded in 0.23 second