Download C Compiler User Manual

Transcript
Built-In Functions
}
read_adc(ADC_START_ONLY);
sleep();
value=read_adc(ADC_READ_ONLY);
Example Files:
ex_admm.c, ex_14kad.c
Also See:
setup_adc(),
#DEVICE
set_adc_channel(),
setup_adc_ports(),
READ_BANK( )
Syntax:
value = read_bank (bank, offset)
Parameters:
bank is the physical RAM bank 1-3 (depending on the
device), offset is the offset into user RAM for that bank
(starts at 0),
Returns:
8 bit int
Function:
Read a data byte from the user RAM area of the
specified memory bank. This function may be used on
some devices where full RAM access by auto variables
is not efficient. For example on the PIC16C57 chip
setting the pointer size to 5 bits will generate the most
efficient ROM code however auto variables can not be
above 1Fh. Instead of going to 8 bit pointers you can
save ROM by using this function to write to the hard to
reach banks. In this case the bank may be 1-3 and the
offset may be 0-15.
Availability:
All devices but only useful on PCB parts with memory
over 1Fh and PCM parts with memory over FFh.
Requires
Nothing
Examples:
// See write_bank example to see
// how we got the data
// Moves data from buffer to LCD
i=0;
131