?? uart.txt
字號:
Library for Universal Asynchronous Receiver Transceiver: UART
#CR Copyright (c) 2003 Atmel
OVERVIEW
--------
This package provides low level routines to send and receive data with
the UART hardware controller of ATMEL C51 products.
This module can use a precomputed baudrate table (bdr.h) or an external
module to perform an autobaud.
<PRE>
Serial Byte Transmission framing
| _ _ _ ____ ____ ____ ____ ____ ____ ____ ____ ____ _ _ _
| \Start / D0 \/ D1 \/ D2 \/ D3 \/ D4 \/ D5 \/ D6 \/ D7 \/Stop
| \____/\____/\____/\____/\____/\____/\____/\____/\____/
* ex character 'U':
| _ _ _ ____ ____ ____ ____ ____ _ _ _
| \Start / \ / \ / \ / \ /Stop
| \____/ \____/ \____/ \____/ \____/
* ex character '0':
| _ _ _ __________ ____ _ _ _
| \Start / \ /Stop
| \____________________________/ \__________/
</PRE>
CONFIGURATION
-------------
<PRE>
The driver is configured with the following parameters:
1/ FOSC Frequency of crystal in kHz (required)
Standard crystals available:
* 32 // Fosc = 32.768 kHz
* 1000 // Fosc = 1000.000 kHz
* 1834 // Fosc = 1834.200 kHz
* 2000 // Fosc = 2000.000 kHz
* 2457 // Fosc = 2457.600 kHz
* 3000 // Fosc = 3000.000 kHz
* 3276 // Fosc = 3276.800 kHz
* 3579 // Fosc = 3579.545 kHz
* 3686 // Fosc = 3686.400 kHz
* 4000 // Fosc = 4000.000 kHz
* 4194 // Fosc = 4194.304 kHz
* 4433 // Fosc = 4433.619 kHz
* 4915 // Fosc = 4915.200 kHz
* 5000 // Fosc = 5000.000 kHz
* 6000 // Fosc = 6000.000 kHz
* 7372 // Fosc = 7372.800 kHz
* 8000 // Fosc = 8000.000 kHz
* 10000 // Fosc = 10000.000 kHz
* 11059 // Fosc = 11059.200 kHz
* 12000 // Fosc = 12000.000 kHz
* 14318 // Fosc = 14318.100 kHz
* 14745 // Fosc = 14745.600 kHz
* 16000 // Fosc = 16000.000 kHz
* 19660 // Fosc = 19660.800 kHz
* 20000 // Fosc = 20000.000 kHz
* 22118 // Fosc = 22118.400 kHz
* 24000 // Fosc = 24000.000 kHz
* 24000 // Fosc = 24000.140 kHz
* 30875 // Fosc = 30875.000 kHz
* 32000 // Fosc = 32000.000 kHz
* 40000 // Fosc = 40000.000 kHz
* 60000 // Fosc = 60000.000 kHz
2/ BAUDRATE Baudrate in bit per second used for serial transmission (required)
Standard baudrates available:
* AUTOBAUD or 0 for Autobaudrate Config (need external module autobaud)
* 110 // 110 bps Serial Speed
* 300 // 300 bps Serial Speed
* 1200 // 1200 bps Serial Speed
* 2400 // 2400 bps Serial Speed
* 4800 // 4800 bps Serial Speed
* 9600 // 9600 bps Serial Speed
* 19200 // 19200 bps Serial Speed
* 28800 // 28800 bps Serial Speed
* 38400 // 38400 bps Serial Speed
* 57600 // 57600 bps Serial Speed
* 115200 // 115200 bps Serial Speed
* 230400 // 230400 bps Serial Speed
* 460800 // 460800 bps Serial Speed
* 921600 // 921600 bps Serial Speed
3/ BDR_GENERATOR Peripheral used as baudrate generator (required)
* BRG_INTERNAL // To use Internal Baudrate Generator of the product
* BRG_TIMER1
* BRG_TIMER2
4/ DISABLE_VT100 (optional)
Define DISABLE_VT100 to disable VT100 control sequence for Hyperterminal: clearscreen, etc.
5/ LOGO_ATMEL (optional)
Define LOGO_ATMEL to enable ASCII art of Atmel logo.
Replace by a simple string if LOGO_ATMEL is not defined
|
| _____________________________
| /___ ________________________|
| ___ | | ________ ____ _
| / | | | | _ _ \ | __| | |
| / /| | | | | | | | | | | |__ | |
| / / | | | | | | | | | | | __| | |
| / /_ | | | | | | | | | | | |__ | |__
| /____||_| |_| |_| |_| |_| |____| |___/
| ___________________________________
| |__________________________________/ (R)
|
6/ ENABLE_SPLASH_SCREEN (optional)
Add function for splash-screen (first startup of program).
7/ X2_MODE (optional)
If the baudrate selected requires x2 mode and X2_MODE is not defined in config.h, an error occurs.
8/ UART_DEFAULT_INPUT (optional)
Redefines standard uart input functions as stdio input functions:
uart_getchar becomes getchar, ...
9/ UART_DEFAULT_OUTPUT (optional)
Redefines standard uart output functions as stdio output functions:
uart_putchar becomes putchar, ...
10/ UART_MINIMUM (optional)
Use minimum UART support (reduce code/data usage)
11/ UART_CONFIG (optional, default is MSK_UART_8BIT)
Define HW configuration of UART.
</PRE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -