Datasheet
SOFTWARE UART LIBRARY
The mikroC PRO for AVR provides routines for implementing Software UART com-
munication. 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.
External dependencies of Software UART Library
Library Routines
- Soft_UART_Init
- Soft_UART_Read
- Soft_UART_Write
- Soft_UART_Break
415
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using Software
UART Library:
Description: Example :
extern sfr sbit
Soft_UART_Rx_Pin;
Receive line.
sbit Soft_UART_Rx_Pin
at PIND.B0;
extern sfr sbit
Soft_UART_Tx_Pin;
Transmit line.
sbit Soft_UART_Tx_Pin
at PORTD.B1;
extern sfr sbit
Soft_UART_Rx_Pin_Dire
ction;
Direction of the Receive
pin.
sbit
Soft_UART_Rx_Pin_Dire
ction at DDRD.B0;
extern sfr sbit
Soft_UART_Tx_Pin_Dire
ction;
Direction of the Transmit
pin.
sbit
Soft_UART_Tx_Pin_Dire
ction at DDRD.B1;