PICDEM System Mgmt User Guide Datasheet by Microchip Technology

6‘ MICRDCHIP
PICDEM™ System Management
USER’S GUIDE
© 2007 Microchip Technology Inc. DS41304B
QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV = ISO/TS 16949:2002 =
PICDEM SYSTEM MANAGEMENT
DS41304B-page ii © 2007 Microchip Technology Inc.
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
WARRANTIES 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
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
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.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona, Gresham, Oregon and Mountain View, California. The
Company’s quality system processes and procedures are for its PIC®
MCUs and dsPIC® DSCs, KEELOQ® code hopping 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.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, KEELOQ, KEELOQ logo, 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, Linear Active Thermistor, Migratable
Memory, MXDEV, MXLAB, PS logo, 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, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, ECAN,
ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi,
MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartTel, Total
Endurance, UNI/O, WiperLock and ZENA 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.
© 2007, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page iii
Table of Contents
Preface ........................................................................................................................... 1
Chapter 1. PICDEM™ System Management
1.1 Introduction ..................................................................................................... 7
1.2 Highlights ........................................................................................................ 7
1.3 PICDEM™ System Management Kit Contents .............................................. 7
1.4 PICDEM System Management Layout ........................................................... 8
1.4.1 Board Features ............................................................................................ 8
1.4.2 Board Connections ...................................................................................... 8
1.4.3 Heating Element ........................................................................................ 10
1.4.4 Board Options ........................................................................................... 10
1.5 Quick Start Guide ......................................................................................... 10
1.5.1 Demonstration Program ............................................................................ 10
1.5.2 Real-Time Clock: Address 0xA2 ................................................................ 11
1.5.3 Analog-to-Digital Converter (ADC): Address 0xA4 .................................... 11
1.5.4 Serial EEPROM: Address 0xA8 ................................................................ 12
1.5.5 Thermal Management: Address 0xA6 ....................................................... 12
1.5.6 General I2C™ ............................................................................................ 13
Chapter 2. Background
2.1 Introduction ................................................................................................... 15
2.2 Highlights ...................................................................................................... 15
2.3 PICDEM™ System Management and PICkit™ Serial Analyzer .................. 15
2.4 Fan Speed Control ....................................................................................... 15
2.4.1 Two-wire Fan ............................................................................................. 15
2.4.2 Three-wire Fan .......................................................................................... 16
2.4.3 Measuring the Speed of a Two and Three-wire Fan ................................. 16
2.4.4 Four-wire Fan Control ...............................................................................17
Chapter 3. Troubleshooting
3.1 Introduction ................................................................................................... 19
3.2 Common Problems ....................................................................................... 19
3.2.1 Serial Communications does not appear to be working ............................ 19
3.2.2 Microcontroller does not run after programming using the
MPLAB® ICD 2 ...................................................................................... 19
3.2.3 The fan is not providing proper feedback .................................................. 19
3.2.4 Heating element is not heating .................................................................. 19
3.2.5 Temperature is not changing ..................................................................... 19
PICDEM™ System Management User’s Guide
DS41304B-page iv © 2007 Microchip Technology Inc.
Appendix A. Hardware Schematics
A.1 Introduction .................................................................................................. 21
Appendix B. Register Maps
B.1 Introduction .................................................................................................. 23
Worldwide Sales and Service .....................................................................................28
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 1
Preface
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PICDEM System Management 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 PICDEM System Management Board as a
demonstration and training platform tool. The manual layout is as follows:
Chapter 1. “PICDEM™ System Management” – This chapter provides an over-
view of the PICDEM System Management Board and system integration.
Chapter 2. “Background” – This chapter provides background information on
the System Management application and the PICDEM System Management
Board.
Chapter 3. “Troubleshooting” – This chapter provides resolutions for solving
common problems associated with using the PICDEM System Management
Board.
Appendix A. “Hardware Schematics” – Illustrates the PICDEM System
Management Board hardware schematic diagram.
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® IDE on-line help.
Select the Help menu, and then Topics to open a list of available on-line help files.
FIIe>Sa vs
PICDEM™ System Management User’s Guide
DS41304B-page 2 © 2007 Microchip Technology Inc.
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books “MPLAB® IDE User’s Guide”
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or
dialog “Save project before build
Underlined, italic text with
right angle bracket A menu path File>Save
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
4‘b0010, 2‘hF1
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, ‘A’
Italic Courier New A variable argument file.o, where file can be
any valid filename
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe
character: { | } Choice of mutually exclusive
arguments; an OR selection
errorlevel {0|1}
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by
user
void main (void)
{ ...
}
Preface
© 2007 Microchip Technology Inc. DS41304B-page 3
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.
RECOMMENDED READING
This user's guide describes how to use the PICDEM System Management Board.
Other useful documents are listed below. The following Microchip documents are avail-
able and recommended as supplemental reference resources. To obtain these docu-
ments, contact the nearest Microchip sales location (see back page). These documents
are also available on the Microchip web site at: www.microchip.com.
PICkit Serial Analyzer User’s Guide (DS51647)
Consult this document for information how to use the PICkitSerial Analyzer. (This
document is included with the PICDEM System Management Board kit.)
PICkit 2 Microcontroller Programmer User’s Guide (DS51553)
Consult this document for instructions on how to use the PICkit 2 Microcontroller
Programmer software and hardware.
MPLAB® IDE, Simulator, Editor Users Guide (DS51025)
Consult this document for more information pertaining to the installation and features
of the MPLAB Integrated Development Environment (IDE) Software.
PIC16F886 Data Sheet (DS41291)
Consult this document for information regarding the PIC16F886 28/40/44-Pin
Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology device
specifications.
MCP9700/9700A/9701/9701 Low-Power Linear Active Thermistor™ ICs
(DS21942)
Consult this document for information regarding the MCP9700 Analog Temperature
Sensor.
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 updated information and known issues that may not be included in this user’s
guide.
PICDEM™ System Management User’s Guide
DS41304B-page 4 © 2007 Microchip Technology Inc.
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
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, MPLAB ICE 4000 and REAL ICE™.
In-Circuit Debuggers – The latest information on the Microchip in-circuit
debugger, MPLAB ICD 2.
MPLAB® IDE – The latest information on Microchip MPLAB IDE, the Windows®
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® II device programmers and the PICSTART®
Plus and PICkit 2 development programmers.
Preface
© 2007 Microchip Technology Inc. DS41304B-page 5
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
Distributor or Representative
Local Sales Office
Field Application Engineer (FAE)
Technical Support
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 (December 2006)
Initial release of this document.
Revision B (January 2007)
Updated Chapter 1.
Updated Preface by adding the PICkit™ Serial Analyzer User Guide DS number.
TROUBLESHOOTING
See Chapter 3. “Troubleshooting” for information on common problems.
PICDEM™ System Management User’s Guide
DS41304B-page 6 © 2007 Microchip Technology Inc.
NOTES:
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 7
Chapter 1. PICDEM System Management
1.1 INTRODUCTION
The PICDEM™ System Management Board is a demonstration and development tool
designed for system management applications. System management applications
monitor platform physical health characteristics such as temperatures, voltage, fan
speed and chassis intrusion. These applications typically utilize independent I2C™
devices like real-time clocks, EEPROMs, Analog-to-Digital Converters (ADC), and
thermal management controllers to monitor and control physical health characteristics.
The PICDEM™ System Management Board demonstrates how PIC® microcontrollers
can add value to these applications in terms of flexibility and cost. I2C devices can be
implemented using the Synchronous Serial Port module in conjunction with the many
other available peripherals. The programmability of a microcontroller I2C device allows
flexibility in the additional intelligent features that can be implemented as well as the
easy adaptability of software when requirements change. A new address masking
feature of the Syncronous Serial Port module allows the microcontroller to respond to
multiple I2C device addresses. The PICDEM™ System Management uses this feature
to implement four I2C devices: a real-time clock, ADC, EEPROM, and thermal manage-
ment controller on one single microcontroller. Integrating these functions on a single
microcontroller provides savings in the bill of materials cost and board space. For
additional information on system monitoring, see Chapter 2. “Background” of this
User's Guide.
1.2 HIGHLIGHTS
This chapter discusses the features of the PICDEM™ System Management Board Kit.
Topics discussed include:
PICDEM™ System Management Kit Contents
PICDEM™ System Management Layout
Quick Start Guide
Demonstration Program
1.3 PICDEM™ SYSTEM MANAGEMENT KIT CONTENTS
The PICDEM™ System Management kit includes the following items:
1. The PICDEM™ System Management printed circuit board with 3-wire fan
2. The PICkit™ Serial Analyzer
3. PICDEM™ System Management CD-ROM, which includes:
a) PICDEM™ System Management User’s Guide
b) PICDEM™ System Management GUI
c) PICDEM™ System Management Board schematic
d) PICDEM™ System Management Source Code
e) PICDEM™ System Management Workshop slides
4. PICkit™ Serial Analyzer CD-ROM
5. +12V power supply
If you are missing any part of the kit, please contact your nearest Microchip sales office
listed in the back of this publication for help.
O O F svsrzn mmmm Mmmm uoaoouoooo ooaoaaoaoo E O o o ”a o o E! /
PICDEM™ System Management User’s Guide
DS41304B-page 8 © 2007 Microchip Technology Inc.
1.4 PICDEM SYSTEM MANAGEMENT LAYOUT
1.4.1 Board Features
The PICDEM™ System Management board is populated with a PIC16F886
microcontroller. The PIC16F886 connects to the following board features:
•MCLR
switch, interrupt switch
•4 LEDs
•I
2C communications (SDA and SCL)
USART communications (TX and RX)
ICSP™ programming pins (ICSPDAT and ICSPCLK)
PWM output fan control
Fan tachometer input line
Heating element control line
Temperature sensor input line from MCP9700
32.768 kHz crystal clock (T1OSO and T1OSI)
Battery voltage measurement enable, input line and interrupt-on-change pin
1.4.2 Board Connections
The PICDEM™ System Management is populated with connectors for programming,
communications, and fan control and a temperature sensor, shown in Figure 1-1. A
description of the connectors and the temperature sensor is described below.
FIGURE 1-1: PICDEM™ SYSTEM MANAGEMENT BOARD
PICkitTM 2 ICSPTM
Connector
PICkitTM Serial
Analyzer Connector
Three-Wire
Fan Connector Four-Wire
Fan Connector
Temperature
Sensor
Two-Wire
Fan Connector
PICDEM™ System Management
© 2007 Microchip Technology Inc. DS41304B-page 9
PICkit™ 2 ICSP™ (In-Circuit Serial Programmer™) Connector – A 6-pin ICSP
connector is provided for programming the PIC16F886. The PIC16F886 can be
programmed through this connector with the PICkit 2 programmer, or the MPLAB
ICD 2 using the RJ-11 to ICSP adapter (AC164110).
PICkit™ Serial Analyzer Connector – The PICkit™ Serial Analyzer connector
provides pins for serial communication. The serial communications lines are
designed to be used with the PICkit Serial Analyzer, but can also be used for other
communications applications. The serial communication pinout lines are shown in
Figure 1-2.
FIGURE 1-2: PICkit™ SERIAL ANALYZER PINOUT
Two-Wire Fan Connector – The two-wire fan connector (P204) provides power
and ground terminals for a two-wire fan. In order to make speed measurements,
jumper JP200 must be set in the “SENSE” position for two-wire fans.
Three-Wire Fan Connector – The three-wire fan (P203) connector provides
power and ground with a tachometer line for speed measurements. Jumper
JP201 must be set in the “TACH” position to measure speed on three-wire fans.
Additional background on driving two-wire and three-wire fans is provided in
Section Chapter 2. “Background” of this document.
Four-Wire Fan Connector – A four-wire fan connector (P205) is mounted on the
board and provides power, ground, tachometer and pulse-width modulation termi-
nals. In order to measure the speed of the four-wire fan, the JP201 jumper must
be set to the “TACH” position. Additional background information on driving
four-wire fans is provided in Section Chapter 2. “Background” of this
document.
Temperature Sensor – An MCP9700 temperature sensor is located near the
heating element of the PICDEM System Management Board. The MCP9700 is an
analog temperature sensor that converts temperature into an analog voltage. In
order to measure temperature, the JP202 jumper must be set to the “MCP9700”
position.
Temperature can also be simulated with the potentiometer that is populated on the
board. The circuit has been designed so that the temperature range of the MCP9700
can be simulated. In order to simulate temperature with the potentiometer, the JP202
jumper must be set to the “POT” position.
123456
TX +5V GND SDA SCL RX
PICDEM™ System Management User’s Guide
DS41304B-page 10 © 2007 Microchip Technology Inc.
1.4.3 Heating Element
A resistor is used as a heating element to generate heat near the MCP9700 tempera-
ture sensor to simulate a thermal system. To activate the heating element, set the
CTRL line (RA3) high. Once, the heating element is active, the ON LED will light up. In
order to operate the heating element, JP200, heater enable jumper, must be in place.
1.4.4 Board Options
The PICDEM™ System Management Board is scribed and can be separated into two
separate boards.
The fan control board contains the connectors for two, three and four-wire fans in addi-
tion to the control, power and ground lines for the heating element and temperature
sensor, as well as the fan drive circuitry.
The main board contains the PIC16F866, power input, push-buttons, LEDs, battery
backup circuit and connectors that break out the fan control, temperature sensor and
heating element pins. These elements can be used in conjunction with the prototyping
area for development.
1.5 QUICK START GUIDE
The PICDEM™ System Management Board is preloaded with demonstration firmware.
The board must be configured as described in this section in order to use the
demonstration program. For details on firmware, please review the System
Management presentation included on the CD-ROM.
Board Setup
1. Connect the 3-wire fan to the 3-wire fan connector labeled “3-wire”.
2. Place the JP201 jumper on the bottom setting, connecting “TACH” to the middle
pin.
3. Connect the J200 jumper to allow the heating element to be turned on.
4. Plug the PICkit Serial Analyzer into the PICDEM System Management Board on
the pins marked “PICkit Serial” (P104).
5. Plug the PICkit Serial Analyzer USB cable into a compatible PC.
Board Power-Up
Connect the provided +12V power supply to J100.
1.5.1 Demonstration Program
1. Insert the included PICDEM System Management CD into the CD drive.
2. Run the installation software for the PICDEM System Management GUI
(D:\Setup\Setup.exe).
3. Run the System Management program (start <Programs<Microchip System
Management Board).
Within this screen there are several tabs that allow control and monitoring of various
functions.
WARNING
The heating element will be very hot when on. Do not activate the heating ele-
ment unless the fan is running. Always disconnect JP200 after use and allow
the heating element to cool.
WWWWMWLMWWHWWM Wanrueweam r” sa‘ 2725253u3“ 2 s 7 a a w u u u u ‘5 ‘5 u -23 28 29 an 5 s 1 v 222an :4 updah m: su to 5m". hm System Manaqzmnnt mm m rampeyammgem m Reanmmmkl mum ‘2: | —— l 1" IIEL'IEA
PICDEM™ System Management
© 2007 Microchip Technology Inc. DS41304B-page 11
1.5.2 Real-Time Clock: Address 0xA2
The Real-Time Clock function reads and writes actual time data on the PIC16F886.
The time base is generated using a 32.768 kHz external Timer1 crystal. This time is
automatically refreshed and can be changed in the GUI software.
FIGURE 1-3: REAL-TIME CLOCK
1.5.3 Analog-to-Digital Converter (ADC): Address 0xA4
The ADC function provides Analog-to-Digital conversion of the voltage drop through
potentiometer RP200. As you turn the potentiometer, the voltage indicator should
change. Jumper JP202 must connect to the middle pin and the pin labeled “POT.”
FIGURE 1-4: ANALOG-TO-DIGITAL CONVERTER (ADC)
“5.....mmgzmmam ”2 am: rampemmmnagememl AD: 7 WWW mm] 72: | nnm nzmmn5nsn7nananAnan:nDnE an 77 27 72 72 32 DE DE DE DE DE DE DE an an M) as us an 52 D7 95 n: :9 n7 :7: :D :77 as an m7 5: U] 777 2D :5 U7 33 U5 no 73 DE 7D 77: as as :75 7E an an EE nu D3 DB 53 6F BB E7 EA DE 53 E7 EE EB 77 an :n 72 7A DA DE EE an an 66 up 7D 7D 7: an an EE Au an an A: n2 an an an :77 6F an an an an DE 5A nu nu us an :2 7n DD DD :75 3o ED EA AE EE DE 7D E: EE F9 as a; sE EE SD FE s2 75 ED EE 5: DA E5 97 3: E7 :E E7 DD BS 87 EE E3 7: EB 3E El: EB E7 FE Ea a: EE AE EE E7 ED 7: ES DE ea an EE EE AD 77 DD 77 RE E7 EA DE 53 E7 EE EB 77 Du so 72 7a :75 78 an 7777 as on EU an F5 DE 7777 7777 ED FE DA 7777 an EE EE DD :77 87 3o m 2A A5 nu nA an 53 7n 74 m 27 D9 D5 77 an an 77 RF SE SE gaaaaasaa naaaammdaaaaaamm Wm: to EE Eleal D-splw “mum,"agznmmnam Wemmemagemem AD: ‘RedT7m:E7a:k|EEPREIM|7ZE |
PICDEM™ System Management User’s Guide
DS41304B-page 12 © 2007 Microchip Technology Inc.
1.5.4 Serial EEPROM: Address 0xA8
The serial EEPROM function allows EEPROM memory to be read and written. The
data shown is the actual data that is written on the PIC MCU data EEPROM.
FIGURE 1-5: SERIAL EEPROM
1.5.5 Thermal Management: Address 0xA6
The Temperature Management function provides control over fan controller settings.
The fan speed output is based on upper and lower temperature set points and ambient
temperature. See how adjusting these temperature set points and ambient temperature
affect fan speed. In order to measure ambient temperature, JP202 must connect the
middle pin to the pin labeled “MCP9700.” The JP202 jumper can also be moved to con-
nect the POT pin to the middle pin. This can allow the sweeping of temperatures in the
full range of temperature values.
FIGURE 1-6: THERMAL MANAGEMENT
umpemmyeMamgmml ADE | Rnnmecmkl mm ‘2: E_I_IJE_I_IE m- E_l_l Eli m-
PICDEM™ System Management
© 2007 Microchip Technology Inc. DS41304B-page 13
1.5.6 General I2C
The I2C function is an interface that allows master control of an I2C bus. Locate the
Read section of the I2C Tab. A Read command can be executed by filling the “Slave
Address [W]” field with the address of the device to be read. The “Word Address” field
should be filled with the word address of the device to be read. Finally, the “Byte Count”
field should be filled with the number of bytes to be read. The results of the command
will be output on the screen to the left.
Locate the write section of the I2C Tab. A Write command is executed by filling the
“Slave Address [W]” field with the address of the device to be written. The word address
of the first byte to be written should be entered into the “Word Address” field. A single
byte or multiple bytes of data can be filled in the data fields. The results will be shown
on the screen to the left. See Appendix Table B-1 through Table B-4 for device address
and word address details.
FIGURE 1-7: I2C™
PICDEM™ System Management User’s Guide
DS41304B-page 14 © 2007 Microchip Technology Inc.
NOTES:
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 15
Chapter 2. Background
2.1 INTRODUCTION
This chapter provides background information on the System Management application
and the PICDEM System Management Board. It also provides background information
on the fan drive circuitry that is available on the board. Additional detailed information
can be found in the PICDEM System Management presentation and source code
included on the CD-ROM.
2.2 HIGHLIGHTS
Topics covered in this chapter include:
PICDEM™ System Management Board and PICkit™ Serial Analyzer
Fan Speed Control
2.3 PICDEM™ SYSTEM MANAGEMENT AND PICKIT™ SERIAL ANALYZER
The PICDEM™ System Management emulates four I2C peripherals usually found on
a system management bus. The real-time clock, ADC, serial EEPROM and thermal
management controller peripherals, typically reside on the I2C bus line of rack-mount
servers and motherboards. The PIC16F886 integrates the functions of each device on
the I2C communications bus, while responding to the specific address calls for each
device.
The PICkit Serial Analyzer is a utility that allows control and monitoring of the I2C bus.
It is able to generate the specific device calls and interpret data. This data can then be
translated to a personal computer and can be interacted with through a graphical user
interface. In the PICDEM™ System Management Board, the PICkit Serial Analyzer
takes the place of the bus master that manages the devices on the I2C bus.
2.4 FAN SPEED CONTROL
2.4.1 Two-wire Fan
Two-wire fans provide power and ground terminals. The fan can be controlled through
low-speed (10-100 Hz) PWM.
As the duty cycle of the PWM signal increases, fan speed increases non-linearly. Fan
speed feedback can be determined by measuring the time between commutation pulse
noise that is generated on each revolution of the fan. Low-speed PWM can be
generated by PIC microcontrollers using the Enhanced Capture/Compare/PWM
module. Speed can be measured with comparator and timer peripherals.
Note: Be sure to verify with the fan manufacturer that the fan specifications allow
for PWM control of input voltage.
j: PWM Pulse Stretch Ideal Actual '— :fiS
PICDEM™ System Management User’s Guide
DS41304B-page 16 © 2007 Microchip Technology Inc.
2.4.2 Three-wire Fan
FIGURE 2-1: THREE-WIRE
Three-wire fans provide a power, ground and tachometer terminals. The tachometer
signal is typically generated by an internal Hall sensor that monitors magnetic field
switching due to rotation in the permanent magnet of the fan. These fans can also be
controlled through low-speed (10-100 Hz) PWM control of power input.
As the duty cycle of the PWM signal increases, the fan speed will also increase
non-linearly. Speed feedback is measured in the same way as the two-wire fan, but the
tachometer output of the fan on the third wire provides a square wave through an open
drain output.
2.4.3 Measuring the Speed of a Two and Three-wire Fan
It is important to note that when measuring speed on two and three-wire fans, some
additional conditions must be taken into account. The tachometer measurements are
only valid when fan power is on. Commutation noise is only measurable when power
is on and the Hall sensor output in three-wire fan is only valid when power is on. When
the PWM signal switches low, the Hall sensor output is no longer valid. Therefore, a
technique called pulse stretching must be employed to ensure accurate measure-
ments. Whenever a measurement is made, power must be provided to the fan for the
duration of the measurement. (See figure below for more details.)
FIGURE 2-2: PULSE STRETCHING
Note: Be sure to verify with the fan manufacturer that the fan specifications allow
for PWM control of input voltage.
Background
© 2007 Microchip Technology Inc. DS41304B-page 17
2.4.4 Four-wire Fan Control
Four-wire fan control provides a PWM input, tachometer output, fan power and ground.
Instead of switching fan power, which must be done with two and three-wire fans, only
the PWM input line is switched (typically at 10 kHz–30 kHz). As duty cycle of the fan
increases, speed also increases non-linearly. The tachometer line is the same as the
three-wire fan, generating pulses based on the rotation of the permanent magnet of the
fan; however, the Hall sensor is always on. Therefore, PWM stretching is not needed
to ensure an accurate measurement.
PICDEM™ System Management User’s Guide
DS41304B-page 18 © 2007 Microchip Technology Inc.
NOTES:
6‘ MICROCHIP
PICDEM SYSTEM MANAGEMENT®
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 19
Chapter 3. Troubleshooting
3.1 INTRODUCTION
This chapter describes common problems and resolutions associated with using the
PICDEM System Management Board.
3.2 COMMON PROBLEMS
3.2.1 Serial Communications does not appear to be working
Reset the PICDEM System Management Board by pressing the SW100 switch labeled
“MCLR.”
The PICkit Serial Analyzer must be connected to header P104 labeled “PICkit Serial.”
Ensure that the board is being powered by a 12 VDC power supply.
3.2.2 Microcontroller does not run after programming using the
MPLAB® ICD 2
When using the MPLAB ICD 2 as a programmer, the microcontroller will not run unless
you disconnect the MPLAB ICD 2 or release the MPLAB ICD 2 from Reset.
3.2.3 The fan is not providing proper feedback
The 3-wire fan provides a tachometer output on the SENSE line. Ensure that the JP201
jumper connects to the center and “TACH” pins.
3.2.4 Heating element is not heating
Check to see that the heater is enabled. The heater should be on if the CTRL line is
high. If you are using the System Management GUI, ensure in the Temperature
Management Tab that the checkbox “Heater On” is checked.
Check to ensure that the “Heater Enable” jumper JP200 is in place.
3.2.5 Temperature is not changing
Check JP202 and ensure that it is connected to center pin and pin labeled MCP9700.
PICDEM System Management® User’s Guide
DS41304B-page 20 © 2007 Microchip Technology Inc.
NOTES:
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 21
Appendix A. Hardware Schematics
A.1 INTRODUCTION
This appendix contains the PICDEM™ System Management Board hardware
diagrams.
FIGURE A-1: SCHEMATIC SHEET 1
2:200 lflKn ~—{I‘ ‘ MWWMFUU REES mm LUAD J. I ma I. ,5 a; a, 2251 m HEATEK ENAELE JVZnn Etna n ezna mK pann
PICDEM™ System Management User’s Guide
DS41304B-page 22 © 2007 Microchip Technology Inc.
FIGURE A-2: SCHEMATIC SHEET 2
6‘ MICROCHIP
PICDEM™ SYSTEM MANAGEMENT
USERS GUIDE
© 2007 Microchip Technology Inc. DS41304B-page 23
Appendix B. Register Maps
B.1 INTRODUCTION
This appendix contains the register maps for all of the emulated I2C devices.
TABLE B-1: REAL-TIME CLOCK CALENDAR: 0XA2
REG NAME DESCRIPTION
0x00 CONFIG 1 7: 0
6: 0
5: STOP – stop time function 0: RUN, 1: STOP)
4: 0
3: 0
2: 0
1: 0
0: 0
0x01 CONFIG 2 7: 0
6: 0
5: 0
4: 0
3: AF – Alarm flag
2: 0
1: AE – Alarm enable
0: 0
0x02 SECONDS 00-59 seconds, coding: BCD
0x03 MINUTES 00-59 minutes, coding: BCD
0x04 HOURS 00-23 hours, coding: BCD
0x05 WEEKDAYS 00-06 weekday
0x06 DAYS 01-31 day of the month
0x07 MONTHS 01-12 month of the year, coding: BCD
0x08 YEARS 00-99 year, coding: BCD
0x09 ALARM MIN 00-59 minute of alarm, coding: BCD
bit 7: enable
0x0A ALARM HOUR 00-23 hour of alarm, coding: BCD
bit 7: enable
0x0B ALARM DAY 01-31 day of alarm, coding BCD
bit 7: enable
0x0C ALARM WEEK 00-06 weekday of alarm
bit 7: enable
0x0D (not assigned)
0x0E (not assigned)
0x0F (not assigned)
PICDEM™ System Management User’s Guide
DS41304B-page 24 © 2007 Microchip Technology Inc.
TABLE B-2: ANALOG-TO-DIGITAL CONVERTER: 0XA4
TABLE B-3: THERMAL CONTROLLER: 0XA6
REG NAME DESCRIPTION
0x00 ADC High Byte B '0 0 0 0 9 8 7 6'
Voltage (V) = [(ADC High Byte:ADC Low Byte/4) * 2.5 / 1023]
0x01 ADC Low Byte B '5 4 3 2 1 0 x x
Voltage (V) = [(ADC High Byte:ADC Low Byte/4) * 2.5 / 1023]
REG NAME DESCRIPTION
0x00 Temperature High Byte Ambient Temperature (degC) = [(Temperature High
Byte:Temperature Low Byte)/1023 * 2.5 - .50] / .010
0x01 Temperature Low Byte
0x02 Duty Cycle High Byte High Time of PWM
High Time = (Duty Cycle High Byte:Duty Cycle Low
Byte) / 32768
Duty Cycle = High Time / Period High:Period Low
0x03 Duty Cycle Low Byte
0x04 Max. Output High Byte Maximum Duty Cycle Output (PWM High Time)
Max High Time = (Duty Cycle High Byte:Duty Cycle Low
Byte) / 32768
Duty Cycle = Max High Time / Period High:Period Low
0x05 Max. Output Low Byte
0x06 Min. Output High Byte Minimum Duty Cycle Output (PWM High Time)
Min High Time = (Duty Cycle High Byte:Duty Cycle Low
Byte) / 32768
Duty Cycle = Min High Time / Period High:Period Low
0x07 Min. Output Low Byte
0x08 Period High Byte Duty Cycle Period
Period = (Period High Byte: Period Low Byte) / 32768
0x09 Period Low Byte
0x0A Upper Temperature
High Byte Upper Temperature Set Point
Upper Temperature (degC) = [((Upper Temperature
High Byte:Upper Temperature Low Byte) / 1023)) - .50] /
.010
0x0B Upper Temperature
Low Byte
0x0C Lower Temperature
High Byte Lower Temperature Set Point
Lower Temperature (degC) = [((Lower Temperature
High Byte:Lower Temperature Low Byte) / 1023)) - .50] /
.010
0x0D Lower Temperature
Low Byte
0x0E Tach Speed High Byte Tachometer Measurement
Frequency = 32768 / Tach Speed High Byte: Tach
Speed Low Byte
RPM = (Frequency / 2) * 60
0x0F Tach Speed Low Byte
0x10 STATUS Bit <7:1> = 0
Bit 0 = Heating Element Enable (0 = Off, 1 = On)
Register Maps
© 2007 Microchip Technology Inc. DS41304B-page 25
TABLE B-4: SERIAL EEPROM: 0XA8
REG NAME DESCRIPTION
0x00-0xFF Data EEPROM Data Byte
PICDEM™ System Management User’s Guide
DS41304B-page 26 © 2007 Microchip Technology Inc.
NOTES:
© 2007 Microchip Technology Inc. DS41304B-page 27
PICDEM™ System Management Users Guide
NOTES:
Q ‘MICROCHIP
DS41304B-page 28 © 2007 Microchip Technology Inc.
AMERICAS
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
ASIA/PACIFIC
Asia Pacific Office
Suites 3707-14, 37th Floor
Tower 6, The Gateway
Habour City, Kowloon
Hong Kong
Tel: 852-2401-1200
Fax: 852-2401-3431
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
China - Fuzhou
Tel: 86-591-8750-3506
Fax: 86-591-8750-3521
China - Hong Kong SAR
Tel: 852-2401-1200
Fax: 852-2401-3431
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
China - Shunde
Tel: 86-757-2839-5507
Fax: 86-757-2839-5571
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
China - Xian
Tel: 86-29-8833-7250
Fax: 86-29-8833-7256
ASIA/PACIFIC
India - Bangalore
Tel: 91-80-4182-8400
Fax: 91-80-4182-8422
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Korea - Gumi
Tel: 82-54-473-4301
Fax: 82-54-473-4302
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
Malaysia - Penang
Tel: 60-4-646-8870
Fax: 60-4-646-5086
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
Taiwan - Hsin Chu
Tel: 886-3-572-9526
Fax: 886-3-572-6459
Taiwan - Kaohsiung
Tel: 886-7-536-4818
Fax: 886-7-536-4803
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
EUROPE
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
WORLDWIDE SALES AND SERVICE
12/08/06