Abl-electronic PIC Microcontrollers PIC16 Manuel d'utilisateur Page 262

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 312
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 261
mikroC provides routines which implement software I²C. These routines are hard-
ware independent and can be used with any MCU. Software I2C enables you to
use MCU as Master in I2C communication. Multi-master mode is not supported.
Note: This library implements time-based activities, so interrupts need to be dis-
abled when using Soft I²C.
Soft_I2C_Config
Soft_I2C_Start
Soft_I2C_Read
Soft_I2C_Write
Soft_I2C_Stop
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
254
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Software I2C Library
Library Routines
Prototype
void Soft_I2C_Config(char *port, const char SDI, const char SD0,
const char SCK);
Description Configures software I²C. Parameter port specifies port of MCU on which SDA and SCL
pins are located. Parameters SCL and SDA need to be in range 0–7 and cannot point at
the same pin.
Soft_I2C_Config needs to be called before using other functions from Soft I2C
Library.
Example
Soft_I2C_Config(PORTB, 1, 2);
Soft_I2C_Config
Vue de la page 261
1 2 ... 257 258 259 260 261 262 263 264 265 266 267 ... 311 312

Commentaires sur ces manuels

Pas de commentaire