MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 138

  • 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 137
Programming PIC Microcontrollers in BASIC - mikroElektronika
<Low_To_High> determines transmit edge for data:
LOW_2_HIGH : data transmit on low to high edge
HIGH_2_LOW : data transmit on high to low edge
Example
SPI_Init_Advanced(Master_OSC_div4, Data_SAMPLE_MIDDLE, CLK_Idle_LOW,
LOW_2_HIGH)
' This will set SPI to:
' master mode,
' clock = Fosc/4,
' data sampled at the middle of interval,
' clock idle state low,
' data transmitted at low to high edge.
5.2.15.3 SPI_Read – Reads the received data
Prototype sub function 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 (96 sur 112)05/11/2004 02:20:55
Vista de pagina 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 193 194

Comentarios a estos manuales

Sin comentarios