11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PICBASIC</strong> <strong>PLUS</strong> CompilerMemory ManipulationMost of the PIC microcontrollers have a rather complex system of PAGE and BANKconfigurations. To make life a little easier, the compiler has built in mnemonics that allowany register to be read and written, regardless of which bank it’s in or which pagethe PIC happens to be in at the time. They also allow BIT and WORD registers (variables)to be manipulated. These are outlined below: -WREG_BYTELoad an 8-bit (BYTE) register with the contents of the WREG.Use:WREG_BYTE VAR1WREG_BITLoad a BIT of a an 8-bit (BYTE) register with the contents of the WREG. If the WREGholds a value larger than 1, then the bit will be set.Use:WREG_BIT VAR1 , BIT1WREG_WORDLoad a 16-bit (WORD) register with the contents of the WREG.Use:WREG_WORD WRD1BYTE_WREGLoad the WREG with the contents of an 8-bit (BYTE) register.Use:BYTE_WREG VAR1BYTE_BYTELoad an 8-bit (BYTE) register with the contents of another 8-bit (BYTE) register.Use:BYTE_BYTE VAR1 , VAR2BYTE_BITLoad the contents of an 8-bit (BYTE) register into the BIT of another 8-bit (BYTE) register.If the register holds a value larger than 1, then the bit will be set.Use:BYTE_BIT VAR1, VAR2 , BIT1BYTE_WORDLoad a 16-bit (WORD) register with the contents of an 8-bit (BYTE) register.Use:BYTE_WORD VAR1 , WRD1NUM_WREGLoad a constant (NUMBER) into the WREG.Use: NUM_WREG 23138Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!