Syntax, Example, Eeprom_memcpy( ) function – Echelon Neuron C User Manual
Page 99
Neuron C Reference Guide
79
Series 3100
Input Clock
Series 5000
System Clock
Delay (in microseconds)
625 kHz
—
9.6*((max(1,floor(count/16))*42)+206)
For example, for a Series 3100 device with a 10 MHz input clock, the formula
above yields durations in the range of 88.8 microseconds to 840 milliseconds by
increments of 25.2 microseconds. Using a count greater than 33,333 (for a Series
3100 device at 10 MHz) could cause the watchdog timer to time out. See also the
scaled_delay( ) function, which generates a delay that scales with the input clock.
Note: Because of the multiplier used by delay( ), and because the watchdog timer
timeout scales with the input clock (for Series 3100 devices), there is the
potential for a watchdog timeout at 20 MHz and 40 MHz operation. The
maximum inputs to delay( ) for Series 3100 devices are 16666 at 20 MHz and
8333 at 40 MHz. Timing intervals greater than the watchdog interval must be
done through software timers or through a user routine that calls delay( ) and
watchdog_update( ) in a loop. Also see msec_delay( ).
Syntax
void delay (unsigned long
count
);
count
A value between 1 and 33333. The formula for
determining the duration of the delay is based on the
count parameter and the input clock (see above).
Example
IO_4 input bit io_push_button;
boolean debounced_button_state;
when(io_changes(io_push_button))
{
delay(400); //delay approx. 10ms at any clock rate
debounced_button_state=(boolean)io_in(io_push_button);
}
eeprom_memcpy( )
Function
The eeprom_memcpy( ) function copies a block of
len
bytes from
src
to
dest
. It
does not return any value. This function supports destination addresses that
reside in EEPROM or flash memory, where the normal memcpy( ) function does
not. This function supports a maximum length of 255 bytes.
See also ansi_memcpy( ), ansi_memset( ), memccpy( ), memchr( ), memcmp( ),
memcpy( ), and memset( ).
Syntax
void eeprom_memcpy (void *
dest
, void *
src
, unsigned short
len
);