Datasheet

Programming PIC Microcontrollers in BASIC - mikroElektronika
Prototype sub function Soft_I2C_Read(dim Ack as byte) as byte
Description Receives 1 byte from slave and sends not acknowledge signal if <Ack> is 0; otherwise, it sends acknowledge.
Example
EE_data = Soft_I2C_Read(0)
5.2.18.5 Soft_I2C_Stop – Issues STOP condition
Prototype
sub procedure Soft_I2C_Stop
Description Issues STOP condition.
Example
Soft_I2C_Stop
5.2.19 Software SPI Library
BASIC provides routines which implement software SPI. These routines are hardware independent and can be used with any
MCU. You can easily communicate with other devices via SPI - A/D converters, D/A converters, MAX7219, LTC1290 etc.
Simply use the following functions and procedures.
5.2.19.1 Soft_SPI_Config – Configure MCU for SPI communication
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (104 sur 112)05/11/2004 02:20:55