Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
5.2.7.2 Flash_Write – Writes data to microcontroller Flash memory
Prototype
sub procedure Flash_Write(dim Address as longint, dim byref Data as byte
[64]) ' for PIC18
sub procedure Flash_Write(dim Address as word, dim Data as word) ' for 
PIC16 
Description Procedure writes chunk of data to Flash memory (for PIC18, data needs to exactly 64 bytes in size). Keep in 
mind that this function erases target memory before writing <Data> to it. This means that if write was 
unsuccessful, your previous data will be lost.
Example
for i = 0 to 63 ' initialize array
 toWrite[i] = i
next i
Flash_Write($0D00, toWrite) ' write contents of the array to the address 
0x0D00
5.2.8 I2C Library
I2C interface is serial interface used for communicating with peripheral or other microcontroller devices. Routines below are 
intended for PIC MCUs with MSSP module. By using these, you can configure and use PIC MCU as master in I2C communication.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (55 sur 112)05/11/2004 02:20:52










