新品快讯
Getting Started with the MAXQ2000 USB Thumb Evaluation Kit
Abstract: This application note describes the necessary steps to quickly begin using the USB Thumb Evaluation (EV) Kit for the MAXQ2000 RISC microcontroller. The document explains how to install and configure the kit's hardware and software, and how to create and load applications that can be executed by the on-board MAXQ2000 microcontroller. An example program to read and display ambient temperature is provided.
The MAXQ2000 USB Thumb Evaluation Kit is a proven platform for conveniently evaluating the MAXQ2000 RISC microcontroller. The evaluation (EV) kit board is a small "thumb drive" form factor with a USB interface (Figure 1). By installing the MAX-IDE assembly language Integrated Development Environment on a connected computer, applications can be developed and debugged on this EV kit board. The MAX-IDE program is available on the USB flash drive included in the kit or by download from the Maxim website.
Figure 1. MAXQ2000 USB EV kit board.
The MAXQ2000 USB board includes a DS18B20 temperature sensor; a 4-digit 7-segment liquid crystal display (LCD); a 32kHz crystal for the MAXQ2000's internal real-time-clock (RTC); and a prototyping header that provides access to some of the processor's general purpose I/O pins.
The evaluation kit is shipped with this board plus a USB flash drive containing software, schematics, data sheets, and other valuable documentation.
Several software packages must be installed on your PC prior to taking full advantage of the MAXQ2000 USB EV kit. The following sections describe the installation and setup of each package.
To allow your PC to interface correctly with the MAXQ2000 USB board, the proper drivers must be installed for the on-board USB-to-serial converter. The instructions below detail the installation of the drivers for Windows® XP. For a more in-depth explanation and instructions on installing the FTDI drivers for Windows 2000 or Windows 98, refer to the installation guide.
To install these drivers, follow the steps below.
The programming or development tools such as MAX-IDE must be configured to work with the virtual COM port (VCP) interface provided by the MAXQ2000 USB Thumb Evaluation Kit. First, you must determine which COM port the operating system assigned to the USB serial port. To do this, click Start Control Panel and select System Hardware Device Manager. Look in the Ports (COM & LPT) section to determine the COM port number assigned to the VCP (Figure 3).
Figure 3. USB serial-port COM location in device manager.
In this case, the USB serial port was assigned to COM4. When starting MAX-IDE for the first time (or any other program that communicates with the MAXQ2000 EV kit), the IDE must be configured to use this COM port. This configuration process is described in more detail below. For now, simply record the COM port assignment for later configuration.
The MAX-IDE program is a full-featured, application development and debugging environment for MAXQ® microcontrollers. It works with all MAXQ EV kits and provides the following features.
To configure MAX-IDE for using the assigned serial port determined above, start the program and select Device Options. Choose your COM port from the drop-down selection as shown in Figure 4. If this COM port is not listed, simply type the value, i.e., COM4. This would also be a good time to check the Device Configuration File and the Desired JTAG Clock Frequency (kHz); set them to the values shown if they do not appear already.
Figure 4. Configuring the options for the MAX-IDE.
There are several MAXQ2000 example applications provided on the USB flash drive in the folder "examples." One of these example programs is written in MAXQ assembly language, and is found in the subdirectory
To load and execute this example, the files should be copied to a working directory on your PC. This is accomplished by clicking on the Programming Tools button from the main menu of the MAXQ2000 EV kit disk, and then clicking on the Example Code button. This will start an installation wizard (this may take a while), and you will be asked to name a directory on your PC to which these files will be copied. In this case the files were copied to directory C:\MAXQ2000USBKIT\Example Code, but it can be any location you choose.
The hardware of the MAXQ2000 USB EV kit is very straight-forward; it has no jumpers or other hardware configuration settings. Schematics for the EV kit board are provided on the included USB flash drive (Documentation button). By examining the schematics, one can see that there are very few components on the board.
The board contains three indicator LEDs: D1, D2, and D3. LED D1 emits green light and is a power indicator. It will be illuminated whenever the board is receiving power from the USB port. LED D3 emits red light and is illuminated when there is communication over the USB port. LED D2 emits green light and is connected to port pin P3.7 through a current-limiting resistor to the board's 3.3V power supply. LED D2 can be illuminated by setting this port pin to a logic zero with software.
All power for the board is provided through the USB connector. The USB-to-serial chip (FT232R) regulates the 5V input power to 3.3V for the other circuitry on the board. A separate low-drop-out regulator, U3, provides a 2.5V supply used exclusively by the MAXQ2000 microcontrollers, U1 and U5. Microcontroller U1 is a dedicated controller programmed to perform serial-to-JTAG conversion. Microcontroller U5 is the general-purpose device; it is loaded with and executes the user's application code. Both microcontrollers operate from a 12MHz clock supplied from the FT232R device. For this clock to be available, the USB connector on the kit must be connected to a powered (nonsuspended) USB host.
There are several ways that an executable program file can be loaded into and run by the MAXQ2000 EV kit board. For instance, one can load a .HEX-formatted file using the Microcontroller Tool Kit (MTK) available on the provided USB flash drive or downloaded from the Maxim website. However for this application note, we will use MAX-IDE to load the program into the kit board. To load the temperature example, follow the steps below.
The MAX-IDE will open the project and load the assembly-language source file (2000test.asm) into the display window (Figure 5). By opening the project, MAX-IDE will establish communications with the EV kit as verified by the messages at the bottom of the screen. However, the MAX-IDE will not actually be loaded into the kit until the program is executed. Make sure that the board is plugged into an active USB port prior to opening the project. Otherwise, you will have to wait a relatively long timeout period before the program decides that it cannot talk to the kit.
Figure 5. Project loaded and ready to run.
To load and run the application, click the run button at the top of the screen (highlighted in Figure 6) or press F5. The program will be loaded as indicated by the messages at the bottom of the screen, and it will begin execution from address zero. You can verify that the program is running by observing the EV kit board. The LCD displays the temperature and LED D2 flashes briefly every time that the LCD changes.
Figure 6. Run button.
If you are unfamiliar with the MAX-IDE's capabilities, this would be a good time to go exploring. You can pause the program by clicking the pause button to the right of the run button (Figure 6). Activating the pause button will cause several things to occur. The MAX_IDE will halt the program and place a highlight bar over the next line of code to be executed (Figure 7). The register contents shown in the table at the right of the screen will be updated to reflect their current values. Register values can also be changed by clicking on the register's value and typing in a new value. This can be a very powerful tool for code debugging. Clicking the run button will cause the program to resume execution.
Figure 7. Program execution paused.
You can set a breakpoint by simply clicking on the line number to the left of the code window, or you can single-step through lines of code using the Step Into button shown at the far left of Figure 8. The two buttons to the right of the Step Into button are the Step Over and Step Out buttons, respectively. As their names imply, they allow the user to step over or step out of subroutines. The rightmost button is the Run To Cursor button. By placing the cursor at any line of the program and clicking this button, the program will run until that line is next to execute.
Figure 8. Step buttons.
Further details on the capabilities of the MAX-IDE can be found in the MAXQ Development Tools Guide, available from Maxim (PDF, 864KB).
There are two other example programs contained on the USB flash drive: Countdown and Temperature, both contained under the Examples\IAR subdirectory on the Flash drive. The Countdown program uses an internal timer to generate a 1s interval to count down from a initial value. The count is displayed on the LCD, and the program halts when the value of 00:00 is reached. The Temperature program is a C language version of the assembly program of the same name illustrated above. Both of these examples were coded using the IAR compiler which is also contained on the USB flash drive.
A detailed description of loading the IAR compiler and executing these two example MAXQ2000 applications is beyond the scope of this document. Nonetheless, a few general comments are worth noting.
The MAXQ2000 USB Thumb Evaluation Kit is a proven platform for conveniently evaluating the MAXQ2000 RISC microcontroller. The board is a small "thumb drive" form factor with a USB interface. The EV kit includes a USB flash-drive memory device containing the MAX-IDE. With MAX-IDE and the kit board the user can develop and debug applications for the MAXQ2000 RISC microcontroller. Several example programs and an evaluation copy of the IAR C compiler and tool suite are provided on the USB flash drive.
IAR Embedded Workbench is a registered trademark of IAR Systems AB.
MAXQ is a registered trademark of Maxim Integrated Products, Inc.
Windows is a registered trademark of Microsoft Corp.
全部0条评论
快来发表一下你的评论吧 !