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 Digit al Millennium Copyright Act. If suc h a c t s
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 t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, 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, fuzzy LAB,
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 T echnology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
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
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.
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.
®
IDE on-line help.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PICDEM
• 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 overview 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.
™
System Management Board. Items discussed in this chapter include:
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 available and recommended as supplemental reference resources. To obtain these documents, contact the nearest Microchip sales location (see back page). These documents
are also available on the Microchip web site at: www.microchip.com.
™
PICkit
Consult this document for information how to use the PICkit
document is included with the PICDEM System Management Board kit.)
PICkit
Consult this document for instructions on how to use the PICkit
Programmer software and hardware.
MPLAB
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.
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 listin g
• 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
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
Plus and PICkit
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
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.
Preface
TROUBLESHOOTING
See Chapter 3. “Troubleshooting” for information on common problems.
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 I
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
can add value to these applications in terms of flexibility and cost. I
implemented using the Synchronous Serial Port module in conjunction with the many
other available peripherals. The programmability of a microcontroller I
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 I
to implement four I
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.
PICDEM™ SYSTEM MANAGEMENT
USER’S GUIDE
2
C™
®
microcontrollers
2
C devices can be
2
C device allows
2
C device addresses. The PICDEM™ System Management uses this feature
2
C devices: a real-time clock, ADC, EEPROM, and thermal manage-
1.2HIGHLIGHTS
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.3PICDEM™ 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.
The PICDEM™ System Management board is populated with a PIC16F886
microcontroller. The PIC16F886 connects to the following board features:
•MCLR
•4 LEDs
•I
• USART communications (TX and RX)
• ICSP™ programming pins (ICSPDAT and ICSPCLK)
• PWM output fan control
• Fan tachometer input line
• Heating element control line
• Temperature se nsor 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.2Board 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.
• 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
communicat ion s ap pli cat ions . Th e ser ia l co mmun ica tio n pi nou t li nes are s how n in
Figure 1-2.
FIGURE 1-2:PICkit™ SERIAL ANALYZER PINOUT
123456
TX+5VG
NDSDASCLRX
• 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 terminals. 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.
A resistor is used as a heating element to generate heat near the MCP9700 temperature 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.
WARNING
The heating element will be very hot when on. Do not activate the heating element unless the fan is running. Always disconnect JP200 after use and allow
the heating element to cool.
1.4.4Board 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 addition 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.5QUICK 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.1Demonstration 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.
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.
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.”
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.5Thermal Management: Address 0xA6
The T emper ature Management fun cti on pr ov ides contr ol over fan c ont ro ller sett ing s.
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 connect the POT pin to the middle pin. This can allow the sweeping of temperatures in the
full range of temperature values.
The I2C function is an interface that allows master control of an I2C bus. Locate the
Read section of the I
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 I
“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 T able B-1 through T able B-4 for device address
and word address details.
FIGURE 1-7:I
2
C Tab. A Read command can be executed by filling the “Slave
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.2HIGHLIGHTS
Topics covered in this chapter include:
• PICDEM™ System Management Board and PICkit™ Serial Analyzer
• Fan Speed Control
2.3PICDEM™ 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 I
servers and motherboards. The PIC16F886 integrates the functions of each device on
2
the I
C 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 I
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 I
2
C bus line of rack-mount
2
C bus.
2
C bus.
2.4FAN SPEED CONTROL
2.4.1Two-wire Fan
Two-wire fans provide power and ground terminals. The fan can be controlled through
low-speed (10-100 Hz) PWM.
Note:Be sure to verify with the fan manufacturer that the fan specifications allow
for PWM control of input voltage.
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.
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.
Note:Be sure to verify with the fan manufacturer that the fan specifications allow
for PWM control of input voltage.
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.3Measuring 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 measurements. Whenever a measurement is made, power must be provided to the fan for the
duration of the measurement. (See figure below for more details.)
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.
This chapter describes common problems and resolutions associated with using the
PICDEM System Management Board.
3.2COMMON PROBLEMS
3.2.1Serial 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 V
.”
PICDEM SYSTEM MANAGEMENT
USER’S GUIDE
DC power supply.
®
3.2.2Microcontroller does not run after programming using the
MPLAB
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.3The 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.4Heating 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.5Temperature is not changing
Check JP202 and ensure that it is connected to center pin and pin labeled MCP9700.