User`s manual

BL1600 System Development s 39
!
For normal data, pass the physical address of the data to the following
function.
char xxx[] = { 0, 0xFF, 0x08 };
...
WriteFlash( phy
_
adr(xxx), my
_
buffer, my
_
count );
RETURN VALUE:
0 if the operation was successful.
1 if no flash EPROM is present.
2 if a physical address is within the BIOS area (low 8K).
3 if a physical address is within the symbol table.
4 if the write times out.
The data must be initialized when it is declared, otherwise it will be
placed in RAM, not ROM, and this function will not work.
Writing to flash EPROM, in essence, treats the flash memory
as a nonvolatile memory. The flash EPROM is rated for
10,000 writes. In tests, the flash EPROM has lasted at least
100,000 writes. Nevertheless, there is a limit, after which the
flash EPROM will increasingly fail to accept a write.
Virtual Drivers
Z-World supports application development for the BL1600 in a variety of
ways. Some of this support stems from a virtual driver that monitors the
BL1600s ports and provides a set of virtual latches, timers, counters,
and function keys.
The virtual drivers are a software package that is activated by a periodic
interrupt (every 25 ms) and provides certain services to the application
programmer.
These services include the following.
Run real-time second and millisecond clocks
Scan the digital inputs and setting digital outputs
Provide any number of virtual watchdog timers
Provide clock drive for the optional real-time kernel
Provide up to 10 software timers
Support DelayMs and DelaySec for costatements.