AT91EBxx

所属分类:单片机开发
开发工具:C/C++
文件大小:23KB
下载次数:34
上传日期:2005-11-20 17:01:02
上 传 者yuanliyan
说明:  四个独立按键的程序,可以控制八个灯循环亮
(four independent buttons procedures can control lights cycle-8)

文件列表:
AT91EBxx\at91.c (12256, 2003-07-12)
AT91EBxx\at91.h (411, 2003-07-12)
AT91EBxx\at91_cstartup.s79 (14421, 2003-07-12)
AT91EBxx\at91_ebxx.ewd (14325, 2003-07-12)
AT91EBxx\at91_ebxx.ewp (35219, 2003-07-12)
AT91EBxx\at91_ebxx.eww (146, 2003-07-12)
AT91EBxx\at91_lnk_flash.xcl (8507, 2003-07-12)
AT91EBxx\at91_lnk_ram.xcl (8622, 2003-07-12)
AT91EBxx\at91_low_level_init.c (2160, 2003-07-12)
AT91EBxx\at91_startup.mac (566, 2003-07-12)
AT91EBxx\button.c (1770, 2003-07-12)
AT91EBxx\button.h (347, 2003-07-12)
AT91EBxx\config.h (2590, 2003-07-12)
AT91EBxx\main.c (2054, 2003-07-12)
AT91EBxx\settings (0, 2005-10-21)
AT91EBxx\timer.c (645, 2003-07-12)
AT91EBxx\timer.h (88, 2003-07-12)
AT91EBxx\uart.c (1176, 2003-07-12)
AT91EBxx\uart.h (192, 2003-07-12)
AT91EBxx (0, 2005-10-21)

######################################################################## # # at91_ebxx.eww # # $Revision: 1.9 $ # ######################################################################## DESCRIPTION =========== This example project shows how to use the IAR Embedded Workbench for ARM to develop code for the Atmel AT91 evaluation boards. It shows basic use of parallel I/O, serial port, timer and the interrupt controller. It starts by showing two patterns on the LED's separated by one second. After another second the LED's continuously displays a moving pattern. The speed of the moving pattern can be controlled by the SW1 and SW2 buttons (SW3 and SW4 on AT91EB40). Serial port A is configured at 38400 baud, 8-bits, no parity and one stop bit. The program repeatedly sends a string on the TX line. If a character is received on the RX line, the LED moving pattern is disabled for two seconds and the characters ascii code is displayed. In addition the received character is displayed in the TX string. The serial port part of the application is disabled in Angel mode since Angel uses port A as the debug channel. COMPATIBILITY ============= The project is compatible with the AT91EB40, AT91EB40A, AT91EB42, AT91EB55 and AT91EB63 boards. The display capability is limited on the AT91EB40 board since it only has three LED's. The project is by default configured to use the Angel debug monitor. Note that the maximum serial port speed for Angel communication supported by the Atmel AT91 evaluation boards is 38400 baud. GETTING STARTED =============== Start the IAR Embedded Workbench for ARM. Select File->Open Workspace... Open the workspace file ...\IAR Systems\Embedded Workbench 3.2\ARM\src\examples\Atmel\AT91EBxx\at91_ebxx.eww ANGEL ===== The default setup builds the application for download using the Angel ROM monitor protocol. Make sure the project target is ramcode (not flashcode), this is default. Build the project. Connect a serial cable between the PC and port A on the AT91 board. Also check that Angel is activated on the board; jumper JP1 in STD position (not USER position), see the board documentation for details. On EB40 there is a switch instead of JP1, set the switch the LOWER MEM position. Start the debugger. JTAG ==== Edit config.h and disable Angel with #define ANGEL 0 Make sure the project target is ramcode (not flashcode), this is default. Build the project. Select Project->Options... In the category field select C-SPY. In the setup tab set driver to Macraigor or RDI depending on your JTAG hardware. Start the debugger. CONFIGURATION ============= Edit config.h to match your AT91 evaluation board, the default setting is for the AT91EB55 board. The AT91EB40A board also requires a change in the linker configuration file (.xcl) that is used. Open the xcl file and search for AT91EB40A to get more details. The project uses a modified version of cstartup (at91_cstartup.s79). The difference from the standard cstartup is the added code to perform the AT91 memory controller remap command. A remap command is necessary after a hardware reset of the AT91. The low_level_init (at91_low_level_init.c) initializes peripheral functions that must be avaiable before main() is executed. Two targets are configured in the project; ramcode and flashcode: - Ramcode uses the linker configuration file at91_lnk_ram.xcl, vectors are located at 0x00-0x1f, code at 0x2000000-0x200ffff and data at 0x2010000-0x201ffff. The ramcode target is setup to use a JTAG interface to download the code into RAM. The ramcode target have been verified on all supported targets. - Flashcode uses the linker configuration file at91_lnk_flash.xcl, vectors and code is located at 0x0000-0x7fff. After remap the vectors are located at 0x00-0x1f, code at 0x1000100-0x1007fff and data at 0x2000000-0x200ffff. Flashing requires a separate program to program the intel-hex file flashcode\exe\at91_ebxx.a79 into flash memory. The flashcode target have only been verified on the AT91EB55 board. The AT91EB40A board requires other address ranges since it lacks on-board RAM. Open the xcl file and search for AT91EB40A to see comments on what is needed.

近期下载者

相关文件


收藏者