MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 144

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 194
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 143
Programming PIC Microcontrollers in BASIC - mikroElektronika
Prototype
sub procedure OW_Write(dim byref PORT as byte, dim Pin as byte, dim par as
byte)
Description Writes one byte (<par>) via 1-wire bus
Example
OW_Write(PORTA, 5, $44)
5.2.18 Software I2C
BASIC provides routines which implement software I2C. These routines are hardware 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.
5.2.18.1 Soft_I2C_Config – Configure the I2C master mode
Prototype
sub procedure Soft_I2C_Config(dim byref Port as byte, const SDA,const SCL)
Description Configure the I2C master mode.
Parameter <Port> specifies port of MCU on which SDA and SCL pins will be located;
parameters <SCL> and <SDA> need to be in range 0..7 and cannot point at the same pin;
Example
Soft_I2C_Config(PORTD, 3, 4)
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (102 sur 112)05/11/2004 02:20:55
Vista de pagina 143
1 2 ... 139 140 141 142 143 144 145 146 147 148 149 ... 193 194

Comentarios a estos manuales

Sin comentarios