MW2 |
|
Table of Contents
- Introduction
- Hardware
- External Power
- Drivers (Windows)
- Drivers (Linux)
- Hardware Modifications
- Downloading Programs
- Initial Setup
- Applications
Introduction
MW2 is a USB-powered educational development board for the Atmel ATmega324P microcontroller. It is the next revision of the ATmega32 MikeWazowski board.
Here are some quick facts for the impatient:
- The processor speed is 8 MHz (at room temperature only...the frequency varies quite a bit with temperature).
- All I/O lines have 1k series resistors and 3.9V zener diodes.
- This is a 3.3V board, not 5V. All I/O lines drive high at about 3.3V. The I/O pins are 5V tolerant on inputs but there will be increased current draw (up to about 1mA) from the driver above 3.3V due to the 3.9V zener diodes and 1k series resistors.
- All I/O lines are available on the connectors except for PD0, PD1, PC6, and PC7.
- Avoid using PB6, PA5, PA6, and PA7 as they are used to communicate to the CC2500 RF interface device.
- The LED is turned ON by setting Port C pin 6 LOW. Setting the pin HIGH turns the LED OFF.
- The bootloader uses a fixed baud rate of 38400 bps.
Also see the MW2/FrequentlyAskedQuestions page for more quick facts.
For non-GVSU students a variant of the MW2 board is available commercially from Rugged Circuits.
Hardware
Here is the board schematic
Here are the board layouts for the top side, bottom side, and bottom side part names.
Here is the ATmega324P datasheet
Here is the FT232RL datasheet
Here is the CC2500 datasheet and the Errata version SWRZ002B (which are pretty important).
- The pre-programmed fuse settings on the ATmega324P are FUSEX=0xFD, FUSEH=0xD4, FUSEL=0xE2, LOCK=0xEF. The interpretation is:
- 8 MHz internal oscillator, 65ms startup delay, no clock divider
- Brownout detection enabled at 2.7V
- OCD and JTAG are disabled
- SPI in-circuit programming enabled
- EEPROM saved across erasures
- 512-word bootloader
- Lock bits set to protect bootloader
- Reset begins execution at bootloader reset vector
- CKOUT disabled
- Watchdog-always-on is disabled
- The 1k series resistors on all I/O lines are significant. You will probably not be able to brightly light LED's directly from an I/O line, for example, as a 2.0V LED will allow only I=V/R=(3.3-2.0)/1000=1.3mA of current, and LED's don't look very bright until they get about 10mA of current. DON'T FORGET ABOUT THE 1K RESISTORS!
External Power
The three-terminal connector adjacent to the USB connector can be used to both power the MW2 board from an external power supply and to also supply +5VDC (more like +4.7V) to an external circuit. The three terminals are labelled on the top-side silkscreen as follows:
- 8V-15VDC : This is an optional power INPUT to the board. An 8V-15V DC supply can be connected between this pin and the GND pin and must be able to supply at least 50mA of current. The lower the voltage the better in order to limit heating on the board. When both a USB and external power supply are connected then the external power supply is used to power the board.
- GND: This is a common ground connection for the MW2, external power supply, and 5VDC output voltage.
- 5VDC: This is a power OUTPUT from the MW2 board. Whichever power supply is used to power the board (external supply or USB), an on-board 5V regulator is used to drive this 5VDC pin through a Schottky diode (the diode is for back-drive protection should you connect the 5VDC pin to a potential higher than 5V). This 5VDC output can be used to power external circuitry, which must have a common ground connection to the GND pin of the connector.
- Note that a) due to the Schottky diode, the output voltage will be closer to 4.7V than exactly 5V, b) the more current you draw from this power output, the lower the voltage will get, and c) the output current is limited and not intended to drive anything other than low-power digital circuitry (aim for no more than 50mA).
Drivers (Windows)
If your computer doesn't recognize the board when you first plug it in, you will need to download and install drivers for the FT232RL chip on the board. You may need Administrator privileges to do so.
Download the latest FTDI drivers from the FTDI web site -- note where on the disk you saved the ZIP file. Alternatively, here is a direct link to the self-installing executable which allows you to skip the remaining steps.
- Extract the contents of the ZIP file for the drivers and note where on the disk the files have been extracted.
- Plug the board in to a USB port and wait for a dialog to appear indicating new hardware has been detected.
- Do not allow Windows to download drivers from the Internet, but instead direct it to look for drivers in the directory containing the extracted FTDI driver files.
- Windows will repeat the process and ask you to install drivers again. Once again, use the same directory containing the FTDI driver files.
Drivers (Linux)
Any modern kernel will already have the ftdi_sio kernel module so you should not have to install anything. If not, make sure this module is enabled in your kernel configuration and recompile your kernel.
Note that FTDI also provides a library for Linux that provides additional functionality beyond the ftdi_sio module. You can use this library to develop custom programs that access the FTDI device directly without going through the serial port. You can download this library from the FTDI drivers page.
Hardware Modifications
Here are some suggested modifications to the hardware, all very easy to do.
Add #4 screws, washers, nuts, and standoffs (e.g., Keystone Electronics part #876, Digi-Key part 876K-ND) to the four corner holes (picture) to prevent the components on the underside of the board from making contact with metal objects on your work surface (which may destroy the board!)
Downloading Programs
MW2 comes with a bootloader program that allows you to program the ATmega324P FLASH with your own program, directly over the USB connection. You do not need to use an AVRISP or other form of hardware programming connection.
On Windows, downloading programs is easiest using the MW2 program. The latest version is 1.5. Earlier versions had an incorrect version of the MW2-resident bootloader, meaning if you used the Setup tab to reinstall the bootloader, it would make the board unresponsive.
Initial Setup
In certain circumstances, you may need to re-install the ATmega324P bootloader, or program the FT232RL EEPROM. See the MW2/WindowsSetup or MW2/LinuxSetup pages for information on these advanced topics.
Applications
See the MW2/Applications page for user-contributed applications ready to run on your board.
