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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.picaxe.co.uk<strong>Section</strong> 1 44GETTING STARTEDUnderstanding the <strong>PICAXE</strong> memory.The <strong>PICAXE</strong> memory consists of three different areas. The amount of memoryvaries between <strong>PICAXE</strong> types.Program Memory.Program memory is where the program is stored after a new download. This is‘FLASH’ rewritable memory that can be reprogrammed up to (typically) 100,000times. The program is not lost when power is removed, so the program will startrunning again as soon as the power is reconnected.It is not generally required to erase a program, as each download automaticallyover-writes the whole of the last program. However if you want to stop a programrunning you can use the <strong>PICAXE</strong>>Clear Hardware Memory menu to download an‘empty’ program into the <strong>PICAXE</strong>.On standard <strong>PICAXE</strong> chips (X, X1) you can download around 600/1000 lines ofBASIC code. On A or M revision parts you can download around 80 lines and oneducational parts around 40 lines. X2 parts support up to 4 programs of 1000lines. Note these values are approximate as different commands require differentamounts of memory space. To check your memory usage use the <strong>PICAXE</strong>>CheckSyntax menu option.On X1 and X2 parts 256 bytes of the program memory can also be ‘reserved’ as alookup table (e.g. for LCD messages). See the table / readtable commands in part2 of the manual for more details.Data MemoryData memory is additional storage space within the microcontroller. The data isalso not lost when power is removed. Each download resets all data bytes to 0,unless the EEPROM command has been used to ‘preload’ data into the datamemory. See the EEPROM, read and write command descriptions for moredetails.On the <strong>PICAXE</strong>-08 / 08M / 14M / 20M / 18 / 18M the data memory is ‘shared’with the program memory Therefore larger programs will result is a smalleravailable data memory area.On all other <strong>PICAXE</strong> chips the data and program memory are completelyseparate.RAM (Variables)The RAM memory is used to store temporary data in variables as the programruns. It loses all data when the power is removed. There are four types of variable- general purpose, storage, scratchpad and special function.Variables are memory locations within the <strong>PICAXE</strong> microcontroller that storedata whilst the program is running. All this information is lost when themicrocontroller is reset.For information about variable mathematics see the ‘let’ command informationin part 2 of the manual.revolution(c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.rev-ed.co.ukVersion 6.9 07/2009All rights reserved.44

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

Saved successfully!

Ooh no, something went wrong!