Mega128-Net Mega128-Net Mega128 AVR Boot Loader Mega128-Net

Similar documents
Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

MegaAVR-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

ARDUINO LEONARDO ETH Code: A000022

8051 Intermidiate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

ARDUINO LEONARDO WITH HEADERS Code: A000057

Doc: page 1 of 8

3.3V regulator. JA H-bridge. Doc: page 1 of 7

ARDUINO MEGA 2560 REV3 Code: A000067

AVR Intermediate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

MicroBolt. Microcomputer/Controller Featuring the Philips LPC2106 FEATURES

ARDUINO YÚN Code: A000008

Breeze Board. Type A. User Manual.

Doc: page 1 of 6

DEV-1 HamStack Development Board

keyestudio Keyestudio MEGA 2560 R3 Board

ARDUINO MEGA ADK REV3 Code: A000069

AVRminiV3.1 Manual. 1. AVRminiV3.1 Overview. 2. AVRminiV3.1 Features and Specifications Standard Features: 2.2. Optional Features:

ARDUINO M0 PRO Code: A000111

Arduino ADK Rev.3 Board A000069

Pridgen Vermeer Robotics ATmega128 Revision 0

Getting Started with STK200 Dragon

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

Various power connectors. 3.3V regulator. 64K Flash (Internal) 2K EEPROM (Internal) 4K SRAM (Internal) JA Mem Adr/ Data. Doc: page 1 of 9

Volume 1 Hardware Manual

Hardware Manual. Crumb128. Rapid Prototyping Module with the Atmega128 AVR Microcontroller

MAVRIC-IIB Mega AVR Integrated Controller II Revision B Technical Manual

Revision: 05/05/ E Main Suite D Pullman, WA (509) Voice and Fax. Various power connectors. 3.3V regulator

Cerebot Nano Reference Manual. Overview. Revised April 15, 2016 This manual applies to the Cerebot Nano rev. A

Doc: page 1 of 6

ARDUINO YÚN MINI Code: A000108

JED MICROPROCESSORS PTY LTD

General-Purpose Microcontroller Module 12a Hardware Reference Release 1.4a (October 11, 2017)

Part Number: PCB-STM32-F4B1 (unpopulated PCB with Discovery module sockets, no other parts) STM32-F4B1 (assembled board, not presently available)

8051 Basic Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Breeze Board. Type B. User Manual.

ARDUINO UNO REV3 Code: A000066

ARDUINO MICRO WITHOUT HEADERS Code: A000093

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

The Atmel ATmega328P Microcontroller

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

KNJN I2C bus development boards

CDN502 HIGH DENSITY I/O ADAPTER USER GUIDE

CDN503 HIGH DENSITY I/O ADAPTER USER GUIDE

Figure 1. JTAGAVRU1 application The JTAGAVRU1 is supported by AVR Studio. Updated versions of AVR Studio is found on

Pridgen Vermeer Robotics Xmega128 Manual

VLSI AppNote: VSx053 Simple DSP Board

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

M32 Development Board

LM53X Development and Evaluation Product Family

PCB-STM32-F3U. Development baseboard for the STMicro Discovery-F3 module (STMicro part# STM32F3DISCOVERY)

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

U4DIL. AVR USB Module. Rev. 1.1 Documentation Rev. 19. Reusch Elektronik Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch

ARDUINO INDUSTRIAL 1 01 Code: A000126

EasyAVR6 Development System

CEIBO FE-51RD2 Development System

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

F2MC MB90385 series Evaluation Board Documentation. Revision Date Comment V New document

The Atmel ATmega168A Microcontroller

CEIBO FE-5111 Development System

Prototyping Module Datasheet

Web Site: Forums: forums.parallax.com Sales: Technical:

ATmega128. Introduction

U6DIL. AVR USB Module. Rev. 1.1 Documentation Rev. 18. Reusch Elektronik Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch

SBC44EC. Single board computer for 44 pin PLCC PICs

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

Bolt 18F2550 System Hardware Manual

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

KNJN I2C bus development boards

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

PXA270 EPIC Computer with Power Over Ethernet & Six Serial Protocols SBC4670

PK2200 Series. Features. C-Programmable Controller. Specifications Board Size Enclosure Size Operating Temp.

BIG8051. Development system. User manual

Arduino Uno R3 INTRODUCTION

SimPLC. User Manual.

DBAT90USB162 Atmel. DBAT90USB162 Enhanced Development Board User s Manual

Hands on Experience with AVR32

STK User Guide

BV511 Hardware Guide ByVac ByVac Revision 1.0

LPC2468 Industrial Reference Design Platform System Development Kit Version 1.2. August 2008

STK User Guide

Web Site: Forums: forums.parallax.com Sales: Technical:

Shack Clock kit. U3S Rev 2 PCB 1. Introduction

StarterKit-C868 Hardware Manual Preliminary Edition January 2002

STK200 Starter Kit User Guide May 2004

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

P4M-400 User Manual > Introduction. Introduction

Atmel AVR datasheet. Matrix Multimedia Atmel AVR Board EB Contents

User Manual For CP-JR ARM7 USB-LPC2148 / EXP

RapID Platform DLR Network Interface Module Datasheet January 9, 2013

Sanguino TSB. Introduction: Features:

Freescale Semiconductor Inc. Microcontroller Solutions Group. FRDM-KL46Z User s Manual FRDM-KL46Z-UM Rev. 1.0

Propeller Activity Board (#32910)

Intel Galileo gen 2 Board

RapID Platform Network Interface Module Datasheet June 4, 2012

Wireless Sensor Networks. FireFly 2.2 Datasheet

KPIC-0818P (V050919) Devices Included in this Data sheet: KPIC-0818P

AVR Peripheral Board. Campus Component Pvt. Ltd.

Transcription:

Mega128-Net Development Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN 46268 (317) 471-1577 (317) 471-1580 FAX http://www.prllc.com GENERAL The Mega128-Net development board is designed for prototyping, laboratory and OEM use. The board hosts an ATMega128 processor along with 10baseT Ethernet, two RS232 ports, a Real-Time-Clock, 32K of SRAM, an Optrex compatible LCD connector, four R/C servo connections, JTAG and ISP ports, an MMC/SD slot, two 8-bit memory accessed parallel output ports, two 8-bit memory accessed parallel input ports, and a fully decoded expansion bus connection. Mega128 AVR Boot Loader The Mega128-Net development board now comes programmed with the AVRBL-128, Mega128 AVR Boot Loader. The AVR Boot Loader (AVRBL) is a bootstrap loader that, once programmed into the AVR boot-block memory area, allows reprogramming of AVR microcontrollers without need for a chip programmer. The AVRBL makes use of the self-

programming features of the AVR microcontrollers to allow in-circuit reprogramming. Once the AVRBL is programmed into the microcontroller, it remains resident until the chip is erased. Application programs require only a very minimum software interface to use the AVRBL. The PC application to interface to the boot loader and more documentation about interfacing to the boot loader are available free at http://www.prllc.com. (Some notes are provided on the following pages.) Other features of the development board include: - Comes Standard with an ATMega128-16AC processor - Comes programmed with a boot strap loader! No other programming hardware is required! Just an RS232 cable to your PC and the AVRBL Boot Loader Windows application. - 10baseT Ethernet using the RealTek RTL8019AS NIC. RJ45 Jack on-board. - Two RS232 ports with 9-Pin D-Shell as well as a jumper header for convenient connection. - Up to 128K of In-System Programmable FLASH memory with 4K of EEPROM and 4K of Internal SRAM. - Eight, 10 bit, Analog Inputs, using either internal or user supplied reference - Nine I/O controlled LEDs, 8 of which are jumper selectable. - A PCF8563 Real-Time-Clock IC with a 32KHz watch crystal for on-board Real-Time operations. Battery backed with a 3V lithium coin cell. - 32K of external SRAM. - A universal clock socket allows for canned oscillators, as well as a variety of crystals, ceramic resonators, and passive terminations. A 14.7456Mhz oscillator comes standard with the unit, providing accurate baud rates across a wide range. - A single-in-line Optrex compatible LCD connector. - 0.1 centered headers provide for simple connection to the processor special function pins and I/O. - 10-pin, polarized, ISP and JTAG connections are provided for in-system programming and debugging. Mega128s can also be programmed through either RS232 port when using an appropriate boot loader application. - On-board switch-mode regulation allows for power inputs from 8-38VDC with an LED power indicator. - Termination is provided for 5VDC output at for up to 2A of combined load.

SPECIFICATIONS - Voltage range 8 V to 38 VDC - Power consumption 400 mw (nominal) - Dimensions: W 4.75 inches x H 6.5 inches - Mounting 0.125 holes and Rubber feet, 4 places - Weight ~4 OZ - Operating temperature 0 deg. C to +60 deg. C - Storage temperature 0 deg. C to +85 deg. C

- Humidity 0% to 95% at +50 deg. C (non-condensing) APPLICATION NOTES: Power J2 (screw terminal connector) is the power input point. Acceptable voltages are 8 38 VDC (J1-1 is +, J1-2 is ground). JP5 is an output of the regulated 5 VDC that may be used to power other devices. The LM2678 based switching power supply has the ability to produce up to 2A at 5VDC. This allows the board to comfortably power an LCD display with backlight and up to 4 standard R/C servos. Serial Connections P7 and P6 are standard DB-9 connectors usually used to connect to a PC. The TX signal is on P7-2 (P6-2) and the RX signal on P7-3 (P6-3). These are RS-232 level signals. P5 and P4 also provide connections for the RS-232 level serial signals. On each connector, pin 1 is the TX signal, pin 3 is the Rx signal and pin 2 is ground. UART0 (P6) supports a command set. When UART0 monitoring is not enabled by the Mega128-Net-Demo host application, UART0 is in command mode. The command mode allows the IP and MAC addresses to be changed through the UART as well as reading and modifying the date and time. The commands are:? - Print list of commands. $ - Jump to bootloader. I - Set IP address. i - Print IP address. M - Set MAC address. m - Print MAC address. C - Set date and time. c - Print current date and time. ESC - Cancels any Set command in progress. On reset, the baud rate of UART0 defaults to 115200 and the default mode is command mode. The baud rate and mode can be changed over the Ethernet connection. The new baud rate and mode remain in effect until the Mega128-Net development board is reset. UART1 (P7) defaults to a echo-mode of operation at 19200 baud. This port can be enabled and baud-rate set for monitoring through the Mega128-Net-Demo application. Note: When UART monitoring is enabled by the Mega128-Net-Demo host application, the Mega128-Net-Demo host application displays values received by the selected UART. The Mega128-Net development board transmits the data received by the UART to the Mega128-Net-Demo host application via the Ethernet connection for display. When data is sent to a UART from the Mega128-Net-Demo host application, the host

application sends the data to the development board through the Ethernet connection. Once the development board receives the data, it transmits it out the selected UART. ISP Connection P1 is provided for In-System-Programming of the Mega128 using appropriate ISP programming hardware. This connector is compatible with TheCableAVR ISP programmer available from Progressive Resources LLC, http://www.prllc.com/. JTAG Connection P2 is provided for In-System-Programming and Debugging of the Mega128 using appropriate JTAG hardware. This connector is compatible with Atmel s JTAG-ICE. For boards released after January 28, 2004, the JTAG and OCD Fuse bits are enabled, however the installed bootloader sets the JTD bit (disabling the JTAG and OCD connections) so all analog channels can be used. To use the JTAG-ICE, check Connect on Reset when prompted by AVR Studio, so the JTD bit does not get set before the JTAG-ICE can communicate with the AVR processor. MMC/SD Memory Connection P8 is provided for Multi-Media and Secure-Data Flash Cards. These memory cards utilize the SPI interface of the ATMega128 allowing for large amounts of memory to be accessed without consuming many I/O pins. 10BaseT Ethernet Connection J1 is a 10BaseT Ethernet connection. This port is transformer coupled to the board to provide the highest possible electrical isolation. The RealTek RTL8019AS Network Interface Controller makes a simple and efficient connection from the ATMega128 to the LAN. The ShortCake Ethernet Stack source code, supplied with the board, provides a quick starting point giving access to the Mega128-Net development board using ICMP, ARP, PING, UDP, and TCP/IP protocols. ShortCake also has a small HTTP server example built in demonstrating a socketless connection. A VB6 project (Mega128-Net-Demo) is also included demonstrating how the LCD, servos, digital inputs and output, UARTS and analog to digital converters can be controlled over an Ethernet connection. To access the on-board web server demonstration, open Microsoft Internet Explorer and go to URL: http://192.168.100.57 This URL will bring up a web page showing the current time and date (from the onboard real time clock) and if the board is plugged into a LAN with access to the Internet, a photo of the board will appear on the browser. With Internet Explorer, the address: http://192.168.100.57/control.htm

provides a control page. In this web page you can turn the LEDs on and off as well as send messages to the LCD display. The IP and MAC address may be changed using the UART0 (P6) serial port. See the preceding section on the serial ports for more information. Parallel Ports Parallel ports A, B, C, D, E, F and G (complete or in part) are connected to various headers and labeled clearly on the board or in the schematics. Refer to the schematics to locate the connection points of these ports. When possible, the entire port (i.e. PORTB) is brought out to the connector in sequence. Ports A and C can be found on the memory expansion connection and are available as I/O when the Mega128 is not in external memory mode. These are normal TTL-level signals with or without pull-ups depending on the port initialization set up in the software. Port F (JP2 odd pins) has a parallel row of ground pins next to it (JP2 even pins) so that enabling the built-in pull-up resistors and then using two-pin jumpers to ground any pins that need a logic 0 applied for input purposes can effect simple input signals. This also provides a convenient ground reference when measuring analog voltages with the internal A/D converter (ADC). Port B (JP22) has a parallel row of pins (JP23), each of which is connected to an LED through a 510-ohm series resistor to +5 VDC. Jumping any of the pins of JP22 to the corresponding pin of JP23 allows the use of the on-board LED s as an output. Because the LED s are connected to +5 VDC and the port is sinking the LED current, the LED will be on for any pin that outputs logic 0. Port B is also configured such that up to 4 standard R/C servos may be plugged in: JP21 provides 5VDC, JP4 provides GND and JP22 provides the PORTB output bits used as position signaling for the R/C servo. The PORTB.4-7 bits also function as PWM outputs allowing the Mega128 processor to generate the appropriate pulse output to the servo with minimum software overhead. Refer to the Atmel ATMega128 datasheet for details on the PWM operation. Be sure to check the plug configuration of the R/C servo before connecting it to the board. Most manufacturers have standardized on this connection scheme, but not all. Plugging in an incompatible servo, or plugging it in reversed, could damage the servo, the development board, or both.

To gain back some of the I/O lost to the network interface controller and external memory, two 8-bit output ports and two 8-bit input ports were added and can be found on the board as follows: OUT0 - JP6 OUT1 - JP8 IN0 - JP7 IN1 - JP9 JP10 and JP11 provide power and ground to what results as a 34-pin header. This makes for easy connectivity using a standard ribbon cable. These ports can be accessed as variables by using definitions like: unsigned char out0 @ 0x9000; unsigned char out1 @ 0x9400; // This is the LCD port too! unsigned char inp0 @ 0x9800; unsigned char inp1 @ 0x9C00; Memory Expansion Connection J3 is a dual-in-line connector that can serve two purposes. If the Mega128 is setup in external memory mode, the fully decoded address, data, and access strobes (RD, WR, and ALE) are available to J3 (along with VCC and GND). If the Mega128 is in internal memory mode, then ports A and C are available at the connector as general, digital I/O. J3-1 and J3-2 are used to enable or disable the on-board SRAM. If there is a jumper from J3-1 to J3-2, the on-board SRAM is disabled. This allows for entire external memory address space to be dedicated to whatever devices may be plugged in to the memory expansion connector. J3-1 (~RAMEN) can also be set to TTL high by offboard logic in order to disable the on-board SRAM for peripherals that may share the memory space. J3-33 and J3-34 carry the SCL and SDA signals for external I2C communications. These lines are shared with the on-board real time clock. System Clock As supplied, the system clock is 14.7456 MHz. U6 contains the crystal and caps necessary for the oscillator. Replacing U6 with a TTL, crystal, ceramic resonator, or RC oscillator, or a different integrated oscillator unit allows changing the system clock if necessary. Analog-to-Digital Converter Connections JP1 provides the connections to control the V ref for the ADC. A new V ref may be connected to JP1, pin 2, if desired. Or the internal connections to V ref may be controlled by software. 5V can be used as a reference by jumpering JP1-2 to JP1-3. LCD Interface Connections The SIP connector, U12, is provided as convenient connections for Optrex compatible LCD displays. The signaling definitions are as follows: OUT1.0 RS

OUT1.1 RW OUT1.2 E OUT1.4-7 DB4-DB7 Where OUT1 is a memory addressed, parallel, output only port. AVRBL-128, Mega128 AVR Boot Loader There are two methods of running the boot loader, upon reset and by a direct call from the application code. The boot loader runs on UART0 at 115200 baud, XON, XOFF handshaking, 8 data bits and 1 stop bit. The boot loader code is executed upon reset. If the boot loader does not receive instructions to load a new file with 5 seconds, then it jumps to the application code. To call the boot loader from your application code consider using a condition and jump instruction. For example: if (UDR0 == '$') // did I receive a $ on the USART? { // if true, then jump to the AVRBL #asm JMP 0xFC00 #endasm } This example code checks to see if the character received on USART is a $. If so, then the JMP instruction is executed, exiting the main application and entering the boot loader directly. If the boot loader does not receive any instructions within a selected amount of time it will jump to 0x0000, effectively resetting the processor and starting the main application code. Otherwise, if the boot loader does receive instructions, the opportunity is then provided to download new firmware. The PC application allows the user to establish what characters are used by the application to start the boot loader. After the AVBRL is started (via a reset, a power-up, or a jump from the main application), the following protocol must be observed. The PC application provided handles the protocol for you with its default settings or you can create a custom application. In either case the protocol is: 1. Upon power-up, reset, or as a result of a jump from the main application, the AVRBL sends a ^ (BOOTLOADER_ACTIVE_CHAR) at your selected baud rate. 2. The host is then required to send the three-character entry sequence. This is used to prevent an inadvertent attempt of reprogramming from taking place. If the AVRBL does not receive these characters within the timeout period, the AVRBL tests to see if there is code located in the main application area of flash. If there is, then the AVRBL jumps to it, otherwise, execution stays within the AVRBL indefinitely, waiting for the entry sequence.

3. Once the three-character entry sequence has been sent, the bootloader sends the version string (Vx.xx) followed by a? (READY_CHAR). 4. Upon receipt of the READY_CHAR, the host application should send the hex file for the new/updated application program observing an X-ON / X_OFF handshaking protocol to control data flow. The handshaking is very important as the flash memory area writes much more slowly than the serial port can send data. The programming software continues sending the hex file until it is all sent. After each line of.hex file is received by the bootloader, one of three characters is transmitted by the bootloader: - ~ Line received with no errors. - % Line received with no error, but an error occurred while flashing. - - Checksum error detected while receiving the line. 5. After the programming is complete, the AVRBL sends either a #, meaning the programming is all right, or an @ indicating that an error has occurred and the program did not load successfully. In most cases an error during programming means that the main application program is corrupted and will need to be resent. 6. The AVRBL then starts the newly programmed application software. As stated in step 2, the AVRBL tests to see if there is code located in the main application area of flash. If there is, the AVRBL jumps to it, otherwise, execution stays within the AVRBL indefinitely, waiting for the entry sequence. One final note about the Mega128 AVR Boot Loader, the boot loader source code is available for purchase and as such provides the opportunity for customized boot loader solutions. The AVRBL-128 boot loader (as well as others) is available at http://www.prllc.com.

SCHEMATIC (page 1)

SCHEMATIC (page 2)