MikroElektronika PIC Microcontrollers PIC16 Datový list Strana 149

  • 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 148
Programming PIC Microcontrollers in BASIC - mikroElektronika
Prototype
sub procedure Soft_UART_Init(dim byref Port as byte, const RX, const TX,
const Baud_Rate)
Description Initializes PIC MCU UART at specified pins establishes communication at <Baud_Rate>.
If you specify the unsupported baud rate, compiler will report an error.
Example
Soft_UART_Init(PORTB, 1, 2, 9600)
5.2.20.2 Soft_UART_Read – Receives a byte
Prototype sub function Soft_UART_Read(dim byref Msg_received as byte) as byte
Description Function returns a received byte. Parameter <Msg_received> will take true if transfer was succesful.
Soft_UART_Read is a non-blocking function call, so you should test <Msg_received> manually (check the
example below).
Example
Received_byte = Soft_UART_Read(Rec_ok)
5.2.20.4 Soft_UART_Write – Transmits a byte
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (107 sur 112)05/11/2004 02:20:55
Zobrazit stránku 148
1 2 ... 144 145 146 147 148 149 150 151 152 153 154 ... 193 194

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

Žádné komentáře