12.07.2015 Views

PICAXE Manual Section 1 - TechnoPujades - Free

PICAXE Manual Section 1 - TechnoPujades - Free

PICAXE Manual Section 1 - TechnoPujades - Free

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.

www.picaxe.co.uk<strong>Section</strong> 1 50GETTING STARTED<strong>PICAXE</strong>-28X1 / 40X1 SFRpinsoutpinsptr@ptr@ptrinc@ptrdecflags= the input port when reading from the port= the output port when writing to the port= the scratchpad pointer= the scratchpad value pointed to by ptr= the scratchpad value pointed to by ptr (post increment)= the scratchpad value pointed to by ptr (post decrement)= system flagsWhen used on the left of an assignment ‘outpins’ applies to the ‘output’ port e.g.let outpins = %11000011will switch outputs 7,6,1,0 high and the others low.When used on the right of an assignment ‘pins’ applies to the input port e.g.let b1 = pinswill load b1 with the current state of the input port.The variable pins is broken down into individual bit variables for reading fromindividual inputs with an if...then command. Only valid input pins areimplemented.pins = pin7 : pin6 : pin5 : pin4 : pin3 : pin2 : pin1 : pin0The variable outpins is broken down into individual bit variables for writingoutputs directly. Only valid output pins are implemented.outpins = outpin7 : outpin6 : outpin5 : outpin4 :outpin3 : out pin2 : outpin1 : outpin0The scratchpad pointer variable is broken down into individual bit variables:ptr = ptr7 : ptr6 : ptr5 : ptr4 : ptr3 : ptr2 : ptr1 : ptr0See the ‘Variables - Scratchpad’ section for more information about@ptr, @ptrinc, @ptrdecThe system ‘flags’ byte is broken down into individual bit variables. If the specialhardware feature of the flag is not used in a program the individual flag may befreely used as a user defined bit flag.Name Special Special functionflag0 - reserved for future useflag1 - reserved for future useflag2 - reserved for future useflag3 - reserved for future useflag4 - reserved for future useflag5 hserflag hserial background receive has occurredflag6 hi2cflag hi2c write has occurred (slave mode)flag7 toflag timer overflow flagrevolution(c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.rev-ed.co.ukVersion 6.9 07/2009All rights reserved.50

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

Saved successfully!

Ooh no, something went wrong!