Microchip Technology Explorer 16 Development Board User guide

Explorer 16 Development Board
User’s Guide
© 2005 Microchip Technology Inc. DS51589A
Note the following details of the code protection feature on Microchip devices:
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WAR­RANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip’s products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance and WiperLock are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their respective companies.
© 2005, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Company’s quality system processes and procedures are for its PICmicro devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
®
8-bit MCUs, KEEL
®
OQ
code hopping
DS51589A-page ii © 2005 Microchip Technology Inc.
EXPLORER 16 DEVELOPMENT
BOARD USER’S GUIDE

Tabl e of Conten ts

Preface ........................................................................................................................... 1
Chapter 1. Introducing the Explorer 16 Development Board
1.1 Introduction ..................................................................................................... 7
1.2 Highlights ........................................................................................................ 7
1.3 What’s in the Kit ............................................................................................. 7
1.4 Explorer 16 Development Board Functionality and Features ......................... 8
1.5 Using the Explorer 16 Out of the Box ............................................................. 9
1.6 Explorer 16 Development Board Demonstration Programs ......................... 10
1.7 Reference Documents .................................................................................. 10
Chapter 2. Explorer 16 Programming Tutorial
2.1 Introduction ................................................................................................... 11
2.2 Highlights ...................................................................................................... 11
2.3 Tutorial Overview ......................................................................................... 11
2.4 Creating the Project ...................................................................................... 12
2.5 Building The Code ........................................................................................ 16
2.6 Programming the Device .............................................................................. 19
Chapter 3. Explorer 16 Tutorial Programs
3.1 Introduction ................................................................................................... 23
3.2 PIC24 Tutorial Program Operation ............................................................... 23
3.3 dsPIC33F Tutorial Program Operation ......................................................... 25
Chapter 4. Explorer 16 Development Hardware
4.1 Introduction .................................................................................................. 27
4.2 Hardware Features ....................................................................................... 27
Appendix A. Explorer 16 Development Board Schematics
A.1 Introduction .................................................................................................. 33
A.2 Development Board Block Diagram ............................................................. 33
A.3 Development Board Schematics .................................................................. 34
Appendix B. Updating the USB Connectivity Firmware
B.1 Introduction .................................................................................................. 43
B.2 Updating the PICkit 2 Microcontroller Programmer ..................................... 43
B.3 Other USB Firmware Updates ..................................................................... 44
Index ............................................................................................................................. 45
Worldwide Sales and Service .................................................................................... 46
© 2005 Microchip Technology Inc. DS51589A-page iii
Explorer 16 Development Board User’s Guide
NOTES:
DS51589A-page iv © 2005 Microchip Technology Inc.
EXPLORER 16 DEVELOPMENT
BOARD USER’S GUIDE

Preface

NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document.
For the most up-to-date information on development tools, see the MPLAB Select the Help menu, and then Topics to open a list of available on-line help files.

INTRODUCTION

®
IDE on-line help.
This chapter contains general information that will be useful to know before using the Explorer 16 Development Board. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History

DOCUMENT LAYOUT

This document describes how to use the Explorer 16 Development Board as a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. “Introducing the Explorer 16 Development Board” provides a brief overview of the Explorer 16 Development Board, its features and its uses.
Chapter 2. “Explorer 16 Programming Tutorial” provides step-by-step instructions for using MBLAB
Chapter 3. “Explorer 16 Tutorial Programs” describes the demonstration program created in Chapter 2. “Explorer 16 Programming Tutorial”.
Chapter 4. “Explorer 16 Development Hardware” provides a more detailed description of the Explorer 16 board’s hardware features.
Appendix A. “Explorer 16 Development Board Schematics” provides a block diagram and detailed schematics of the Explorer 16 board.
Appendix B. “Updating the USB Connectivity Firmware” describes how to upgrade the Explorer 16 board’s USB connectivity subsystem.
®
IDE to create a project and program the Explorer 16 board.
© 2005 Microchip Technology Inc. DS51589A-page 1

CONVENTIONS USED IN THIS GUIDE

This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books
Initial caps A window the Output window
Quotes A field name in a window or
Underlined, italic text with right angle bracket
Bold characters A dialog button Click OK
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [ ] Optional arguments mcc18 [options] file
Curly brackets and pipe character: { | }
Ellipses... Replaces repeated text var_name [,
Preface
MPLAB® IDE User’s Guide
Emphasized text ...is the
A dialog the Settings dialog A menu selection select Enable Programmer
“Save project before build”
dialog A menu path
A tab Click the Power tab
Filenames autoexec.bat
File paths c:\mcc18\h Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1 Constants (in source code) 0xFF, ‘A’
Choice of mutually exclusive arguments; an OR selection
Represents code supplied by user
File>Save
any valid filename
[options]
errorlevel {0|1}
var_name...]
void main (void) { ... }
only
compiler...

WARRANTY REGISTRATION

Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are available at the Microchip web site.
© 2005 Microchip Technology Inc. DS51589A-page 2
Explorer 16 Development Board User’s Guide

RECOMMENDED READING

This user’s guide describes how to use the Explorer 16 Development Board. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources.
Readme for the Explorer 16 Development Board
For the latest information on using the Explorer 16 Development Board, read the Readme for Explorer 16 Development Board.txt file (an ASCII text file) at the root level of the Explorer 16 CD-ROM. The Readme file contains update information and known issues that may not be included in this user’s guide.
Readme Files
For the latest information on using other tools, read the tool-specific Readme files in the Readmes subdirectory of the MPLAB IDE installation directory. The Readme files contain update information and known issues that may not be included in this user’s guide.
PIC24FJ128GA010 PS Data Sheet (DS39756) and PIC24FJ128GA Family Data Sheet (DS39747)
Consult this document for detailed information on the PIC24F general purpose, 16-bit devices. Reference information found in this data sheet includes:
• Device memory map
• Device pinout and packaging details
• Device electrical specifications
• List of peripherals included on the device
Note that document, DS39756, is for use only with the initial prototype samples of the PIC24F family. These devices are all marked with a “PS” suffix at the end of the device number. For all other PIC24FJ128GA family devices, including those with an “ES” suffix, use DS39747.
dsPIC33F Family Data Sheet (DS70165)
Consult this document for detailed information on the dsPIC33F Digital Signal Controllers. Reference information found in this data sheet includes:
• Device memory map
• Device pinout and packaging details
• Device electrical specifications
• List of peripherals included on the device
dsPIC30F Programmer’s Reference Manual (DS70030)
This manual is a software developer’s reference for all of Microchip’s 16-bit digital signal controllers. It describes the instruction set in detail and also provides general information to assist in developing software for PIC24 MCUs, dsPIC30F and dsPIC33F DSCs.
PIC24H Family Overview (DS70166)
This document provides an overview of the functionality of the new PIC24H product family. It helps determine how the PIC24H high-performance, 16-bit microcontrollers fit a specific product application.
DS51589A-page 3 © 2005 Microchip Technology Inc.
MPLAB® C30 C Compiler User’s Guide (DS51284)
This document details the use of Microchip’s MPLAB C30 C Compiler for dsPIC devices to develop an application. MPLAB C30 is a GNU-based language tool, based on source code from the Free Software Foundation (FSF). For more information about the FSF, see www.fsf.org.
Other GNU language tools available from Microchip are:
• MPLAB ASM30 Assembler
• MPLAB LINK30 Linker
• MPLAB LIB30 Librarian/Archiver
MPLAB
Consult this document for more information pertaining to the installation and implementation of the MPLAB Integrated Development Environment (IDE) software.
®
IDE Simulator, Editor User’s Guide (DS51025)

THE MICROCHIP WEB SITE

Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:
Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software
General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing
Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
Preface
®
© 2005 Microchip Technology Inc. DS51589A-page 4
Explorer 16 Development Board User’s Guide

DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE

Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest.
To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.
The Development Systems product group categories are:
Compilers – The latest information on Microchip C compilers and other language tools. These include the MPLAB C18 and MPLAB C30 C compilers; MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
Emulators – The latest information on Microchip in-circuit emulators.This includes the MPLAB ICE 2000 and MPLAB ICE 4000.
In-Circuit Debuggers – The latest information on the Microchip in-circuit debugger, MPLAB ICD 2.
MPLAB Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager and general editing and debugging features.
Programmers – The latest information on Microchip programmers. These include the MPLAB PM3 and PRO MATE PICSTART
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
®
Plus and PICkit™ 1 development programmers.
II device programmers and the

CUSTOMER SUPPORT

Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com

DOCUMENT REVISION HISTORY

Revision A (November 2005)
This is the initial release of this Document.
DS51589A-page 5 © 2005 Microchip Technology Inc.
NOTES:
Preface
© 2005 Microchip Technology Inc. DS51589A-page 6
EXPLORER 16 DEVELOPMENT
BOARD USER’S GUIDE

Chapter 1. Intr od ucin g the Explorer 16 Development Board

1.1 INTRODUCTION

Thank you for purchasing Microchip Technology’s Explorer 16 Development Board Kit. The development board provides a low-cost, modular development system for Microchip’s new line of 16-bit microcontroller families, including the PIC24, PIC24H and the 16-bit digital signal controller family, dsPIC33F.
As provided, the development board works as a demo board right from the box, and also has the ability to extend its functionality through modular expansion interfaces. The Explorer 16 board supports MPLAB ICD 2 for full emulation and debug capabilities, and also allows 3V controllers to interface with 5V peripheral devices.

1.2 HIGHLIGHTS

This chapter covers the following topics:
• What’s in the Kit
• Explorer 16 Development Board Functionality and Features
• Using the Explorer 16 Out of the Box
• Explorer 16 Development Board Demonstration Programs
• Reference Documents

1.3 WHAT’S IN THE KIT

The Explorer 16 Development Board Kit contains the following:
• The Explorer 16 Development Board.
• A preprogrammed PIC24FJ128GA010 Processor Installation Module (PIM), already installed to the board
• A preprogrammed dsPIC33FJ256GP710 PIM
• An RS-232 cable
• The Explorer 16 Development CD ROM, containing:
- This User’s Guide
- Data Sheets for the PIC24FJ128GA family and dsPIC33FJ256GP family
- Schematics and PCB drawing files for the PIM modules
- Example programs for use with the PIC24 and dsPIC33F devices
- Files detailing general purpose expansion boards that can be used with the
Explorer 16 board (provided in Gerber format)
If you are missing any part of the kit, please contact your nearest Microchip sales office, listed on the last page of this manual, for further assistance.
Note: The Explorer 16 Development Board has been designed to function prima-
rily from a permanently mounted PIC24FJ128GA010 device at position U1. Initial units will be shipped with U1 unpopulated and a PIC24FJ PIM of equal functionality mounted on the U1A headers instead. When using the PIC24FJ PIM or any other PIM, it is critical to verify that switch S2 always remains in the “PIM” position. See Section 4.2.1 “Processor Support” for more information.
© 2005 Microchip Technology Inc. DS51589A-page 7
Introducing the Explorer 16 Development Board

1.4 EXPLORER 16 DEVELOPMENT BOARD FUNCTIONALITY AND FEATURES

A layout of the Explorer 16 Development Board is shown in Figure 1-1. The board includes these key features, as indicated in the diagram:
1. 100-pin PIM riser, compatible with the PIM versions of all Microchip
PIC24F/24H/dsPIC33F devices
2. Direct 9 VDC power input that provides +3.3V and +5V (regulated) to the entire
board
3. Power indicator LED
4. RS-232 serial port and associated hardware
5. On-board analog thermal sensor
6. USB connectivity for communications and device programming/debugging
7. Standard 6-wire In-Circuit Debugger (ICD) connector for connections to an
MPLAB ICD 2 programmer/debugger module
8. Hardware selection of PIM or soldered on-board microcontroller
(in future versions)
9. 2-line by 16-character LCD
10. Provisioning on PCB for add on graphic LCD
11. Push button switches for device Reset and user-defined inputs
12. Potentiometer for analog input
13. Eight indicator LEDs
14. 74HCT4053 multiplexers for selectable crossover configuration on serial com-
munication lines
15. Serial EEPROM
16. Independent crystals for precision microcontroller clocking (8 MHz) and RTCC
operation (32.768 kHz)
17. Prototype area for developing custom applications
18. Socket and edge connector for PICtail™ Plus card compatibility
19. Six-pin interface for PICkit 2 Programmer
20. JTAG connector pad for optional boundary scan functionality
For additional details on these features, refer to Chapter 4. “Explorer 16 Development
Hardware”.

1.4.1 Sample Devices Included with the Development Kit

Each Explorer 16 Development Board Kit contains two preprogrammed 16-bit devices: a PIC24FJ128GA010 and a dsPIC33FJ256GP710. These are provided as 100-pin PIMs on riser sockets, which can be quickly installed on pin header U1A and exchanged as needed.
Note: As Microchip’s 16-bit portfolio develops, alternate devices may be included
with the Explorer 16 Development Board Kit. It is anticipated that one device each of the PIC24 and dsPIC33F families will always be included. Also in the future, the included PIC24 device will be soldered onto the board and only the dsPIC33F device will be provided as a PIM.
© 2005 Microchip Technology Inc. DS51589A-page 8
Explorer 16 Development Board User’s Guide
FIGURE 1-1: EXPLORER 16 DEVELOPMENT BOARD LAYOUT
10
9
8
7
6
5
4
3
2
11 1412 13 15
1
16
17
18
19
20

1.5 USING THE EXPLORER 16 OUT OF THE BOX

Although intended as a development platform, the Explorer 16 board may also be used directly from the box as a demonstration board for PIC24 and dsPIC33F devices. The programs discussed in Chapter 3. “Explorer 16 Tutorial Programs” are preprogrammed into the sample device PIMs (i.e., PIC24ExplDemo.hex for the PIC24 device and dsPIC33ExplDemo.hex for the dsPIC33F device) and are ready for immediate use.
To get started with the board:
1. For Explorer 16 boards without a permanently mounted PIC24FJ device: verify that the PIC24FJ128GA010 PIM is correctly installed onto the board. If you want to use the dsPIC dsPIC33F PIM in its place. For all PIMs, be certain to align the PIM so the notched corner marking is oriented in the upper left corner.
2. For Explorer 16 boards without a permanently mounted PIC24FJ device: verify that switch S2 is set in the “PIM” position. For Explorer 16 boards with a permanently mounted PIC24FJ device: verify that switch S2 is set in the “PIC” position.
3. Verify that the jumper on JP2 is installed (to enable the LEDs).
4. Apply power to the board (9 VDC) at power input J2. For information on accept­able power sources, see Appendix A. “Explorer 16 Development Board Schematics”.
Refer to Chapter 3. “Explorer 16 Tutorial Programs” for details on the demonstration code operation.
®
device PIM, carefully remove the PIC24 PIM and install the
DS51589A-page 9 © 2005 Microchip Technology Inc.
Introducing the Explorer 16 Development Board
FIGURE 1-2: EXPLORER 16 PIM MODULE, SHOWING NOTCHED CORNER
MARKING
PIC24FJ128GA010

1.6 EXPLORER 16 DEVELOPMENT BOARD DEMONSTRATION PROGRAMS

The preprogrammed example code on the PIMs has been included on the Explorer 16 CD-ROM for future reference. All project files have been included, so that the code may be used directly to restore a PIM to its original state (i.e., if the sample device has been reprogrammed with another program), or so the user may use the tutorial code as a platform for further experimentation.
In addition, the CD-ROM contains sample demonstration programs for both PIC24 and dsPIC33F family devices. Separate demo source code (as files in C) and compiled code files (in Hex) are provided for each family. These may be used with the included PIC24 and dsPIC33F PIMs by reprogramming the devices using MPLAB ICD 2.

1.7 REFERENCE DOCUMENTS

In addition to the documents listed in the “Recommended Reading” section, these documents are also available from Microchip to support the use of the Explorer 16 Development Board:
PIC18F2455/2550/4455/4550 Data Sheet
TC1047/TC1047A Data Sheet
25AA256/25LC256 Data Sheet
PICkit™ 2 Microcontroller Programmer User’s Guide MPLAB® ICD 2 In-Circuit Debugger Quick Start Guide
PRO MATE® II User’s Guide
You can obtain these reference documents from your nearest Microchip sales office (listed in the back of this document) or by downloading them from the Microchip web site (www.microchip.com).
(DS39632)
(DS21498)
(DS21822)
(DS51553)
(DS51268)
(DS30082)
© 2005 Microchip Technology Inc. DS51589A-page 10

Chapter 2. Explorer 16 Programming Tutorial

2.1 INTRODUCTION

This chapter is a self-paced tutorial to get you started using the Explorer 16 Development Board.

2.2 HIGHLIGHTS

Items discussed in this chapter include:
• Tutorial Overview
• Creating the Project
• Building the Code
• Programming the Device

2.3 TUTORIAL OVERVIEW

The tutorial in this chapter demonstrates the main features of the MPLAB IDE and MPLAB ICD 2 as they are used with the Explorer 16 Development Board. As pre­sented, it is designed for use with the PIC24FJ128GA010 specifically. However, the same procedures and toolsuites can also be used with PIC24H or dsPIC33F devices.
The PIC24 tutorial project demonstrated here, PIC24ExplDemo.mcp, is written in C for MPLAB C30. The program displays PIC24 features on the alphanumeric LCD, and also displays voltage, temperature and date/time as the various buttons are pressed. Described with the PIC24 project is the dsPIC device tutorial, Example1_RTC_LED_ADC.mcp. It is also written in C for MPLAB C30. The program displays voltage and current time, updating the display on command. Both programs are described in more detail in Chapter 3. “Explorer 16 Tutorial Programs”.
For either project, the source file (PIC24ExplDemo.c or main_rtc.c for PIC24 or dsPIC33F, respectively) is used with a linker script file (p24fj128ga010.gld or
p33fj256gp710ps.gld) and header file (p24fj128ga010.h or p33fj256gp710ps.h) to form a complete project. While these simple projects use a
single source code file, more complex projects might use multiple assembler and compiler source files, as well as library files and precompiled object files.
Upon completing this tutorial, you should be able to:
• Create a project using the Project Wizard
• Assemble and link the code and set the Configuration bits
• Set up MPLAB IDE to use the MPLAB ICD 2
• Program the chip with the MPLAB ICD 2
There are three steps to this tutorial:
1. Creating a project in MPLAB IDE.
2. Assembling and linking the code.
3. Programming the chip with the MPLAB ICD 2.
EXPLORER 16 DEVELOPMENT
BOARD USER’S GUIDE
© 2005 Microchip Technology Inc. DS51589A-page 11
+ 35 hidden pages