📄 readme.txt
字号:
****************************************************************************************************
ADSP-BF533 EZ-KIT Lite STDIO UART Example
Analog Devices, Inc.
DSP Division
Three Technology Way
Norwood, MA 02062
Date Created: 03/19/04
____________________________________________________________________________________________________
This directory contains an example ADSP-BF533 STDIO UART Project
This example illustrates registering a new STDIO Device Driver for UART I/O.
Along with redirecting Stdin/Stdout to new STDIO Device Driver for printf/scanf.
Files contained in this directory:
STDIO_UART.dpj VisualDSP++ project file
main.c Main C source file
stdio_uart.c Stdio uart functions
readme.txt This file
____________________________________________________________________________________________________
CONTENTS
I. FUNCTIONAL DESCRIPTION
II. IMPLEMENTATION DESCRIPTION
III. OPERATION DESCRIPTION
I. FUNCTIONAL DESCRIPTION
- A device driver is a set of primitive functions (open, close, read, write and seek) grouped together into
a DevEntry Structure. This structure is defined in device.h
- Alternative device drivers may be registered. This example illustrates registering a new STDIO Device Driver
for UART I/O and redirecting stdin/stdout/stderr.
II. IMPLEMENTATION DESCRIPTION
- The DevEntry Structure must be completely filled.
- The stdin, stdout and stderr are redirected to new device driver
- The low-level I/0 routines must be written. Else provide dummy code.
- The init() function is invoked when the device driver is registered. Therefore, the UART is initialized in the init().
- The new device driver DeviceID is set to "UART_DEVICEID", which is 2. If you already have a DeviceID set to 2,
you must increase setting.
III. OPERATION DESCRIPTION
- Open the project "STDIO_UART.dpj" in an ADSP-BF533 EZ-KIT Lite session in the VisualDSP Integrated
Development Environment (IDDE).
- Under the "Project" tab, select "Build Project" (program is then loaded automatically into DSP).
- Connect the EZ-KIT to the PC using a 1:1 EIA-232 serial cable.
- Invoke any terminal program, for example the Windows Hyperterminal. Choose 2400 bit rate.
8-bit, no parity format. Don't use any handshake, such as XON/XOFF software handshake
or RTS/CTS hardware handshake! Also make sure echo mode is off.
If using Hyperterminal this can be done by selecting Properties from the file menu and clicking
on the ASCII Setup button from the Settings tab.
- Once terminal connection is established, select "Run" from the "Debug" tab on the menu bar
of VisualDSP.
- See "Hello World" print to the terminal program.
- In the terminal program, type in something, press <Enter>. Your text will echo (print) backwards.
OPTION #1 - Changing default 2400 Baud Rate
- Open the project "STDIO_UART.dpj" in an ADSP-BF533 EZ-KIT Lite session in the VisualDSP Integrated
Development Environment (IDDE).
- Edit main.c. At the top of file, change the BaudRate setting to your new BaudRate (4800, 9600, etc)
and save file. (#define BAUDRATE 2400 )
- Under the "Project" tab, select "Build Project" (program is then loaded automatically into DSP).
- Invoke any terminal program, for example the Windows Hyperterminal. Choose your NEW bit rate.
8-bit, no parity format. Don't use any handshake, such as XON/XOFF software handshake
or RTS/CTS hardware handshake! Also make sure echo mode is off.
If using Hyperterminal this can be done by selecting Properties from the file menu and clicking
on the ASCII Setup button from the Settings tab.
- Once terminal connection is established, select "Run" from the "Debug" tab on the menu bar
of VisualDSP.
- See "Hello World" print to the terminal program.
- In the terminal program, type in something, press <Enter>. Your text will echo (print) backwards.
OPTION #2 - Automatic Baud Rate Detection
- Open the project "STDIO_UART.dpj" in an ADSP-BF533 EZ-KIT Lite session in the VisualDSP Integrated
Development Environment (IDDE).
- Edit main.c. At the top of file, change the BaudRate setting to 0 (zero) and save file.
(#define BAUDRATE 2400 ---> #define BAUDRATE 0 )
- Under the "Project" tab, select "Build Project" (program is then loaded automatically into DSP).
- Invoke any terminal program, for example the Windows Hyperterminal. Choose your NEW bit rate.
8-bit, no parity format. Don't use any handshake, such as XON/XOFF software handshake
or RTS/CTS hardware handshake! Also make sure echo mode is off.
If using Hyperterminal this can be done by selecting Properties from the file menu and clicking
on the ASCII Setup button from the Settings tab.
- Once terminal connection is established, select "Run" from the "Debug" tab on the menu bar
of VisualDSP.
- In the terminal program, Press the '@' key (ASCII 0x40) to start auto baud rate detection.
- See "Hello World" print to the terminal program.
- In the terminal program, type in something, press <Enter>. Your text will echo (print) backwards.
OPTION #3 - Changing to another BF EZ-KIT board other than ADSP-BF533 EZ-KIT
- Open the project "STDIO_UART.dpj" in your NEW ADSP-BFXXX EZ-KIT Lite session in the VisualDSP Integrated
Development Environment (IDDE).
- Edit main.c. At the top of file, change the CLKIN variable to your new board's CLKIN frequency.
and save file. (unsigned short CLKIN = 27;)
- Under the "Project" tab, select "Project Options". Change Processor to your NEW ADSP-BFXXX and hit OK.
- Under the "Project" tab, select "Build Project" (program is then loaded automatically into DSP).
- Invoke any terminal program, for example the Windows Hyperterminal. Choose your 2400 bit rate.
8-bit, no parity format. Don't use any handshake, such as XON/XOFF software handshake
or RTS/CTS hardware handshake! Also make sure echo mode is off.
If using Hyperterminal this can be done by selecting Properties from the file menu and clicking
on the ASCII Setup button from the Settings tab.
- Once terminal connection is established, select "Run" from the "Debug" tab on the menu bar
of VisualDSP.
- See "Hello World" print to the terminal program.
- In the terminal program, type in something, press <Enter>. Your text will echo (print) backwards.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -