+ All Categories
Home > Documents > EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin...

EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin...

Date post: 26-Jun-2018
Category:
Upload: lamquynh
View: 228 times
Download: 2 times
Share this document with a friend
18
EWS ATMEGA1284P Development Board: User Manual I. Summary: The EWS ATMEGA1284P Development Board is a microcontroller development board based on the ATMEGA1284P microcontroller. With 2 UART headers, full SPI header, TWI/I2C header, and extra VCC and GND headers, along with a full pinout of the ATMEGA1284P, the board has been designed to facilitate easy plug- in and interfacing with all of our wireless modules. There is a USB-to-UART chip on-board, serving multiple purposes: Provides easy application interface with a PC, Enables seamless and efficient bootloader programming - Serial programming available through the Arduino IDE, AVRStudio, or Programmer's Notepad/WINAVR Additionally, the board is available in 3 speed grades for your specific needs: 1. 8MHz: 3.3V/5V operation - 8MHz is the fastest speed rating for 2.7V use 2. 11.059200MHz: 3.3V/5V operation - this is the most versatile version of the board - good for either 3.3V or 5V use, & for clock precision in UART communication 3. 16MHz: 5V operation - Note: 3.3V operation is possible with this board, but 16MHz is considered overclocking II. Features: Powerful ATMEGA1284P MCU - 128KB Flash, 16KB RAM, 4K EEPROM - 2 – 8-bit timers, & 2 – 16-bit timers - 6 PWM channels - 8 channel, 10-bit ADC - TWI interface - 2 serial USARTs - SPI interface - Programmable Watchdog Timer - Interrupt and Wake-up on pin changes Program MCU memory via either serial bootloader or ISP from the following IDEs: - Arduino - AVRStudio - Programmer's Notepad/WINAVR USB/UART circuitry on board – just plug into any USB port!! Includes USB cable & AC adapter Full pinout of ATMEGA1284P Beefy 500mA Voltage Regulator on-board Choose voltage level (3.3V/5V) w/jumper 3 user LEDs, user push button, and reset button Easy communication headers abound: - SPI - 2 UARTs - TWI/I2C - extra VCC & GND headers Check out our website for example projects to interface with our wireless modules! www.goEWS.com
Transcript
Page 1: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

EWS ATMEGA1284P Development Board:User Manual

I. Summary:The EWS ATMEGA1284P Development Board is a microcontroller development board based on the ATMEGA1284P microcontroller. With 2 UART headers, full SPI header, TWI/I2C header, and extra VCC and GND headers, along with a full pinout of the ATMEGA1284P, the board has been designed to facilitate easy plug-in and interfacing with all of our wireless modules. There is a USB-to-UART chip on-board, serving multiple purposes:

• Provides easy application interface with a PC,• Enables seamless and efficient bootloader programming- Serial programming available through the Arduino IDE, AVRStudio, or

Programmer's Notepad/WINAVR

Additionally, the board is available in 3 speed grades for your specific needs:

1. 8MHz: 3.3V/5V operation - 8MHz is the fastest speed rating for 2.7V use

2. 11.059200MHz: 3.3V/5V operation- this is the most versatile version of the board- good for either 3.3V or 5V use, & for clock precision in UART

communication3. 16MHz: 5V operation

- Note: 3.3V operation is possible with this board, but 16MHz is considered overclocking

II. Features:• Powerful ATMEGA1284P MCU- 128KB Flash, 16KB RAM, 4K EEPROM- 2 – 8-bit timers, & 2 – 16-bit timers- 6 PWM channels- 8 channel, 10-bit ADC- TWI interface- 2 serial USARTs- SPI interface- Programmable Watchdog Timer- Interrupt and Wake-up on pin changes

• Program MCU memory via either serial bootloader or ISP from the following IDEs:- Arduino- AVRStudio- Programmer's Notepad/WINAVR

• USB/UART circuitry on board – just plug into any USB port!!

• Includes USB cable & AC adapter• Full pinout of ATMEGA1284P• Beefy 500mA Voltage Regulator on-board• Choose voltage level (3.3V/5V) w/jumper• 3 user LEDs, user push button, and reset button• Easy communication headers abound:- SPI- 2 UARTs- TWI/I2C- extra VCC & GND headers

• Check out our website for example projects to interface with our wireless modules!

www.goEWS.com

Page 2: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

III. Table of Contents

I. Summary...............................................................................................................................................1

II. Features................................................................................................................................................1

III. Table of Contents...............................................................................................................................2

IV. Board Diagram/Description.............................................................................................................3

V. Connection/Setup.................................................................................................................................4

A. Out of the Box..................................................................................................................................4

i. Bootloader Programming..............................................................................................................4

ii. ISP Programming.........................................................................................................................4

B. Use Scenarios....................................................................................................................................5

VI. Bootloader Programming..................................................................................................................6

A. WinAVR+Programmer's Notepad....................................................................................................6

B. ARDUINO......................................................................................................................................10

C. Atmel Studio 6................................................................................................................................12

VII. ISP Programming...........................................................................................................................15

A. WinAVR+Programmer's Notepad..................................................................................................15

B. ARDUINO......................................................................................................................................16

C. Atmel Studio 6................................................................................................................................17

VII. Miscellaneous..................................................................................................................................18

A. Arduino Pin Mapping.....................................................................................................................18

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 2

Page 3: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

IV. Board Diagram/Description:

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 3

ATMEGA1284P MCU

TWI/I2C Header

User Push Button

SPI Header w/extra I/Os

UART0 Header w/extra I/Os

UART0 Header w/extra I/Os

Reset Button

UART1 LED Indicators

Sturdy USB Micro Socket

Red LED PWR Indicator

500mA Resettable Fuse

3.3V/5V Jumper

FTDI USB-to-UART on UART1

6-pin ISP Header

Mounting Holes

500mA Voltage Regulator

UART1 Header w/TX&RX Reversed

User LEDs: Red, Yellow, Green

Extra VCC and GND

Full MCU pinout(0.100” spacing, Breadboard Friendly!!)

AVCC Solder Jumper

Page 4: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

V. Connection/Setup

A. Out of the Box: Thank you for your purchase of the EWS ATMEGA1284P Development Board! The kit should have come with:

• EWS ATMEGA1284P Development Board• USB cable • AC-USB adapter

It's time to get started! The first decision to be made concerns how to program the board. This can be done in one of two ways – through the bootloader program that is resident on the board, or through the ISP header next to the board's USB socket. The kit even comes with an AC adapter to easily power your project from a typical wall socket, if desired, after programming & development is complete.

i. Bootloader Programming: The setup for bootloader programming is very simple. There is no additional programming equipment necessary to get started. Just plug the board into an available USB port on your PC and you're ready to go. All programming is done serially through the USB-to-serial circuitry on the board using an uploader program on your PC (AVRDUDE – the typical uploader program used with ARDUINO and WINAVR development platforms) that can talk to the bootloader program on your board (Optiboot). See “Bootloader Programming” section of this guide for a step-by-step process of programming with the bootloader.

ii. ISP Programming: ISP programming allows you to program the device memory through the 6-pin ISP header on the board, using an Atmel-style programmer. Whereas the bootloader just allows you to program the device's Flash memory, ISP programming also gives you access to setting the fuse bits of the device (fuse bits enable/disable features of the device, such as clock source, bootloader entry upon reset, low voltage detection, etc). See here for more information about fuse bits and what they are, or section 27 of the ATMEGA1284P datasheet. See “ISP Programming” section of this guide for a walk-through of ISP programming.

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 4

Page 5: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

B. Use Scenarios – The EWS ATMEGA1284P Development Board has been designed with ease of use and versatility as key motivators. The board ships with a common bootloader in memory, which is compatible with all major AVR development platforms. Also, to facilitate both easy bootloader programming and simple UART communication in program development, the board has USB-to-serial circuitry – just plug into your PC's USB port and you're communicating (make sure you have the USB driver installed, found here).

For easy use of our wireless modules, the board has header sockets for an SPI port, TWI/I2C port, and 2 UART ports! Just plug the module into the board and it's ready to use (see below for some typical use scenarios).

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 5

Page 6: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

VI. Bootloader ProgrammingUsers have the benefit of choosing their favorite IDE to use with the EWS ATMEGA1284P Development Board. Here we will show how to get started with the ATMEGA1284P DEV Board in the following environments, programming the board using the serial bootloader resident on the chip (just plug the board into a USB port – no programmer necessary):

• Programmer's Notepad/WINAVR• Arduino• Atmel Studio 6

A. WinAVR+Programmer's Notepad – WinAVR (tm) is a suite of executable, open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. Includes the GNU GCC compiler for C and C++. i. DOWNLOAD/INSTALL - Find WinAVR here and install. Then open Programmer's Notepad (great

editor!!) ii. CREATE PROGRAM - Open your program (.c file). Here's a simple LED blink program for

introduction purposes (.c file + makefile)

iii. COMPILE - Select Tools>Make All to compile the program and create hex file- Here are a few settings that you may have to change in the makefile:

• Processor frequency (Example: F_CPU = 11059200) – set this correctly!! there are 3 frequency versions of the board (8000000, 11059200, 16000000)

• Target file name – this must match the name of your .c file• AVRDUDE_PROGRAMMER – this is where you choose the programmer that you are

using (original serial bootloader = arduino, ISP – select appropriate programmer, such as avrisp2)

• AVRDUDE_PORT – very important!! Look in your windows device manager to find the COM port that represents your ATMEGA1284P DEV Board and enter it here. (Example: AVRDUDE_PORT = COM4)

• AVRDUDE_BAUD_RATE - If you are using the 8MHz version of the board, you have to specify a different upload rate (The default is 115200, but AVR serial communication is too erroneous at this baud rate when using an 8MHz frequency.)

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 6

Page 7: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – A. WinAVR + Programmer's Notepad

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 7

Page 8: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – A. WinAVR + Programmer's Notepad

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 8

Page 9: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – A. WinAVR + Programmer's Notepad i. PROGRAM - Select Tools>Program to load hex file into program memory. If this fails,

recheck the makefile settings. Also, make sure that your COM port is not open in another application (such as Hyperterminal) when you attempt to program the board – this is an easy mistake.

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 9

Page 10: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming B. ARDUINO

i. DOWNLOAD/INSTALL – Download Arduino and install (Arduino 1.0 or newer).

ii. DOWNLOAD/INSTALL MORE – Now, download the EWS_ARDUINO_FILES folder from our website , and unzip/install it in the “Hardware” folder of your Arduino software package.

iii. RESTART ARDUINO – Choose the appropriate EWS ATMEGA1284P board and COM port from the menu.

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 10

Page 11: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – B. ARDUINO iv. OPEN/UPLOAD – Here, we open the Blink example resident in Arduino (on our board, there are

LEDs on pins 20, 21, & 22 – replace the pin 13 selection with one of these in the example program). Then, verify and upload to the board.

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 11

Page 12: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming C. Atmel Studio 6

i. DOWNLOAD/INSTALL – Download and install Atmel Studio 6

ii. OPEN/CREATE PROGRAM – Get the example blink project from our website here and open it in the IDE.

iii. COMPILE – Build the solution files for your program.

iv. ADD EXTERNAL TOOL – to use the serial bootloader (optiboot) that the chip ships with, you'll have to add functionality for talking to the bootloader. We prefer AVRDUDE for serial bootloading to the AVR. It is included in both the WinAVR and ARDUINO downloads, so if you have one of these on your system, you can find AVRDUDE in either place.• First, look in Device Manager to find the COM port that is represented by your EWS

ATMEGA1284P Development Board

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 12

Page 13: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – C. Atmel Studio 6• Second, in Atmel Studio, select Tools>External Tools, and create a new instance of a tool:

◦ 1. Name it (Title) – I called it “USBtoSerialCOM19”

◦ 2. Link it to a program (Command) – on my system, I linked it to the AVRDUDE program in my Arduino package: C:\Documents and Settings\user\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\tools\avr\bin\avrdude.exe

◦ 3. Enter the arguments (Arguments) – all of the arguments for the AVRDUDE command line program: -p atmega1284p -P COM19 -c arduino -U flash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i

▪ Note: if you are using the 8MHz version of the ATMEGA1284P, add “-b 57600” to the “Arguments” line to overrride the default baud rate (the 8MHz version fails when the default upload rate is used, due to the AVR USART error rate at that frequency)

▪ Remember to modify the “Command” and “Arguments” lines above for your particular scenario – namely, make sure you have the correct path for AVRDUDE in “Command”, and change the COM port in the “Arguments” line.

◦ 4. Select “Use Output Window” - this will show you AVRDUDE's output when it runs

◦ 5. Click “OK”

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 13

Page 14: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(CONT.) VI. Bootloader Programming – C. Atmel Studio 6 v. PROGRAM – Click on your new tool to program the device: Tools>USBtoSerialCOM19!!!

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 14

Page 15: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

VII. ISP ProgrammingUsers are also able to program the device via the board's 6-pin ISP header next to the USB connector. The AVRISP mkII programmer from Atmel is a very good choice for ISP programming. The previous section (“Bootloader Programming”) went through the process of getting a program into the Flash memory of the ATMEGA1284P. The process for ISP programming is very similar – all three IDE's that were presented are also able to interface with the AVRISP mkII programmer for ISP programming. Here are the minor changes that must be made:

A. WinAVR+Programmer's Notepad i. CHANGE SETTINGS – Easy, peasy. All that you have to do for ISP programming in WinAVR is

change the programmer and port settings for AVRDUDE. Then, programming is the same as programming with the bootloader (just click Tools>Program after you have compiled the project using “Make All”)

ii. PROGRAM BOARD – Now, click “Program”. Congratulations, you have programmed the board via ISP programming!

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 15

Page 16: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(Cont) VII. ISP Programming B. ARDUINO

i. CHANGE SETTINGS – Choose the programmer in Tools>Programmer

ii. PROGRAM BOARD – Program the board by selecting File>Upload Using Programmer. Congratulations! You have programmed the board in Arduino using the ISP programmer.

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 16

Page 17: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

(Cont) VII. ISP Programming C. Atmel Studio 6

i. CONNECT - Select Tools>Device Programming to establish connection between the programmer and the board

ii. SETTINGS – Choose the appropriate settings and click “Apply”...

iii. PROGRAM – Choose the file to burn into Flash and click “Program”. Congratulations, you have programmed the board via ISP. However, now you have overwritten the bootloader program, so now you are stuck with ISP programming unless you re-load the bootloader program (see the EWS_ARDUINO_FILES>bootloader>optiboot folder for hex files if you need the bootloader back on the board!

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 17

Page 18: EWS ATMEGA1284P Development Board: User Manual · Table of Contents I. Summary ... A. Arduino Pin Mapping ... EWS ATMEGA1284P Development Board User Manual – Page 12. I (CONT.)

I

VIII. Miscellaneous:

A. Arduino Pin Mapping:

Here is a copy of the arduino pin mapping of the ATMEGA1284P, from: EWS_ARDUINO_FILES\variants\EWS\pins_arduino.h

Jump to TOCwww.goEWS.com EWS ATMEGA1284P Development Board User Manual – Page 18


Recommended