MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 147

  • 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 146
Programming PIC Microcontrollers in BASIC - mikroElektronika
Prototype
sub procedure Soft_SPI_Config(dim byref Port as byte, const SDI, const
SD0, const SCK)
Description Routine configures and initializes software SPI with the following defaults:
Set MCU to master mode,
Clock = 50kHz,
Data sampled at the middle of interval,
Clock idle state low
Data transmitted at low to high edge.
SDI pin, SDO pin, and SCK pin are specified by the appropriate parameters.
Example
Soft_SPI_Config(PORTB, 1, 2, 3)
' SDI pin is RB1, SDO pin is RB2, and SCK pin is RB3.
5.2.19.2 Soft_SPI_Read – Reads the received data
Prototype sub function Soft_SPI_read(dim Buffer as byte) as byte
Description Routine provides clock by sending <Buffer> and reads the received data at the end of the period.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (105 sur 112)05/11/2004 02:20:55
Vista de pagina 146
1 2 ... 142 143 144 145 146 147 148 149 150 151 152 ... 193 194

Comentarios a estos manuales

Sin comentarios