Thermostat Application Module Kit PUG0040-00 Product User Guide Kit Contents Overview Thermostat Application Module CD-ROM: Software Examples and Documentation The 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 programs that make the development platforms function. Figure shows a top view of the Thermostat Application Module. Figure. 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 ZiLOG Worldwide Headquarters 5 Race Street San Jose, CA 956 www.zilog.com
Temperature sensor via the I C interface EEPROM data storage via the I C 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 sensor 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 I C interface exist for several of the ZiLOG processor families. Check the ZiLOG website for the latest versions available. Module Block Diagram A block diagram of the Thermostat Application Module appears in Figure, which illustrates four major functional areas, all of which interface to the host processor through a plug-in header. These functional areas are:. GPIO for simple user interface functions.. GPIO for LCD interface.. I C for temperature sensor and EEPROM interface. 4. Flash memory for program storage (ez80 option). Host Processor Interface Header HW I C HW I C SW I C Thermostat Application Module I C Bus GPIO GPIO 7 LCD Display DMC649B I C Temperature Sensor MAX665 I C EEPROM 4LC8 GPIO GPIO Fan Lamp Pushbuttons and LEDs GPIO GPIO Address/Control Data Optional Flash Memory MT8F008B Figure. Thermostat Application Module Block Diagram Product User Guide PUG0040-00 Module Block Diagram
GPIO for Simple User Interface The Thermostat Application Module provides the following simple user interface functions: Pushbutton switches (input) LEDs (output) Lamp (output) Fan (output) Each of these simple functions is individually controlled (or sensed) by a single I/O line of the target processor. Note: 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 x6-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. I C Interface The Thermostat Application Module implements a -wire I C bus to provide communication to the temperature sensor and the EEPROM. Because different processors offer multiple hardware I C channels, as well as the possibility to produce I C using only GPIO and software, a hardware multiplexer is provided between the processor interface connector and the I C devices on the module. As a result, three different source pin combinations are permitted on the development platform. 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 I C bus exist for several of the ZiLOG processor families. Check the ZiLOG website for the latest version available. Flash Memory A MB 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 Product User Guide PUG0040-00 Module Block Diagram
4 jumper, this memory can be disabled from use by the ez80. This memory allows demonstration applications specifically related to the Thermostat Application Module 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 Requirements The Thermostat Application Module requires a development platform to function. Supported combinations of development platforms are indicated in Table. Table. Development Platforms Supporting the Thermostat Application Module Development Platform Processor Development Platform Part Numbers ez80 Evaluation Board ez8090 ez809000zco ez80900zco ez809000zco ez80900zco ez80 Development Platform ez80l9 ez80l900zco ez80f9 ez80f9000zco ez80f9/f9 ez80f9000zco Z8 Encore! Development Platform Z8 Encore! Z8ENCORE000ZCO 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. These jumpers can be repositioned to meet the requirements of the application developer. Product User Guide PUG0040-00 Hardware Requirements
5 J J9 LCD Display J8 Lamp Socket (Under Lamp) J6 Fan U J0 Lamp J5 LED LED LED SW SW SW Figure. Thermostat Application Module Block Diagram Write Protect Jumper for Flash Memory (J5) When installed, the boot sector area of Flash memory on the Thermostat Application 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 (J0) If the J0 jumper is installed, Flash memory on the Thermostat Application Module is not enabled. If installed in the CS (upper) position, chip select of the ez80 is used to enable Flash memory. This CS position is the default for use with the ez80 Evaluation Board for the ez8090 device. If installed in the CS (lower) position, chip select of the ez80 is used to enable Flash memory. This CS position 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 (J) is still connected. The default position is Not Installed. Product User Guide PUG0040-00 Setup and Installation
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. The pins located on the top of the Thermostat Application Module J6 and J8 headers are available for the attachment of test probes. Caution: Always use a grounding strap to prevent damage resulting from electrostatic discharge (ESD).. 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. Caution: Because there is no keying of the connectors, care should be exercised to ensure correct alignment and orientation.. If operation of the lamp and fan is required, a 9VDC source must be provided. For the ez80 Evaluation Board for the ez8090 device, that source must be an external power supply connected to J. 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 J and insert a jumper into J9. Interface Connector Pin Description The interface connectors J6 and J8 provide both the method to connect the Thermostat 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 supported. The I/O pin assignments are listed in Table. Product User Guide PUG0040-00 Interface Connector Pin Description
7 Thermostat Application Module Pin Table. J6 I/O Pin Assignments by Development Platform* Development Platform I/O Pin ez8090 ez80l9 ez80f9 ez80f9/ ez80f9 Z8 Encore! Thermostat Application Module Function Active State 54 PB0 PB0 PB0 PB0 PC Switch S Low 5 PB PB PB PB PC0 Switch S Low 50 PB PB PB PB PC Switch S Low 48 PB PB PB PB PC Lamp High 46 PB4 PB4 PB4 PB4 PC6 LED High 44 PB5 PB5 PB5 PB5 PC7 LED High 4 PB6 PB6 PB6 PB6 PC5 LED High 40 PB7 PB7 PB7 PB7 PC4 Fan High 6 PD0 PD0 PD0 PD0 PA6 I C SCL Source # 4 PD PD PD PD PA7 I C SDA Source # PA EM_D EM_D EM_D PE LCD/Write (Control) PA EM_D EM_D EM_D PE LCD/Read (Control) 9 PA EM_D EM_D EM_D PE LCD RegSelect (Control) 8 PD4 PD4 PD4 PD4 PA I C MUX Select LSB 7,5,, PA4:7 EM_D4:7 EM_D4:7 EM_D4:7 PE4:7 LCD DB4:7 (Data Bus) 4 PD6 PD6 PD6 PD6 PA I C SCL Source #0 PD7 PD7 PD7 PD7 PA0 I C SDA Source #0 0 N/C ID_0 ID_0 ID_0 ID_0 I C Mux Select MSB 7 N/C SDA SDA SDA SDA I C SDA Source # 5 N/C SCL SCL SCL SCL I C SCL Source # Note: *Pin assignments for the ez80l9, ez80f9, and ez80f9/ez80f9 devices are identical. High High Product User Guide PUG0040-00 Interface Connector Pin Description
8 Caution: Caution: Due to the high-speed nature of the signals on the J8 connector, care should be exercised in the electrical loading of these pins if test equipment or other circuitry is attached. Care should be exercised when developing or modifying software to operate with the Thermostat Application Module to ensure that the correct I/O mapping is selected for the processor chosen. Programming Considerations The Thermostat Application Module contains four elements that require sophisticated programming techniques for proper operation. To ensure proper operation of these devices, the manufacturer data sheets for the devices should be consulted if the user intends to write code to work directly with these devices. See Table. Note: If ZiLOG-provided drivers are used, the information in Table is not required. Table. Application Module Device Information Device Manufacturer Part Number I C Device Address LCD Display Optrex DMC649B I C Temp. Sensor Maxim MAX665 90h I C EEPROM Atmel AT4C8 Ah Flash Memory Micron MT8F008B Sample Software Project A 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 temperature 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 temperature 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 (AN004) discusses an Internet-enabled HVAC simulation system using the ez8090 device, and is supported by source code. This system offers the ability to perform the above functions in addition to Product User Guide PUG0040-00 Programming Considerations
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.. There are two source code files: AN004-SC0.zip and AN004-SC0.zip. Product User Guide PUG0040-00 Sample Software Project
Thermostat Application Module Schematic Diagrams Figures and 4 diagram the layout of the Thermostat Application Module. 0 VFD/LCD DISPLAY VCC J4 R DB7 4 DB6 DB5 DB4 DB 0 DB 9 DB 8 DB0 7 /RD 6 /WR 5 RS 4 FNC Vcc 0K POT J7 4 R5 0K SCL SDA VCC MB_SCL MB_SDA PA7 PA6 PA5 PA4 PA PA PA J6 4 5 6 7 8 9 0 4 5 6 7 8 9 0 4 5 6 7 8 9 0 4 5 6 7 8 9 40 4 4 4 44 45 46 47 48 49 50 Connects to ez80 eval board 60 pin header (J6) 5 5 5 54 55 56 57 58 59 60 ID0 PD7 PD6 PD4 PD PD0 PB7 PB6 PB5 PB4 PB PB PB PB0 HEADER 0X R 0k R P_UP P_UP R4 0k 0k R5 P_UP P_UP4 0k C C4 C5 C6 uf 0V 0.ufd 0.ufd 0.ufd R 0k LED LED LED Lamp SW SW SW J9 9V External R OPEN Fan IC Select SW_SCL HW_SCL 4 MB_SCL 5 MB_SCL SW_SDA HW_SDA 5 MB_SDA MB_SDA 4 9 VDC 500ma. MM CENTER PIN + U9A 0 9 6 7 U9C U A B X0 X X X Y0 Y Y Y EN VEE R6 00 VDD U9B X Y 74HCT405/SO D J DC PWR JACK R9 80 RED 6 4 R9 OPEN R6 0K S R8 OPEN SCL SDA R7 00 C uf 5V 0.ufd R0 80 D GRN C R4 0K R7 0K R K S R0 00 R 80 D4 YEL + 9VDC - FAN.0"sq x 0.4"thick Q N/SOT R8 0K P_UP S R K R5 0K U SDA SCL MAX665 Halogen Lamp V 5W Bi-Pin 0.9" long (w/o pins) Vs ADD OT DS LAMP Q TIP0/TO-0 6 5 4 U 8 A0 VCC 7 A WP 6 SCL 4 5 SDA AT4C8 VCC IC LCD DISPLAY 6 5 74C906M U9D U9E U9F P_UP 8 9 P_UP 0 P_UP4 74C906M 74C906M 74C906M Figure. Thermostat Application Module Schematic Diagram, Top View Product User Guide PUG0040-00 Schematic Diagrams
Thermostat Application Module J0 CS SELECT -CS -CS A0 A A A A4 A5 A6 A7 A8 A9 A0 A A A A4 A5 A6 A7 A8 A9 A0 A 0 9 8 7 6 5 4 8 7 6 6 5 4 40 7 8 9 U4 A0 A A A A4 A5 A6 A7 A8 A9 A0 A A A A4 A5 A6 A7 A8 A9 A0 A -RD CE 4 -WR OE VSS0 9 9 -BRESET WE VSS 0 RP MT8F008B DQ0 DQ DQ DQ DQ4 DQ5 DQ6 DQ7 WP VPP VDD0 VDD 5 6 7 8 4 5 0 R4 0K C8 0. J5 WRITE_PROTECT C9 0. VDD 4 7 8 4 7 8 U5 A0 A A A A4 A5 A6 A7 A8 A9 BE BE B0 B B B B4 B5 B6 B7 B8 B9 VCC 5 6 9 0 5 6 9 0 4 SN74CBT84ADW D0 D D D D4 D5 D6 D7 DIODE D5 R.K VCC C7 0.uF VDD VDD A0 A A4 A6 A8 A0 A A4 A6 A8 A0 -RD -BRESET D0 D D4 D6 -CS VDD J8 4 5 6 7 8 9 0 4 5 6 7 8 9 0 4 5 6 7 8 9 0 4 5 6 7 8 9 40 4 4 4 44 45 46 47 48 49 50 5 5 5 54 55 56 57 58 59 60 Connects to ez80 eval board 60 pin header (J8) Header 0x A A A5 A7 A9 A A A5 A7 A9 A -WR D D D5 D7 -CS VDD Figure 4. Thermostat Application Module Schematic Diagram, Bottom View Product User Guide PUG0040-00 Schematic Diagrams
Thermostat Application Module 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 5 Race Street San Jose, CA 956 Telephone: 408.558.8500 Fax: 408.558.800 www.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. 00 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. Product User Guide PUG0040-00 Thermostat Application Module