MikroElektronika PIC Microcontrollers PIC16 Fiche technique Page 99

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 194
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 98
Programming PIC Microcontrollers in BASIC - mikroElektronika
Description Performs repeated start condition.
Example
I2C_Repeated_Start
5.2.8.4 I2C_Rd – Receives byte from slave
Prototype
sub function I2C_Rd(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
Data = I2C_Rd(1) ' read data w/ acknowledge
5.2.8.5 I2C_Wr – Sends data byte via I2C bus
Prototype
sub function I2C_Wr(dim Data as byte) as byte
Description After you have issued a start or repeated start you can send <Data> byte via I2C bus. The function returns 0 if
there are no errors.
Example
I2C_Wr($A2) ' send byte via I2C(command to 24cO2)
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (57 sur 112)05/11/2004 02:20:52
Vue de la page 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 193 194

Commentaires sur ces manuels

Pas de commentaire