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 46GETTING STARTEDStorage Variables.Storage variables are additional memory locations allocated for temporary storageof byte data. They cannot be used in mathematical calculations, but can be usedto temporarily store byte values by use of the peek and poke commands.The number of available storage locations varies depending on <strong>PICAXE</strong> type. Thefollowing table gives the number of available byte variables with their addresses.These addresses vary according to technical specifications of the microcontroller.See the poke and peek command descriptions for more information.<strong>PICAXE</strong>-08 none<strong>PICAXE</strong>-08M 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-14M 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-18 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-18A/18M 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-18X 96 80 to 127 ($50 to $7F), 192 to 239 ($C0 to $EF)<strong>PICAXE</strong>-20M 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-20X2 72 56 to 127 ($38 to $7F)<strong>PICAXE</strong>-28A 48 80 to 127 ($50 to $7F)<strong>PICAXE</strong>-28X 112 80 to 127 ($50 to $7F), 192 to 255 ($C0 to $FF)<strong>PICAXE</strong>-28X1 95 80 to 126 ($50 to $7E), 192 to 239 ($C0 to $EF)<strong>PICAXE</strong>-28X2 200 56 to 255 ($38 to $FF)<strong>PICAXE</strong>-40X 112 80 to 127 ($50 to $7F), 192 to 255 ($C0 to $FF)<strong>PICAXE</strong>-40X1 95 80 to 126 ($50 to $7E), 192 to 239 ($C0 to $EF)<strong>PICAXE</strong>-40X2 200 56 to 255 ($38 to $FF)Scratchpad<strong>PICAXE</strong>-20X2 128 0 to 127 ($00 to $7F)<strong>PICAXE</strong>-28X1 128 0 to 127 ($00 to $7F)<strong>PICAXE</strong>-28X2 1024 0 to 1023 ($00 to $3FF)<strong>PICAXE</strong>-40X1 128 0 to 127 ($00 to $7F)<strong>PICAXE</strong>-40X2 1024 0 to 1023 ($00 to $3FF)Special Function Variables (SFR)The special function variables available for use depend on the <strong>PICAXE</strong> type.<strong>PICAXE</strong>-08 / 08M SFRpins = the input / output portdirs = the data direction register (sets whether pins are inputs or outputs)infra = another term for variable b13, used within the infrain2 commandThe variable pins is broken down into individual bit variables for reading fromindividual inputs with an if...then command. Only valid input pins areimplemented.pins= x : x : x : pin4 : pin3 : pin2 : pin1 : xThe variable dirs is also broken down into individual bits.Only valid bi-directional pin configuration bits are implemented.dirs= x : x : x : dir4 : x : dir2 : dir1 : xrevolution(c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.rev-ed.co.ukVersion 6.9 07/2009All rights reserved.46

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

Saved successfully!

Ooh no, something went wrong!