Mikroelektronika MIKROE-350 Datenbogen
SOFTWARE UART LIBRARY
The mikroBasic 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
351
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using Software
UART Library:
Description:
Example :
dim Soft_UART_Rx_Pin
as sbit sfr external
as sbit sfr external
Receive line.
dim Soft_UART_Rx_Pin
as sbit at PIND.B0
as sbit at PIND.B0
dim Soft_UART_Tx_Pin
as sbit sfr external
as sbit sfr external
Transmit line.
dim Soft_UART_Tx_Pin
as sbit at PORTD.B1
as sbit at PORTD.B1
dim
Soft_UART_Rx_Pin_Dire
ction
Soft_UART_Rx_Pin_Dire
ction
as sbit sfr
external
Direction of the Receive
pin.
pin.
dim
Soft_UART_Rx_Pin_Dire
ction
Soft_UART_Rx_Pin_Dire
ction
as sbit at
DDRD.B0
dim
Soft_UART_Tx_Pin_Dire
Soft_UART_Tx_Pin_Dire
ction
as sbit sfr
external
Direction of the Transmit
pin.
pin.
dim
Soft_UART_Tx_Pin_Dire
Soft_UART_Tx_Pin_Dire
ction
as sbit at
DDRD.B1