Picaxe manual2

Page 1

BASIC COMMANDS

www.picaxe.com Section 2

1

Contents Introduction. ................................................................................................... 4 PICAXE Software ............................................................................................... 4 Labels ............................................................................................................ 5 Comments ....................................................................................................... 5 Constants ........................................................................................................ 6 Symbols .......................................................................................................... 6 Directives ....................................................................................................... 7 Variables - General ......................................................................................... 10 Variables - Storage ......................................................................................... 11 Variables - Scratchpad .................................................................................... 12 Variables - System .......................................................................................... 13 Variables - Special function ............................................................................. 14 Variables - Mathematics .................................................................................. 22 Variables - Unary Mathematics ......................................................................... 25 Input / Output Pin Naming Conventions ........................................................... 27 adcconfig ...................................................................................................... 28 adcsetup ....................................................................................................... 29 backward ...................................................................................................... 34 bcdtoascii ..................................................................................................... 35 bintoascii ..................................................................................................... 36 booti2c ........................................................................................................ 37 branch .......................................................................................................... 39 button .......................................................................................................... 40 calibadc (calibadc10) ..................................................................................... 42 calibfreq ....................................................................................................... 43 clearbit ......................................................................................................... 44 compsetup .................................................................................................... 45 count ........................................................................................................... 50 daclevel ........................................................................................................ 51 dacsetup ....................................................................................................... 52 debug ........................................................................................................... 54 dec ............................................................................................................. 55 disablebod .................................................................................................... 56 disabletime ................................................................................................... 57 disconnect .................................................................................................... 58 do...loop ...................................................................................................... 59 doze ............................................................................................................. 60 eeprom (data) ............................................................................................... 61 enablebod ..................................................................................................... 62 enabletime .................................................................................................... 63 end ............................................................................................................. 64 exit ............................................................................................................. 65 for...next ...................................................................................................... 66 forward ......................................................................................................... 67 fvrsetup ........................................................................................................ 68 get ............................................................................................................. 69 gosub (call) .................................................................................................. 70 goto ............................................................................................................. 71 hi2cin .......................................................................................................... 72 hi2cout ........................................................................................................ 74 hi2csetup ..................................................................................................... 76 hi2csetup - slave mode (X2 parts only) ............................................................. 76 hi2csetup - master mode ................................................................................. 78 halt ............................................................................................................. 80 hibernate ...................................................................................................... 81 high ............................................................................................................. 83 high portc ..................................................................................................... 84 hintsetup ...................................................................................................... 85 hpwm ........................................................................................................... 86

revolution

(c) Revolution Education Ltd. All rights reserved.

Web: www.picaxe.com Version 7.9 02/2012

1


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.