APPLICATION NOTE 4277

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.

Overview

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.
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.

Software Setup

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.

Installing the USB-to-Serial Drivers

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.

Installing the Virtual COM Port (VCP) FTDI Drivers

To install these drivers, follow the steps below.
  • Plug the provided USB flash drive into an active USB connector on your computer. The autorun function stored on the stick may cause the setup program to run automatically, depending on your operating system and its settings. If the program does not start automatically, explore the drive, and double click the Setup.exe file in the root directory. This will bring up the MAXQ2000 EV kit main menu shown in Figure 2.
  • Click on the USB Serial Drivers button at the right of the screen. This will open another window, and you will see the installation as it progresses. When installation is complete, a confirming message will be displayed.

    Figure 2. MAXQ2000 EV kit main menu.
    Figure 2. MAXQ2000 EV kit main menu.

  • Now connect the MAXQ2000 USB board to an active USB port on your PC. While not essential, it is preferable to use a port other than the one to which the USB flash drive is presently connected. Using this additional port will allow access to both USB devices without switching between them. The "Found New Hardware" message will appear. After a brief period, you will receive the message, "Your hardware is installed and ready to use."

Determining the Virtual COM Port

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.
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.

Installing the MAX-IDE

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.
  • Project-based development environment for MAXQ assembly applications.
  • Integrated MAXQ macro assembler, including standard header files for all MAXQ microcontrollers.
  • In-circuit application loading using the JTAG/TAP interface and ROM bootloader (for MAXQ microcontrollers with flash or EEPROM program memory).
  • In-circuit debug features include setting break points, step-by-step program execution, and memory/register content viewing and modifying.
The MAX-IDE program is installed like the USB drivers by using the MAXQ2000 EV kit USB flash drive.
  • As before, make sure that the USB flash drive is plugged into an active USB port, and double click the Setup.exe file in the root directory. From the main menu, click the Programming Tools button, and from this menu click the MAX-IDE button. This will start the MAX-IDE Setup Wizard that will install this program. The wizard will default to the directory C:\Program Files\MAX-IDE for installation, but you can select any directory by clicking the Browse button. In this and other selection options, choosing the defaults is recommended. Once the installation is complete, MAX-IDE can be launched from the Start menu: Start All Programs MAX-IDE MAX-IDE.
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.
Figure 4. Configuring the options for the MAX-IDE.

Example Program

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 \MAXQ2000 USB KIT\MAX-IDE\Temperature. This application measures the ambient temperature using a DS18B20 digital thermometer. The measured temperature is displayed alternately in degrees Fahrenheit and degrees Centigrade on the board's LCD. This temperature application will be used to illustrate the kit's functionality.

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.

Hardware Setup

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.

Loading the Executable File

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.
  • If it is not already connected, plug the EV kit into an open USB socket on your PC. The power LED D1 will illuminate. LED D3 will flash a few times and stop to indicate a burst of activity on the USB bus.
  • If the MAX-IDE program is not already running, start it by selecting Start All Programs MAX-IDE MAX-IDE. You can also locate the MAX-IDE icon and click on it.
  • If you have not already done so, set the Device Options as described in the Installing the MAX-IDE section above.
  • Now select Project Open Project, and navigate to the directory where the assembly-language temperature example program was copied (e.g., C:\MAXQ2000USBKIT\MAX-IDE\Temperature). Select the 2000test.prj file, and click OPEN.
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.
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.
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.
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.
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).

C Code Examples

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 an 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.
  • An evaluation version of the IAR toolset (KickStart Edition) can be installed by clicking on the Programming Tools button of the MAXQ2000 EV kit's main menu. On the window that appears next, click on the IAR Embedded Workbench® button to start the IAR installation tool. Follow the instructions to install the toolset. You can obtain a license from IAR by completing the on-line registration form.
  • After the IAR KickStart Edition is installed, several updates to the toolset can be installed by selecting the Programming Tools button from the MAXQ2000 EV kit main menu, and then selecting the IAR Patch button. This will start an installation program for the patches.
  • Once the IAR toolset and the patches are installed, you can open the Countdown example application by clicking File Open Workspace... and selecting Countdown_Workspace.eww. Under Project Options and the category Debug-JTAG, you can set the communications port to COM4.
  • Select Project Rebuild All to compile and link the application program.
  • Click the Debug button or select Project Debug to start the debugger. The program can be started with any of the Step Into, Run To Cursor, or Go buttons. The IAR toolset capabilities can be further explored from this point.

Conclusion

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 and IAR Embedded Workbench are registered trademarks of IAR Systems AB.

MAXQ is a registered trademark of Maxim Integrated Products, Inc.

Windows is a registered trademark and registered service mark of Microsoft Corporation.



Related Parts
DS1822 Econo 1-Wire Digital Thermometer Samples  
DS18B20 Programmable Resolution 1-Wire Digital Thermometer Samples  
DS18B20-PAR 1-Wire Parasite-Power Digital Thermometer  
DS18S20 1-Wire Parasite-Power Digital Thermometer Samples  
DS18S20-PAR Parasite-Power Digital Thermometer  
MAX31820 1-Wire Ambient Temperature Sensor Samples  
MAX31820PAR 1-Wire Parasite-Power, Ambient Temperature Sensor Samples  
MAXQ2000 Low-Power LCD Microcontroller  
MAXQ2010 16-Bit Mixed-Signal Microcontroller with LCD Interface  


Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (301.1kB)  

© Sep 24, 2008, Maxim Integrated Products, Inc.
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 4277: Sep 24, 2008
APPLICATION NOTE 4277, AN4277, AN 4277, APP4277, Appnote4277, Appnote 4277