MikroElektronika PIC Microcontrollers PIC16 Datový list Strana 136

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 194
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 135
Programming PIC Microcontrollers in BASIC - mikroElektronika
5.2.15 SPI Library
SPI (Serial Peripheral Interface) module is available with a number of PIC MCU models. You can easily communicate with other
devices via SPI - A/D converters, D/A converters, MAX7219, LTC1290 etc. You need PIC MCU with hardware integrated SPI
(for example, PIC16F877). Then, simply use the following functions and procedures.
5.2.15.1 SPI_Init – Standard initialization of SPI
Prototype sub procedure SPI_Init
Description Routine initializes SPI with default parameters:
Master mode,
clock Fosc/4,
clock idle state low,
data transmitted on low to high edge,
input data sampled at the middle of interval.
Example
SPI_Init
5.2.15.2 SPI_Init_Advanced – does smt
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (94 sur 112)05/11/2004 02:20:55
Zobrazit stránku 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 193 194

Komentáře k této Příručce

Žádné komentáře