Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
UARTx_Init
478
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure UARTx_Init(baud_rate: longint);
Returns
Nothing.
Description
Configures and initializes the UART module.
The internal UART module module is set to: 
- receiver enabled 
- transmitter enabled 
- frame size 8 bits 
- 1 STOP bit 
- parity mode disabled 
- asynchronous operation 
Parameters : 
baud_rate
: requested baud rate 
Refer to the device data sheet for baud rates allowed for specific Fosc.
Requires
You'll need AVR MCU with hardware UART.
UARTx_Init needs to be called before using other functions from UART Library.
Example
This will initialize hardware UART1 module and establish the communication at
2400 bps:
UART1_Init(2400);