04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

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

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

WRITE<br />

<strong>Syntax</strong><br />

write address, data<br />

• Address - address of EEPROM to store data<br />

Commands<br />

• Data - is a byte value that will be written to the address specifi ed. It can be an expression,<br />

constant or variable.<br />

Supported<br />

• BA - Supported<br />

• BAN - Supported<br />

• BAP - Supported<br />

• BAP40 - Supported<br />

Description<br />

All modules except the <strong>Basic</strong>ATOM Pro 24 come with built in EEPROM. The READ / WRITE<br />

commands were created to access the built-in memory. WRITE will write a signal byte to the built-in<br />

EEPROM at the address specifi ed in the command.<br />

Notes<br />

1. The AtomPro24 does not have built-in EEPROM. An external 32kbit or larger EEPROM can be<br />

added. Connect the EEPROM SCL pin to P10 and the EEPROM SDA pin to P11. A 10k ohm pull<br />

up resistor is required on P11. Ground the EEPROM A0,A1 and A2 address pins.<br />

Example<br />

The example program will write the string “Hello” starting at the fi rst location to the built-in memory.<br />

Next, it will read built-in memory locations 0 through 10 and print the contents to the terminal window.<br />

index var byte<br />

char var byte<br />

write 0,”H”<br />

write 1,”e”<br />

write 2,”l”<br />

write 3,”l”<br />

write 4,”o”<br />

for index = 0 to 10<br />

read index,char<br />

serout s_out,i9600,[char]<br />

next<br />

end<br />

203

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

Saved successfully!

Ooh no, something went wrong!