Mikroelektronika MIKROE-742 데이터 시트
SOFTWARE UART LIBRARY
The mikroPascal PRO for AVR provides routines for implementing Software UART
communication. These routines are hardware independent and can be used with
any MCU. The Software UART Library provides easy communication with other
devices via the RS232 protocol.
communication. These routines are hardware independent and can be used with
any MCU. The Software UART Library provides easy communication with other
devices via the RS232 protocol.
Note: The Software UART library implements time-based activities, so interrupts
need to be disabled when using it.
need to be disabled when using it.
External dependencies of Software UART Library
Library Routines
- Soft_UART_Init
- Soft_UART_Read
- Soft_UART_Write
- Soft_UART_Break
- Soft_UART_Read
- Soft_UART_Write
- Soft_UART_Break
364
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using Software
UART Library:
Description:
Example :
var Soft_UART_Rx_Pin :
sbit; sfr; external;
sbit; sfr; external;
Receive line.
var Soft_UART_Rx_Pin
:
:
sbit at PIND.B0;
var Soft_UART_Tx_Pin :
sbit; sfr; external;
sbit; sfr; external;
Transmit line.
var Soft_UART_Tx_Pin
:
:
sbit at PORTD.B1;
var
Soft_UART_Rx_Pin_Dire
Soft_UART_Rx_Pin_Dire
ction :
sbit; sfr;
external;
Direction of the Receive pin.
var
Soft_UART_Rx_Pin_Dire
Soft_UART_Rx_Pin_Dire
ction :
sbit at
DDRD.B0;
var
Soft_UART_Tx_Pin_Dire
Soft_UART_Tx_Pin_Dire
ction :
sbit; sfr;
external;
Direction of the Transmit pin.
var
Soft_UART_Tx_Pin_Dire
Soft_UART_Tx_Pin_Dire
ction :
sbit at
DDRD.B1;