Upload
dangkhuong
View
225
Download
0
Embed Size (px)
Citation preview
ZiLOG Development Platforms
Thermostat Application Module Kit
PUG001402-0103
Product User Guide
Kit Contents• Thermostat Application Module
• CD-ROM: Software Examples and Documentation
OverviewThe Thermostat Application Module provides a flexible platform for training and experimentation on a number of ZiLOG microcontroller and microprocessor devices. The module contains no processor. It is designed to attach to the eZ80 Development Platform, which contains both the processors and the control pro-grams that make the development platforms function. Figure 1 shows a top view of the Thermostat Application Module.
The Thermostat Application Module provides the following functionality:
• Simple bit-I/O (LEDs, switches, lamp, and fan)
• Alphanumeric LCD display via the GPIO interface
Figure 1. The Thermostat Application Module
ZiLOG Worldwide Headquarters • 532 Race Street • San Jose, CA 95126 • www.zilog.com
ZiLOG Development PlatformsThermostat Application Module Kit
2
• Temperature sensor via the I2C interface
• EEPROM data storage via the I2C interface
• Flash program storage for eZ80 family devices
Using simple bit I/O functionality, the user can experiment with the basic I/O and interrupt functionality of the target processor. By combining the temperature sen-sor with the lamp and fan actuation, more sophisticated real-time process control loop experiments can be conducted. The LCD display provides general utility toward developing more sophisticated user interfaces. Software drivers for the LCD display and the I2C interface exist for several of the ZiLOG processor fami-lies. Check the ZiLOG website for the latest versions available.
Module Block DiagramA block diagram of the Thermostat Application Module appears in Figure 2, which illustrates four major functional areas, all of which interface to the host processor through a plug-in header. These functional areas are:
1. GPIO for simple user interface functions.
2. GPIO for LCD interface.
3. I2C for temperature sensor and EEPROM interface.
4. Flash memory for program storage (eZ80 option).
Figure 2. Thermostat Application Module Block Diagram
LCD DisplayDMC16249B
I C EEPROM24LC128
Pushbuttonsand LEDs
I C TemperatureSensor
MAX6625
Thermostat Application Module I C Bus
Address/Control
Data
GPIOGPIO
7
2
3
3
Host ProcessorInterface Header
HW 1 I C
GPIO
GPIO
GPIO
GPIO
2
HW 2 I C2
SW I C2
Optional Flash MemoryMT28F008B
Fan Lamp
22
2
Product User Guide PUG001402-0103 Module Block Diagram
ZiLOG Development PlatformsThermostat Application Module Kit
3
GPIO for Simple User Interface
The Thermostat Application Module provides the following simple user interface functions:
• 3 Pushbutton switches (input)
• 3 LEDs (output)
• 1 Lamp (output)
• 1 Fan (output)
Each of these simple functions is individually controlled (or sensed) by a single I/O line of the target processor.
The lamp and fan are powered from a 9VDC power supply. This supply is provided by a separate power connector on the Thermostat Application Module, or via the interface connector to the development platform. If the 9VDC supply is not present, all functions of the Thermostat Application Module still operate correctly; however, the lamp and fan do not activate.
GPIO for LCD Interface
The Thermostat Application Module provides a 2x16-character LCD display that uses an industry-standard 4-bit parallel interface. This interface is implemented using 7 GPIO lines and software. The LCD can be used for a more sophisticated menu-driven user interface or status display.
I2C Interface
The Thermostat Application Module implements a 2-wire I2C bus to provide com-munication to the temperature sensor and the EEPROM. Because different pro-cessors offer multiple hardware I2C channels, as well as the possibility to produce I2C using only GPIO and software, a hardware multiplexer is provided between the processor interface connector and the I2C devices on the module. As a result, three different source pin combinations are permitted on the development plat-form. Selection of the multiplexer input is performed by GPIO control. Assignment of the source channels is a function of the development platform attached to the Thermostat Application Module, as well as the application software running on that development platform. Software drivers for the I2C bus exist for several of the ZiLOG processor families. Check the ZiLOG website for the latest version avail-able.
Flash Memory
A 1MB Flash memory device is included on the Thermostat Application Module for use with eZ80 systems. This memory can be mapped into the memory space of the eZ80 by use of the eZ80’s chip select pins. Optionally, by removing a
Note:
Product User Guide PUG001402-0103 Module Block Diagram
ZiLOG Development PlatformsThermostat Application Module Kit
4
jumper, this memory can be disabled from use by the eZ80. This memory allows demonstration applications specifically related to the Thermostat Application Mod-ule to be loaded and available as soon as the module is connected to an eZ80 system. The memory is of a general-purpose nature, and can be utilized for any appropriate purpose.
Hardware RequirementsThe Thermostat Application Module requires a development platform to function. Supported combinations of development platforms are indicated in Table 1.
The Thermostat Application Module requires 5VDC @ 50mA, which is provided by the development platform interface connectors. To operate the lamp and fan, an additional 9VDC @ 450mA supply is required. Presently, only the eZ80 and Z8 Encore! development platforms provide this supply across the development platform interface connectors. To use the Thermostat Application Module with other development platforms, an external 9VDC power supply must be used.
Setup and Installation
Jumper Locations
This section discusses the three jumpers that are located on the Thermostat Application Module, as indicated in Figure 3. These jumpers can be repositioned to meet the requirements of the application developer.
Table 1. Development Platforms Supporting the Thermostat Application Module
Development Platform ProcessorDevelopment Platform
Part Numbers
eZ80 Evaluation Board eZ80190 eZ801900110ZCO eZ801900111ZCO eZ801900210ZCO eZ801900211ZCO
eZ80 Development Platform eZ80L92 eZ80L920210ZCO
eZ80F91 eZ80F910200ZCO
eZ80F92/F93 eZ80F920200ZCO
Z8 Encore! Development Platform Z8 Encore! Z8ENCORE000ZCO
Product User Guide PUG001402-0103 Hardware Requirements
ZiLOG Development PlatformsThermostat Application Module Kit
5
Write Protect Jumper for Flash Memory (J5)
When installed, the boot sector area of Flash memory on the Thermostat Applica-tion Module cannot be altered. This J5 jumper must be removed to reprogram this boot sector. The default position for this jumper is Installed.
Chip Select Jumper for Flash Memory (J10)
If the J10 jumper is installed, Flash memory on the Thermostat Application Mod-ule is not enabled. If installed in the CS2 (upper) position, chip select 2 of the eZ80 is used to enable Flash memory. This CS2 position is the default for use with the eZ80 Evaluation Board for the eZ80190 device. If installed in the CS3 (lower) position, chip select 3 of the eZ80 is used to enable Flash memory. This CS3 posi-tion is the default for use with the eZ80 Development Platform.
External 9VDC Power (J9)
When the J9 jumper is installed, 9VDC power is drawn from the development platform via header J6. The external 9VDC power connector (J1) is still con-nected. The default position is Not Installed.
Figure 3. Thermostat Application Module Block Diagram
SW1 SW2 SW3
LED1 LED2 LED3
LCD Display
J6
J911
J8
U1Fan
Lamp
LampSocket (Under Lamp)
J5
J10
J1
Product User Guide PUG001402-0103 Setup and Installation
ZiLOG Development PlatformsThermostat Application Module Kit
6
Installation Procedure
The Thermostat Application Module is designed to be attached to the top of one of the ZiLOG development platforms listed in Table 1. The pins located on the top of the Thermostat Application Module J6 and J8 headers are available for the attach-ment of test probes.
Always use a grounding strap to prevent damage resulting from electrostatic dis-charge (ESD).
1. The Thermostat Application Module should be aligned with the J6 and J8 connectors of the development platform. Firm downward pressure must be applied to seat the connectors.
Because there is no keying of the connectors, care should be exercised to en-sure correct alignment and orientation.
2. If operation of the lamp and fan is required, a 9VDC source must be provided. For the eZ80 Evaluation Board for the eZ80190 device, that source must be an external power supply connected to J1. For the eZ80 and Z8 Encore! development platforms, that supply can either be the external power supply or the development platform itself. If development platform power is to be used, disconnect the external power supply from J1 and insert a jumper into J9.
Interface Connector Pin DescriptionThe interface connectors J6 and J8 provide both the method to connect the Ther-mostat Application Module to the development platform as well as a convenient attachment point for test equipment. Connector J6 provides access to the I/O port bits and connector J8 provides access to the eZ80 address and data buses.
Different development platforms assign different I/O pins to the various functions available on the Thermostat Application Modules. This differentiation is necessary due to the different number of I/O pins available on the various processors sup-ported. The I/O pin assignments are listed in Table 2.
Caution:
Caution:
Product User Guide PUG001402-0103 Interface Connector Pin Description
ZiLOG Development PlatformsThermostat Application Module Kit
7
Table 2. J6 I/O Pin Assignments by Development Platform*
Thermostat Application Module Pin
Development Platform I/O Pin Thermostat Application
Module Function
Active StateeZ80190 eZ80L92 eZ80F91
eZ80F92/eZ80F93
Z8 Encore!
54 PB0 PB0 PB0 PB0 PC1 Switch S1 Low
52 PB1 PB1 PB1 PB1 PC0 Switch S2 Low
50 PB2 PB2 PB2 PB2 PC2 Switch S3 Low
48 PB3 PB3 PB3 PB3 PC3 Lamp High
46 PB4 PB4 PB4 PB4 PC6 LED 1 High
44 PB5 PB5 PB5 PB5 PC7 LED 2 High
42 PB6 PB6 PB6 PB6 PC5 LED 3 High
40 PB7 PB7 PB7 PB7 PC4 Fan High
36 PD0 PD0 PD0 PD0 PA6 I2C SCL—Source #1
—
34 PD1 PD1 PD1 PD1 PA7 I2C SDA—Source #1
—
33 PA1 EM_D1 EM_D1 EM_D1 PE1 LCD/Write (Control)
—
31 PA2 EM_D2 EM_D2 EM_D2 PE2 LCD/Read (Control)
—
29 PA3 EM_D3 EM_D3 EM_D3 PE3 LCD RegSelect (Control)
—
28 PD4 PD4 PD4 PD4 PA3 I2C MUX Select LSB
High
27,25,23,21 PA4:7 EM_D4:7 EM_D4:7 EM_D4:7 PE4:7 LCD DB4:7 (Data Bus)
—
24 PD6 PD6 PD6 PD6 PA1 I2C SCL—Source #0
—
22 PD7 PD7 PD7 PD7 PA0 I2C SDA—Source #0
—
10 N/C ID_0 ID_0 ID_0 ID_0 I2C Mux Select MSB
High
7 N/C SDA SDA SDA SDA I2C SDA—Source #2
—
5 N/C SCL SCL SCL SCL I2C SCL—Source #2
—
Note: *Pin assignments for the eZ80L92, eZ80F91, and eZ80F92/eZ80F93 devices are identical.
Product User Guide PUG001402-0103 Interface Connector Pin Description
ZiLOG Development PlatformsThermostat Application Module Kit
8
Due to the high-speed nature of the signals on the J8 connector, care should beexercised in the electrical loading of these pins if test equipment or other circuitryis attached.
Care should be exercised when developing or modifying software to operate withthe Thermostat Application Module to ensure that the correct I/O mapping is se-lected for the processor chosen.
Programming ConsiderationsThe Thermostat Application Module contains four elements that require sophisti-cated programming techniques for proper operation. To ensure proper operation of these devices, the manufacturer data sheets for the devices should be con-sulted if the user intends to write code to work directly with these devices. See Table 3.
If ZiLOG-provided drivers are used, the information in Table 3 is not required.
Sample Software ProjectA typical application for the Thermostat Application Module is to implement a Heating Ventilation & Air Conditioning (HVAC) system simulation. In this example, a means is provided to establish upper and lower temperature limits. The temper-ature sensor is read on a periodic basis. If the temperature is discovered to be below the lower setpoint, then the lamp is turned ON. As a result, the temperature sensor is instructed to begin heating. When the temperature rises above the upper setpoint, the Lamp is turned OFF and the fan is turned ON. As a result, the temperature sensor is instructed to begin cooling. Various enhancements can be added to this basic process control loop, such as the delivery of the ambient tem-perature to the LCD display, allowing use of the switches to program different modes of operation or adjust the setpoints, or even the ability to force failure modes where the temperature is allowed to exceed a setpoint.
The Java Thermostat Application Note (AN0104) discusses an Internet-enabled HVAC simulation system using the eZ80190 device, and is supported by source code1. This system offers the ability to perform the above functions in addition to
Table 3. Application Module Device Information
Device Manufacturer Part Number I2C Device Address
LCD Display Optrex DMC16249B —
I2C Temp. Sensor Maxim MAX6625 90h
I2C EEPROM Atmel AT24C128 A2h
Flash Memory Micron MT28F008B —
Caution:
Caution:
Note:
Product User Guide PUG001402-0103 Programming Considerations
ZiLOG Development PlatformsThermostat Application Module Kit
9
supporting a graphical user interface accessible via any Internet browser. It also supplies automatic email generation in the event of an over-temperature failure condition. Be sure to periodically check the ZiLOG website for other Application Notes featuring the Thermostat Application module.
1. There are two source code files: AN0104-SC01.zip and AN0104-SC02.zip.
Product User Guide PUG001402-0103 Sample Software Project
Schematic Diagrams
lopment Platforms
Application Module
10
Halogen Lamp 12V 5W Bi-Pin0.9" long (w/o pins)
VCC
DS1LAMP
5
654
VsDT
Q2TIP120/TO-220
8
5678
ACLPC
Product User Guide PUG001402-0103
ZiLOG DeveThermostat
Schematic Diagrams
Figures 3 and 4 diagram the layout of the Thermostat Application Module.
Figure 3. Thermostat Application Module Schematic Diagram, Top View
/WR
DB1
FNC
DB6
RS
DB2DB3
DB0
DB7
GndVcc
/RD
DB4DB5
Lamp
LED3
SW1SW2SW3
LED2LED1
9 VDC 500ma2.1 MM CENTER PIN+
PD6PD7
PB0PB1PB2PB3PB4PB5PB6PB7
Connects to eZ80 eval board 60 pin header (J6)
GndGndGnd
GndGndGnd
Gnd
PA1PA2PA3PA4PA5PA6PA7Gnd
Gnd
Gnd
Gnd
GndFan
PD4
PD0PD1
ID0
9VDC
SCL
SDA
MB_SCLMB_SDA
HW_SCL
HW_SDA
I2C Select
SW_SCL
GND
SW_SDA
MB_SCLMB_SCL
MB_SDAMB_SDA
SCLSDA
P_UP1
P_UP2 P_UP3 P_UP4
P_UP2
P_UP1
P_UP3
P_UP4
VCC
VCC
C5
0.1ufd
Q12N2222/SOT23
U9B
4 3
U9A
2 1
U9D
74C906M
8 9
S1
12
R2110k
R9180
R20
100
R19OPEN
U9F
74C906M
12 13
C6
0.1ufd
R610K
12
R12OPEN
R1510K
C2
0.1ufd
U9C
74C906M
6 5
J4
VFD/LCD DISPLAY
1234567891011121314
S2
12
U1
MAX662
123
SDAGNDSCL
ADO
J99V External1 21 2
R17
100
R3
1K
R710K
R22
10k
R510K
R10180
R1
10K POT
123
R23
10k S3
12
R2
1K
J1DC PWR JACK
231
C1
33uF 15V
+
- FAN11.0"sq x 0.4"thick
R810K
R24
10k
D2
RED
D3
GRN
J6
HEADER 30X2
1 23 45 67 89 1011 1213 1415 1617 1819 2021 2223 2425 2627 2829 3031 3233 3435 3637 3839 4041 4243 4445 4647 4849 5051 5253 5455 5657 5859 60
C4
0.1ufd
R16100
C3
33uF 10V
R11180
U3
74HCT4052/SO
12141511
1524
6
109
13
3
16
7
X0X1X2X3
Y0Y1Y2Y3
EN
AB
X
Y
VDD
VEE
J7
I2C LCD DISPLAY
1234
U9E
74C906M
10 11
R18OPEN
R25
10k
R410K
U2
AT24C12
12
4
A0A1
GND SDSWVC
D4
YEL
Schematic Diagrams
lopment Platforms
Application Module
11
Product User Guide PUG001402-0103
ZiLOG DeveThermostat
Figure 4. Thermostat Application Module Schematic Diagram, Bottom View
Connects to eZ80 eval board 60 pin header (J8)
GND
D4D3
D1
GND
A11
A2
A3
A0
GND
D5
GND
-WR
A9
GND
D3
A6
D0
A10
A1
A21
A13
A8
VDD
A21
A15
VDD
A18
A2
GND
-RD
A0
A13
D6
D2
A17
A9
GND
A16
A14
A7
A15
D5A5
A14
A10
-BRESET
A20
A12
-CS3
GND
A4
GNDA8
VDD
D7
-WR
A7
A1
-RD
A11
A6
D4
D0
A5
D7
D2
A19
A16
A4
-BRESET
A19
GND
A17
VDD
GND
D6
A18
D1
A20
GND
A3
A12
-CS2
-CS3
-CS2
VCC
VDD
J10
CS SELECT
123
J5WRITE_PROTECT1 21 2
U5
SN74CBT3384ADW
3478111417182122
2569101516192023
113
2412
A0A1A2A3A4A5A6A7A8A9
B0B1B2B3B4B5B6B7B8B9
BE1BE2
VCCGND
DIODE
D5
21
U4
MT28F008B
2120191817161514873665
2526272832333435
432140133738
2224 23
39
3031
29
9
12
10
11
A0A1A2A3A4A5A6A7A8A9A10A11A12
DQ0DQ1DQ2DQ3DQ4DQ5DQ6DQ7
A13A14A15A16A17A18A19A20
CEOE VSS0
VSS1
VDD1VDD0
A21
WE
WP
RP
VPP
C8
0.1
J8
Header 30x2
1 23 45 67 89 1011 1213 1415 1617 1819 2021 2223 2425 2627 2829 3031 3233 3435 3637 3839 4041 4243 4445 4647 4849 5051 5253 5455 5657 5859 60
R132.2K
C70.1uF
C9
0.1
R14
10K
Product User Guide PUG001402-0103 Thermostat Application Module
ZiLOG Development PlatformsThermostat Application Module
12
This publication is subject to replacement by a later edition. To determine whether a later edition exists, or to request copies of publications, contact:
ZiLOG Worldwide Headquarters
532 Race StreetSan Jose, CA 95126Telephone: 408.558.8500Fax: 408.558.8300www.ZiLOG.com
Document Disclaimer
ZiLOG is a registered trademark of ZiLOG Inc. in the United States and in other countries. All other products and/or service names mentioned herein may be trademarks of the companies with which they are associated.
©2003 by ZiLOG, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZiLOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZiLOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. Devices sold by ZiLOG, Inc. are covered by warranty and limitation of liability provisions appearing in the ZiLOG, Inc. Terms and Conditions of Sale. ZiLOG, Inc. makes no warranty of merchantability or fitness for any purpose Except with the express written approval of ZiLOG, use of information, devices, or technology as critical components of life support systems is not authorized. No licenses are conveyed, implicitly or otherwise, by this document under any intellectual property rights.