17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Common Questions & Answers<br />

Why does the compiler show less RAM than there really is?<br />

Some devices make part of the RAM much more ineffective to access than the standard RAM.<br />

In particular, the 509, 57, 66, 67,76 and 77 devices have this problem.<br />

By default, the compiler will not automatically allocate variables to the problem RAM and,<br />

therefore, the RAM available will show a number smaller than expected.<br />

There are three ways to use this RAM:<br />

1. Use #BYTE or #BIT to allocate a variable in this RAM. Do NOT create a pointer to these<br />

variables.<br />

Example:<br />

#BYTE counter=0x30<br />

2. Use Read_Bank and Write_Bank to access the RAM like an array. This works well if you<br />

need to allocate an array in this RAM.<br />

Example:<br />

For(i=0;i

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

Saved successfully!

Ooh no, something went wrong!