Quick viewing(Text Mode)

Zilog Design Concepts

Zilog Design Concepts

ZiLOG Design Concepts

Z8 Application Ideas

AN004901-0900

ZILOG WORLDWIDE HEADQUARTERS ¥ 910 E. HAMILTON AVENUE ¥ CAMPBELL, CA 95008 TELEPHONE: 408.558.8500 ¥ FAX: 408.558.8300 ¥ WWW.ZILOG.COM

ZiLOG Design Concepts Z8 Application Ideas

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 910 E. Hamilton Avenue Campbell, CA 95008 Telephone: 408.558.8500 Fax: 408.558.8300 www.ZiLOG.com

Windows is a registered trademark of Corporation.

Information Integrity The information contained within this document has been verified according to the general principles of electrical and mechanical engineering. Any applicable source code illustrated in the document was either written by an authorized ZiLOG employee or licensed consultant. Permission to use these codes in any form, besides the intended application, must be approved through a license agreement between both parties. ZiLOG will not be responsible for any code(s) used beyond the intended application. Contact the local ZiLOG Sales Office to obtain necessary license agreements.

Document Disclaimer © 2000 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. Except with the express written approval ZiLOG, use of information, devices, or technology as critical components of life support systems is not authorized. No licenses or other rights are conveyed, implicitly or otherwise, by this document under any intellectual property rights.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

iii

Table of Contents

Introduction ...... ix OTP Selection Guide ...... xi Automotive Rear Sonar ...... 1 Automotive Speedometer, Odometer, and Tachometer ...... 4 Autonomous Micro-Blimp Controller ...... 6 Battery-Operated Door-Entry System ...... 9 The Crab ...... 12 Desktop Fountain ...... 15 DCF77 ...... 18 Diagnostic Compressor Protector ...... 20 Digital Dimmer Box ...... 24 Door Access Controller ...... 27 Electrolytic Capacitor ESR Meter ...... 30 Electronic Door Control ...... 33 Firearm Locking System (FLS) ...... 35 Forecaster Intelligent Water Delivery Valve ...... 38 Improved Linear Single-Slope ADC ...... 40 Integrated Sailboat Electronic System ...... 43 Intelligent Guide for the Blind ...... 45 Internet Email Reporting Engine ...... 48 Lunar Telemetry Beacon ...... 51 Magic Dice ...... 54 Modular Light Display Panel ...... 57 Nasal Oscillatory Transducer ...... 60 New Sensor Technologies ...... 63 Phone Dialer ...... 66 Pocket Music Synthesizer ...... 69 Portable Individual Navigator (PIN) ...... 72 Postal Shock Recorder ...... 75 PWM Input/Output Interface Module ...... 78 Reaction Tester ...... 80 Remote-Controlled Air Conditioner ...... 83 Remote-Control Antenna Positioner ...... 86

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

iv

RF Dog Collar ...... 89 Signature Recognition and Authentication ...... 91 Smart Phone Accessory ...... 93 Smart Solar Water Heating System ...... 95 Smart Window with Fuzzy Control ...... 97 Solar Tracker ...... 100 Speedometer ...... 103 Stages Baby Monitor ...... 106 Sun Tracking to Optimize Solar Power Generation ...... 109 Tandy Light Control ...... 112 Temperature Measuring Device ...... 115 Transmission Trainer ...... 118 UFO Flight Regulation System ...... 121 Vehicle Anti-Theft Module ...... 124 Windmill Commander ...... 126 Wireless Accelerometer ...... 129

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

v

List of Figures

Figure 1. Automotive Rear Sonar Block Diagram ...... 2 Figure 2. Automotive Rear Sonar Schematic Diagram ...... 3 Figure 3. Automotive Velometer, Mileometer, and Tachometer Block Diagram 4 Figure 4. Automotive Velometer, Mileometer, and Tachometer Schematic Diagram ...... 5 Figure 5. Autonomous Micro-Blimp Controller Block Diagram ...... 7 Figure 6. Autonomous Micro-Blimp Controller Schematic Diagram ...... 8 Figure 7. Battery-Operated Door-Entry System Block Diagram ...... 10 Figure 8. Battery-Operated Door-Entry System Schematic Diagram ...... 11 Figure 9. The Crab Block Diagram ...... 13 Figure 10. The Crab Schematic Diagram ...... 14 Figure 11. Desktop Fountain Block Diagram ...... 16 Figure 12. Desktop Fountain Schematic Diagram ...... 17 Figure 13. DCF77 Clock Schematic Diagram ...... 19 Figure 14. Diagnostic Compressor Protector Block Diagram ...... 22 Figure 15. Diagnostic Compressor Protector Schematic Diagram ...... 23 Figure 16. Digital Dimmer Box Block Diagram ...... 25 Figure 17. Digital Dimmer Box Schematic Diagram ...... 26 Figure 18. Door Access Controller Block Diagram ...... 28 Figure 19. Door Access Controller Schematic Diagram ...... 29 Figure 20. Electrolytic Capacitor ESR Meter Schematic Diagram ...... 32 Figure 21. Electronic Door Control Block Diagram ...... 34 Figure 22. Firearm Locking System Block Diagram ...... 36 Figure 23. Firearm Locking System Schematic Diagram ...... 37 Figure 24. Forecaster Intelligent Water Delivery Valve Schematic ...... 39 Figure 25. Improved Linear Single Slope ADC Block Diagram ...... 41 Figure 26. Improved Linear Single Slope ADC Schematic Diagram ...... 42 Figure 27. Integrated Sailboat Electronic System Block Diagram ...... 44 Figure 28. Integrated Sailboat Electronic System Schematic Diagram ...... 44 Figure 29. Intelligent Guide for the Blind Block Diagram ...... 46 Figure 30. Intelligent Guide for the Blind Schematic Diagram ...... 47 Figure 31. Internet Email Reporting Engine Block Diagram ...... 49 Figure 32. Internet Email Reporting Engine Software Block Diagram ...... 49 Figure 33. Internet Email Reporting Engine Schematic Diagram ...... 50

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

vi

Figure 34. Magic Dice Block Diagram ...... 55 Figure 35. Magic Dice Schematic Diagram ...... 56 Figure 36. Modular Light Display Panel Module Block Diagram ...... 58 Figure 37. Modular Light Display Panel Module Schematic Diagram ...... 59 Figure 38. Nasal Oscillatory Transducer Block Diagram ...... 61 Figure 39. Nasal Oscillatory Transducer Schematic Diagram ...... 62 Figure 40. New Sensor Technology Waveform ...... 64 Figure 41. New Sensor Technology Block Diagram ...... 65 Figure 42. Phone Dialer Block Diagram ...... 67 Figure 43. Phone Dialer Schematic Diagram ...... 68 Figure 44. Pocket Music Synthesizer Block Diagram ...... 70 Figure 45. Pocket Music Synthesizer Schematic Diagram ...... 71 Figure 46. Portable Individual Navigator A/D Ratio Over ...... 73 Figure 47. Portable Individual Navigator Schematic Diagram ...... 74 Figure 48. Postal Shock Recorder Block Diagram ...... 76 Figure 49. Postal Shock Recorder Schematic Diagram ...... 77 Figure 50. PWM Input Output/Interface Module Block Diagram ...... 79 Figure 51. Reaction Tester Block Diagram ...... 81 Figure 52. Reaction Tester Schematic Diagram ...... 82 Figure 53. Remote-Control Air Conditioner Block Diagram ...... 84 Figure 54. Remote-Control Air Conditioner Schematic Diagram ...... 85 Figure 55. Remote Controlled Antenna Positioner Block Diagram ...... 87 Figure 56. Hand-Held Remote Block Diagram ...... 87 Figure 57. Remote Controlled Antenna Positioner Schematic Diagram ...... 88 Figure 58. RF Dog Collar Block Diagram ...... 90 Figure 59. Signature Recognition and Authentication Module Block Diagram . 91 Figure 60. Signature Recognition and Authentication Module Schematic Diagram ...... 92 Figure 61. Smart Phone Accessory Block Diagram ...... 93 Figure 62. Smart Phone Accessory Schematic Diagram ...... 94 Figure 63. Smart Solar Water Heating System Block Diagram ...... 96 Figure 64. Smart Window with Fuzzy Control ...... 98 Figure 65. Smart Window with Fuzzy Control Schematic Diagram ...... 99 Figure 66. Solar Tracker Block Diagram ...... 101 Figure 67. Solar Tracker Schematic Diagram ...... 102 Figure 68. Speedometer Flow Diagram ...... 104

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

vii

Figure 69. Speedometer Block Diagram ...... 105 Figure 70. Stages Baby Monitor Block Diagram ...... 107 Figure 71. Stages Baby Monitor Schematic Diagram ...... 108 Figure 72. Sun Tracking Block Diagram ...... 110 Figure 73. Sun Tracking Schematic Diagram ...... 111 Figure 74. Tandy Light Control Block Diagram ...... 113 Figure 75. Tandy Light Control Schematic Diagram ...... 114 Figure 76. Temperature Measuring Device Block Diagram ...... 116 Figure 77. Temperature Measuring Device Schematic Diagram ...... 117 Figure 78. Transmission Trainer Block Diagram ...... 119 Figure 79. Transmission Trainer Schematic Diagram ...... 120 Figure 80. UFO Flight Regulation System Block Diagram ...... 122 Figure 81. UFO Flight Regulation System Schematic Diagram ...... 123 Figure 82. Vehicle Anti-Theft Module Block Diagram ...... 125 Figure 83. Vehicle Anti-Theft Module Schematic Diagram ...... 125 Figure 84. Windmill Commander Block Diagram ...... 127 Figure 85. Windmill Commander Schematic Diagram ...... 128 Figure 86. Wireless Accelerometer Block Diagram ...... 130 Figure 87. Wireless Accelerometer Schematic Diagram ...... 131

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

viii

List of Tables

Table 1. OTP Selection Guide ...... xii Table 2. Sensor Inputs ...... 21 Table 3. Firearm Sensor Input Functions ...... 35 Table 4. Graphics Display Features ...... 43 Table 5. Serial Commands ...... 48

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

ix

Introduction Are you driven to design the best? Co-sponsored with CMP Media, Inc., ZiLOGÕs 1999 ÒDriven to DesignÓ contest sought the most innovative and creative use of ZiLOGÕs award-winning Z8¨ or Z8Plus¨ OTP . The 47 abstracts contained in this book offer the designer a launching pad from which to prompt ideas and develop designs incorporating the ZiLOG Z8 or Z8Plus . They range in scope from helping blind individuals navigate busy intersections to providing increased protection for the handling and delivery of fragile packages. Students and engineers from all over the world submitted the design concepts presented in this compendium. Each abstract includes block and schematic diagrams to help the designer comprehend the contestantsÕ visions of products that are viable in todayÕs connected world.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

x ZiLOG OTP Selection Guide

ROM OPERATING ZiLOG VOLTAGE PROGRAMMING EMULATOR/ ROM (KB) PACKAGE PINS TEMPERATURE OSCILLATOR PART NUMBER RANGE ADAPTER ACCESS. KIT FEATURES EQUIV. 0.5K DIP 18 -40/105 Selectable Z86E0208PEC1925 4.5V - 5.5V Not Required Z86CCP01ZEM** 1 Timer + WDT Z86C02 0/70 Z86E0208PSC1925 3.5V - 5.5V 2 Comparators SOIC 18 -40/105 Z86E0208SEC1925 4.5V - 5.5V Z86E0700ZDP 61 RAM + 14 I/O + POR 0/70 Z86E0208SSC1925 3.5V - 5.5V SSOP 20 -40/105 Z86E0208HEC1925 4.5V - 5.5V Z86E0800ZDH 0/70 Z86E0208HSC1925 3.5V - 5.5V DIP 18 0/70 Selectable Z86E0308PSC 4.5V - 5.5V Z86E0601ZDP 1 Timer + Timer Out Z86C03 SOIC Z86E0308SSC 2 Comparators + WDT 61 RAM + 14 I/O + POR DIP 18 -40/105 XTAL Z8E00010PEC 4.5V - 5.5V Not Required Z8ICE001ZEM Z8Plus Core None 0/70 Z8E00010PSC 3.5V - 5.5V 1 Timer SOIC 18 -40/105 Z8E00010SEC 4.5V - 5.5V Z86E0700ZDP WDT + Reset Pin 0/70 Z8E00010SSC 3.5V - 5.5V 32 RAM + 13 I/O SSOP 20 -40/105 Z8E00010HEC 4.5V - 5.5V Z8E00101ZDH 0/70 Z8E00010HSC 3.5V - 5.5V DIP 18 -40/105 Selectable Z8PE002PZ010EC 4.5V - 5.5V Not Required Z8Plus Core 0/70 Z8PE002PZ010SC 3.0V - 5.5V 3 Timers / PWM SOIC 18 -40/105 Z8PE002SZ010EC 4.5V - 5.5V Z86E0700ZDP 1 Comparator + WDT 0/70 Z8PE002SZ010SC 3.0V - 5.5V 64 RAM + 14 I/O + POR SSOP 20 -40/105 Z8PE002HZ010EC 4.5V - 5.5V Z8E00101ZDH 0/70 Z8PE002HZ010SC 3.0V - 5.5V 1K DIP 18 -40/105 XTAL Z86E0412PEC 4.5V - 5.5V Not Required Z86CCP01ZEM** 2 Timers + WDT Z86C04 RC Z86E0412PEC1903 2 Comparators 0/70 XTAL Z86E0412PSC1866 125 RAM + 14 I/O + POR RC Z86E0412PSC1903 SOIC 18 -40/105 XTAL Z86E0412SEC Z86E0700ZDP RC Z86E0412SEC1903 0/70 XTAL Z86E0412SSC1866 RC Z86E0412SSC1903 SSOP 20 -40/105 XTAL Z86E0412HEC1866 Z86E0800ZDH Z86E0412HSC1866 DIP 18 0/70 Selectable Z86E0612PSC Z86E0601ZDP 2 Timers + SPI + WDT Z86C06 SOIC Z86E0612SSC 2 Comparators + 125 RAM Timer Out + 14 I/O + POR DIP 18 -40/105 XTAL Z8E00110PEC 4.5V - 5.5V Not Required Z8ICE001ZEM Z8Plus Core None 0/70 Z8E00110PSC 3.5V - 5.5V 3 Timers / PWM SOIC 18 -40/105 Z8E00110SEC 4.5V - 5.5V Z86E0700ZDP 1 Comparator + WDT 0/70 Z8E00110SSC 3.5V - 5.5V Reset Pin SSOP 20 -40/105 Z8E00110HEC 4.5V - 5.5V Z8E00101ZDH 64 RAM + 13 I/O 0/70 Z8E00110HSC 3.5V - 5.5V DIP 18 -40/105 Selectable Z8PE003PZ010EC 4.5V - 5.5V Not Required Z8Plus Core 0/70 Z8PE003PZ010SC 3.0V - 5.5V 3 Timers / PWM SOIC 18 -40/105 Z8PE003SZ010EC 4.5V - 5.5V Z86E0700ZDP 1 Comparator + WDT 0/70 Z8PE003SZ010SC 3.0V - 5.5V Reset Pin SSOP 20 -40/105 Z8PE003HZ010EC 4.5V - 5.5V Z8E00101ZDH 64 RAM + 14 I/O + POR 0/70 Z8PE003HZ010SC 3.0V - 5.5V 2K DIP 18 -40/105 XTAL Z86E0812PEC 4.5V - 5.5V Not Required Z86CCP01ZEM** 2 Timers + WDT Z86C08 RC Z86E0812PEC1903 2 Comparators 0/70 XTAL Z86E0812PSC1866 125 RAM + 14 I/O + POR RC Z86E0812PSC1903 SOIC 18 -40/105 XTAL Z86E0812SEC Z86E0700ZDP RC Z86E0812SEC1903 0/70 XTAL Z86E0812SSC1866 RC Z86E0812SSC1903 SSOP 20 -40/105 XTAL Z86E0812HEC1866 Z86E0800ZDH Z86E0812HSC1866 DIP 28 -40/105 Selectable Z86E3116PEC 4.5V - 5.5V Not Required Z86CCP01ZEM** 2 Timers + WDT Z86C31 0/70 Z86E3116PSC 3.5V - 5.5V and 2 Comparators SOIC 28 -40/105 Z86E3116SEC 4.5V - 5.5V Z86C3000ZAC Z86CCP00ZAC 125 RAM + 24 I/O + POR 0/70 Z86E3116SSC 3.5V - 5.5V PLCC 28 -40/105 Z86E3116VEC 4.5V - 5.5V 0/70 Z86E3116VSC 3.5V - 5.5V 4K DIP 28 -40/105 Selectable Z86E132PZ016EC1 3.0V - 5.5V ZICSP000100ZDP Z86C3600ZEM UART + 2 Comparators Z86C34*** 0/70 Z86E132PZ016SC + ICSP OTP Programming (16K ROM) SOIC 28 -40/105 Z86E132SZ016EC1 ZICSP000300ZDS ZLGICSP0100ZPR 2 Timers + 237 RAM, 0/70 Z86E132SZ016SC 24 I/O + WDT + POR DIP 40 -40/105 Selectable Z86E142PZ016EC1 ZICSP000400ZDP Z86C3600ZEM UART + 2 Comparators Z86C44**** 0/70 Z86E142PZ016SC + ICSP OTP Programming (16K ROM) QFP 44 -40/105 Z86E142FZ016EC ZICSP000600ZDF ZLGICSP0100ZPR 2 Timers + 236 RAM, 0/70 Z86E142FZ016SC 32 I/O + WDT + POR DIP 28 -40/105 Selectable Z86E3016PEC 4.5V - 5.5V Not Required Z86CCP01ZEM** 2 Timers + WDT Z86C30 0/70 Z86E3016PSC 3.5V - 5.5V 2 Comparators SOIC 28 0/70 Z86E3016SEC 4.5V - 5.5V Z86C3000ZAC 237 RAM + 24 I/O + POR Z86E3016SSC 3.5V - 5.5V PLCC 28 0/70 Z86E3016VEC 4.5V - 5.5V Z86E3016VSC 3.5V - 5.5V DIP 28 0/70 Selectable Z86E3312PSC 3.5V - 5.5V Z86E3400ZDP Z86CCP01ZEM** Clock-free WDT Reset Z86C33 SOIC Z86E3312SSC Z86E3400ZDS and 237 RAM + 2 Comparators PLCC Z86E3312VSC Z86E3400ZDV Z86CCP00ZAC 2 Timers + 24 I/O + POR DIP 40 0/70 RC Z86E1505PSC 4.5V - 5.5V Z86E1500ZDP Z86CCP01ZEM+ 1 Timer + WDT Z86K15/K16 188 RAM + 32 I/O (K16=5K ROM) QFP 44 -40/105 Selectable Z86E4016FEC 4.5V - 5.5V Z86E4001ZDF Z86CCP01ZEM** 2 Timers + WDT Z86C40 0/70 Z86E4016FSC 3.5V - 5.5V and 2 Comparators DIP 40 -40/105 Z86E4016PEC 4.5V - 5.5V Not Required Z86CCP00ZAC 236 RAM + 32 I/O + POR 0/70 Z86E4016PSC 3.5V - 5.5V PLCC 44 -40/105 Z86E4016VEC 4.5V - 5.5V Z86E4001ZDV 0/70 Z86E4016VSC 3.5V - 5.5V QFP 44 0/70 Selectable Z86E4312FSC 3.5V - 5.5V Z86E4400ZDF Z86CCP01ZEM** Clock-free WDT Reset Z86C43 DIP 40 Z86E4312PSC Z86E4400ZDP 2 Timers + 2 Comparators PLCC 44 Z86E4312VSC Z86E4400ZDV 236 RAM + 32 I/O DIP 28 -40/105 XTAL Z86E8316PEC 4.5V - 5.5V Z86E8300ZDP Z86C8401ZEM 8 Bit - 8 Channel A/D Z86C83 0/70 Z86E8316PSC 3.5V - 5.5V 2 Timers + WDT SOIC -40/105 Z86E8316SEC 4.5V - 5.5V Z86E8300ZDS 2 Comparators 0/70 Z86E8316SSC 3.5V - 5.5V 237 RAM + 21 I/O + POR PLCC -40/105 Z86E8316VEC 4.5V - 5.5V Z86E8300ZDV 0/70 Z86E8316VSC 3.5V - 5.5V

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

xi

ROM OPERATING ZiLOG VOLTAGE PROGRAMMING EMULATOR/ ROM (KB) PACKAGE PINS TEMPERATURE OSCILLATOR PART NUMBER RANGE ADAPTER ACCESS. KIT FEATURES EQUIV. 8K DIP 28 -40/105 Selectable Z86E133PZ016EC1 3.0V - 5.5V ZICSP000100ZDP Z86C3600ZEM UART + 2 Comparators Z86C34*** 0/70 Z86E133PZ016SC + ICSP OTP Programming (16K ROM) SOIC 28 -40/105 Z86E133SZ016EC1 ZICSP000300ZDS ZLGICSP0100ZPR 2 Timers + 237 RAM, 0/70 Z86E133SZ016SC 24 I/O + WDT + POR DIP 40 -40/105 Selectable Z86E143PZ016EC1 ZICSP000400ZDP Z86C3600ZEM UART + 2 Comparators Z86C44**** 0/70 Z86E143PZ016SC + ICSP OTP Programming (16K ROM) QFP 44 -40/105 Z86E143FZ016EC ZICSP000600ZDF ZLGICSP0100ZPR 2 Timers + 236 RAM 0/70 Z86E143FZ016SC 32 I/O + WDT + POR DIP 28 0/70 Selectable Z8673312PSC 3.5V - 5.5V Z86E3400ZDP Z86CCP01ZEM** 2 Timers + WDT Z86233 SOIC Z8673312SSC Z86E3400ZDS 2 Comparators PLCC Z8673312VSC Z86E3400ZDV 237 RAM + 24 I/O + POR QFP 44 0/70 Selectable Z8674312FSC Z86E4400ZDF 2 Timers + WDT Z86243 DIP 40 Z8674312PSC Z86E4400ZDP 2 Comparators PLCC 44 Z8674312VSC Z86E4400ZDV 236 RAM + 32 I/O + POR QFP 44 0/70 XTAL Z86E2112FSC 4.5V - 5.5V Z86E2101ZDF Z86C1200ZEM 2 Timers + UART + WDT Z86C21 DIP 40 Z86E2112PSC Z86E2301ZDP 8 Open Drain Outputs PLCC 44 Z86E2112VSC Z86E2101ZDV 236 RAM + 32 I/O 16K DIP 28 -40/105 Selectable Z86E134PZ016EC1 3.0V - 5.5V ZICSP000100ZDP Z86C3600ZEM UART + 2 Comparators Z86C34 0/70 Z86E134PZ016SC + ICSP OTP Programming SOIC 28 -40/105 Z86E134SZ016EC1 ZICSP000300ZDS ZLGICSP0100ZPR 2 Timers + 237 RAM 0/70 Z86E134SZ016SC 24 I/O + WDT + POR DIP 40 -40/105 Selectable Z86E144PZ016EC1 ZICSP000400ZDP Z86C3600ZEM UART + 2 Comparators Z86C44 0/70 Z86E144PZ016SC + ICSP OTP Programming QFP 44 -40/105 Z86E144FZ016EC ZICSP000600ZDF ZLGICSP0100ZPR 2 Timers + 236 RAM, 0/70 Z86E144FZ016SC 32 I/O + WDT + POR DIP 28 0/70 Selectable Z86E3412PSC 3.5V - 5.5V Z86E3400ZDP Z86CCP01ZEM** 2 Timers + WDT Z86C34 SOIC Z86E3412SSC Z86E3400ZDS (Must be modified 2 Comparators PLCC Z86E3412VSC Z86E3400ZDV see website) 237 RAM + 24 I/O + POR QFP 44 0/70 Selectable Z86E4412FSC Z86E4400ZDF or 2 Timers + WDT Z86C44 DIP 40 Z86E4412PSC Z86E4400ZDP Z86C5000ZEM 2 Comparators PLCC 44 Z86E4412VSC Z86E4400ZDV 236 RAM + 32 I/O + POR QFP 44 0/70 XTAL Z86E6116FSC 4.5V - 5.5V Z86E2101ZDF Z86C1200ZEM 2 Timers + UART Z86C61 DIP 40 Z86E6116PSC Z86E2301ZDP 236 RAM + 32 I/O PLCC 44 Z86E6116VSC Z86E2101ZDV QFP 44 0/70 Selectable Z86E7216FSC Included With Emulator Z86L7103ZEM 2 Adv. Timers + WDT Z86C72 PDIP 40 Z86E7216PSC 2 Comparators PLCC 44 Z86E7216VSC 738 RAM +31 I/O 32K DIP 28 -40/105 Selectable Z86E135PZ016EC1 3.0V - 5.5V ZICSP000100ZDP Z86C3600ZEM UART + 2 Comparators Z86C35 0/70 Z86E135PZ016SC + ICSP OTP Programming SOIC 28 -40/105 Z86E135SZ016EC1 ZICSP000300ZDS ZLGICSP0100ZPR 2 Timers + 237 RAM, 0/70 Z86E135SZ016SC 24 I/O + WDT + POR DIP 40 -40/105 Selectable Z86E145PZ016EC1 ZICSP000400ZDP Z86C3600ZEM UART + 2 Comparators Z86C45 0/70 Z86E145PZ016SC + ICSP OTP Programming QFP 44 -40/105 Z86E145FZ016EC ZICSP000600ZDF ZLGICSP0100ZPR 2 Timers + 236 RAM, 0/70 Z86E145FZ016SC 32 I/O + WDT + POR QFP 44 0/70 XTAL Z86E6316FSC 4.5V - 5.5V Z86E2101ZDF Z86C1200ZEM 2 Timers + UART Z86C63 DIP 40 Z86E6316PSC Z86E2301ZDP 236 RAM + 32 I/O PLCC 44 Z86E6316VSC Z86E2101ZDV

PDIP 40 0/70 Selectable Z86D7308PSC 2.0V - 3.6V Included With Emulator Z86L9800ZEM 2 Adv. Timers + WDT Z86L87 (16K ROM) PLCC 44 Z86D7308VSC 2 Comparators Z86L89 (24K ROM) 236 RAM + 31 I/O Z86L73 (32K ROM)

PDIP 28 0/70 Selectable Z86D8608PSC Included With Emulator Z86L9800ZEM 2 Adv. Timers + WDT Z86L82 (4K ROM) SOIC 28 Z86D8608SSC 2 Comparators Z86L85 (8K ROM) 236 RAM + 23 I/O Z86L88 (16K ROM) Z86L81 (24K ROM) Z86L86 (32K ROM) SSOP 48 0/70 Selectable Z86D990HZ008SC 3.0V - 5.5V TBD Z86L9900100ZEM 2 Adv. Timers + 1GPTimer Z86L990

PDIP 40 Z86D990PZ008SC Included With Emulator WDT + 2 Comparators (16K ROM) 4 Ch 8-bit ADC 489 RAM + 32 I/O PDIP 28 0/70 Selectable Z86D991PZ008SC Included With Emulator 2 Adv. Timers + 1GPTimer Z86L991 SOIC 28 Z86D991SZ008SC WDT + 2 Comparators (16K ROM) 4 Ch 8-bit ADC 489 RAM + 23 I/O

QFP 44 0/70 Selectable Z86E7316FSC 4.5V - 5.5V Included With Emulator Z86L7103ZEM 2 Adv. Timers + WDT Z86C88 PDIP 40 Z86E7316PSC 2 Comparators (16K ROM) PLCC 44 Z86E7316VSC 236 RAM + 31 I/O 64K DIP 28 -40/105 Selectable Z86E136PZ016EC1 3.0V - 5.5V ZICSP000100ZDP Z86C3600ZEM UART + 2 Comparators Z86C36 0/70 Z86E136PZ016SC + ICSP OTP Programming SOIC 28 -40/105 Z86E136SZ016EC1 ZICSP000300ZDS ZLGICSP0100ZPR 2 Timers + 237 RAM 0/70 Z86E136SZ016SC 24 I/O + WDT + POR DIP 40 -40/105 Selectable Z86E146PZ016EC1 ZICSP000400ZDP Z86C3600ZEM UART + 2 Comparators Z86C46 0/70 Z86E146PZ016SC + ICSP OTP Programming QFP 44 -40/105 Z86E146FZ016EC ZICSP000600ZDF ZLGICSP0100ZPR 2 Timers + 236 RAM, 0/70 Z86E146FZ016SC 32 I/O + WDT + POR 1 Extended Temperature Device will be available in Q4 2000. * Selectable Oscillator means Crystal or RC can be chosen ** The Z86CCP01ZEM is rated at 12 MHz. For speed above 12 MHz, use the Z86C5000ZEM emulator. For Z86C06 SPI Emulation, use the Z86C5000ZEM *** ROM device has 16K internal Program Memory. **** ROM device has 16K internal Program Memory. External program & data memory access should start from 16K (address = 4000H) + The Z86CCP01ZEM is used only for programming the EPROM version, and the Z86K1500ZEM is used only for emulation of this part. ++ The Z86CCP01ZEM is used only for programming the EPROM version, and the Z86U1800ZEM is used only for emulation of this pa DESCRIPTION OF Z8 ADAPTERS Z86CCP00ZAC: 28 / 40-Pin DIP Accessory Kit Z86CCP01Z Z86E2101ZDF: 44-Pin QFP to 40-Pin DIP Adapter Z86C4001ZDV: 44-Pin PLCC to 40-Pin DIP Adapter Z86C3000ZAC: 28-Pin SOIC/PLCC Accessory Kit for Z86C Z86E2101ZDV: 44-Pin PLCC to 40-Pin DIP Adapter Z86E4001ZDV: 44-Pin PLCC to 40-Pin DIP Adapter Z86E0601ZDP: 18-Pin SOIC to 18-Pin DIP Adapter Z86E3400ZDP: 28-Pin DIP to 18-Pin DIP Adapter Z86E8300ZDP: 28-Pin DIP to 28-Pin DIP Adapter Z86E0700ZDP: 18-Pin SOIC to 18-Pin DIP Adapter Z86E3400ZDS: 28-Pin SOIC to 18-Pin DIP Adapter Z86E8300ZDS: 28-Pin SOIC to 28-Pin DIP Adapter Z86E0800ZDH: 20-Pin SSOP to 18-Pin DIP Adapter Z86E3400ZDV: 28-Pin PLCC to 18-Pin DIP Adapter Z86E8300ZDV: 28-Pin PLCC to 28-Pin DIP Adapter Z86E1500ZDP: 40-Pin DIP Adapter Z86E4400ZDF: 44-Pin QFP to 18-Pin DIP Adapter Z8E00101ZDH: 20-Pin SSOP to 18-Pin DIP (Z8ICE) Adapter ZLGICSP0100ZPICSP Programmer for Z8 MUZE Family Z86E4400ZDP: 40-Pin DIP to 18-Pin DIP Adapter Z8PE0030000ZDP: Z8ICE000ZEM & Z8ICE010ZEM Upgrade Kit ZICSP000100ZD 28-Pin DIP Programming Adapter for ICSP ZICSP000400ZDP: 40-Pin DIP Programming Adapter for ICSP Programmer ZICSP000300ZD 28-Pin SOIC Programming Adapter for ICS ZICSP000600ZDF: QFP Programming Adapter for ICSP Programmer

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

1

Automotive Rear Sonar Submitted by: R. Hugo Vieira Neto and Francisco Eugenio Mauro

Abstract The Automotive Rear Sonar is intended for automotive use. It is simple, effective, and inexpensive. Designed with a ZiLOG Z8 OTP microcontroller, this device measures the distance between the vehicle and any obstacle when in reverse gear. The driver is informed when a collision is about to occur. The sonar utilizes a pair of ultrasonic transducers to send and receive 40-kHz wave bursts. The goal is to measure the time of flight of the ultrasonic burst if an echo occurs. A Z86E08 microcontroller running at 8 MHz acts as the system control block. Some of the Z86E08s key features are: ¥ Short instruction execution (generation of the 40-kHz ultrasonic signal by software) ¥ Onboard analog comparators (making ultrasonic detection simple and inexpensive) ¥ Onboard counter/timers with prescalers (making ultrasonic wave time-of-flight easy to measure)

Ultrasonic waves are strongly attenuated along their propagation in the air. That makes their detection quite difficult as distance increases. In order to achieve fea- sible detection, the is given as much power as possible, and the receiver circuit is furnished enough sensitivity to detect small-echo signals. The transmitter driver is responsible for the excitation of the ultrasonic transmitter. For maximum output power, an H-bridge amplifier configuration is used to drive the transducer that is controlled by a pair of I/O pins of the Z8 port P2. One of the Z8Õs onboard analog comparators implements the receiver detector. To adequately bias the comparator inputs, a resistive network is connected to the Z8 port P3, which features a sensitivity adjustment for the output amplitude of the receiver transducer. Another transmitter driver circuit is implemented on another pair of I/O pins on port P2. A receiver detector is implemented using the other available analog com- parator input on port P3. The resulting pair of ultrasonic and receivers is mechanically mounted on the left and right sides of the carÕs rear bumper for more safety.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

2

A low-power voltage regulator IC supplies the 5 volts required by the Z8 from the vehicleÕs 12-volt battery. The carÕs reverse gear light circuit can also supply power, so that the sonar would he turned on when in reverse gear only. User feedback is performed visually by means of an LED and/or audibly by a piezoelectric buzzer.

Figure 1. Automotive Rear Sonar Block Diagram

Transmitter Driver

Obstacle System Control Receiver Detector

User Feedback

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

3

Figure 2. Automotive Rear Sonar Schematic Diagram R10 150k Q5 BC548B R6 100k +12V R9 15K R5 47K Q7 BC548B Q4 BC548B +12V TX1 40kHz +12V Q3 Q6 BC548B BC548B R4 47K R8 15K R3 100k +12V Q2 BC548B R7 150k C5 100nF C2 22pF C4 10µF/ 25V 6 15 16 17 18 1 2 3 4 +5V P20 P21 P22 P23 P24 P25 P26 P27 XTAL2 X1 U2 8.0000MHz G XTAL1 P00 P01 P02 P31 P32 P33 Z86E0812PSC V1 V0 7 8 9 11 12 13 10 C3 100µF/ 25V C1 22pF +12V R1 15K D1 1N4148 Q1 BC548B R2 1K LED1 LED +5V C6 10µF BZ1 Buzzer R14 R12 10K 10K From Reverse Gera Light Circuit RX1 40kHz +5V R11 R13 10K 10K

P1 470R Sensitivity

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

4

Automotive Speedometer, Odometer, and Tachometer Submitted by: Niu Zhiming

Abstract The automotive speedometer, odometer, and tachometer can provide the velocity, mileage, and rotational speed of an automobile engine. The central controlling unit is a Z86E04 microcontroller. Air-Core (moving-magnet) meters are often favored over other movements as a result of their mechanical ruggedness. There are three basic pieces: a magnet and pointer attached to a freely-rotating axle, and two coils. Each coil is oriented at a right angle in respect to the other. The air-core meter is voltage-driven. According to the measuring values of the automotive velocity and the engine rotational speed, ports P24, P25, P26, and P27 generate four PWM drive signals. The only moving part is the axle assembly. The magnet aligns itself with the vector sum of the H field of each coil and extra magnetic fields, where H is the magnetic field strength vector.

Figure 3. Automotive Velometer, Mileometer, and Tachometer Block Diagram

Axle

Pointer

Magnet

Sine Coil

Cosine Coil

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

5

Figure 4. Automotive Velometer, Mileometer, and Tachometer Schematic Diagram 2 GND Vin Vout 3 1 VCC VDD N8 V1 R31 1 U3:A 8 4 + Ð VCC 2 3 R28 R26 C7 R29 R29 N7 R27 VCC 7 U3:B Ð + VBAT Alarm of engine supertachometer 5 6 R24 D1 L5 S1 Mileometer R23 N1 N2 Signal from sensor of automotive velocity Signal from tachometer generator of engine VCC + R25 VCC E6 R20 R22 3 R9 R10 R14 R18 C6 VDD Vout 2 GND R19 R21 R19 VDD VDD Vin V2 1 R13 R17 18 17 16 15 13 12 11 7 R16 R12 C6 N6 N5 P23 P22 P21 P20 P02 P01 P00 14

C1 U2 E5 Z86E04 + 5 VDD P24 P25 P26 P27 P31 P32 P33 C2 C3 R11 R15 1 2 3 4 8 9 6 C5 10 C4 R33 R32 (Varistor) D2 R1 R2 R3 R4

E1 E2 E3 E4

R5 R6 R7 R8 VBAT

+ + + + 2 3 6 5 9 10 13 12 Ð + Ð + Ð + Ð + VCC U1:B U1:C U1:D VCC VCC VCC VCC R34 R36 R36 R37 1 7 8 14 U1:A N1 N2 N3 N4 L1 L2 L3 L4 Sine Sine Coil1 Coil2 Coil1 Coil2 Cosin Cosin

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

6

Autonomous Micro-Blimp Controller Submitted by: Vadim Konradi

Abstract This project utilizes multiple autonomous mobile nodes to interact via an infrared energy communications medium, with basic homing behavior and message pass- ing. The implementation is micro-blimps, which are small, compact, and weight- and energy-efficient. Micro-blimps are generally one meter in length, with helium envelopes, pager-size motors driving propellers, IR transmitters, receivers, 3- DOF-drive system. The small size and low weight of Z8 microcontrollers and bat- teries also contributes to overall energy savings. Consider a group of blimps, calmly buoyant near the ceiling like water beetles at the surface of the water. Suddenly, a prey object appears, drawing their attention. Each senses the infrared homing signal of the sender. They descend from the ceiling, each drawn to the sender, each recognizing and homing in on the signals emitted by each otherÕs tails. The senderÕs signal is extinguished, and the blimps coalesce into self-organizing trains and nose-to-tail circles, following each other as they drift lazily back to the ceiling to perform again later. U1 is a Z8 OTP from the General-Purpose Z8 Microcontroller family. Port 0 drives the propeller motors and addresses the bumper-switch matrix columns. Port 1 drives the resistor-summing junction, establishing the demodulation. Port 2 in open-drain mode selects mixer/demodulator channels, reads configuration switches to select operational modes, and addresses bumper-switch matrix rows. Port 3 inputs connect to the comparator system, measuring the mixer/demodula- tor output. Timer system outputs connect to Port 3, generating both modulated and reference carrier signals. U2 operational amplifiers implement IR bandpass amplifiers. The U3 CMOS switch forms a mixer/demodulator. S1 sets options and S2ÐS5 are collision bumpers.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

7

Figure 5. Autonomous Micro-Blimp Controller Block Diagram signals this one direct other blimps Signals affect and Another blimp affects and Mixer/ amplifiers Multiplexer Demodulator Received signal driver IR LED and Directional IR phototransistors drive system One Blimp System Other Blimps and Beacons Timer subsystem subsystem Wake-up Comparator mechanism Z86E7316VSC Port Pin Drivers Blimp propeller task task Software Z86E7316VSC Demodulation algorithm Data extraction Motor drive and detection task Following behavior High-level behavior feedback control task

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

8

Figure 6. Autonomous Micro-Blimp Controller Schematic Diagram C4 6.3µF + R7 200k 3 14 11 6 NO1 NO2 NO3 NO4 MAX4602 COM1 IN1 COM2 IN2 COM3 IN3 COM4 IN4 V+ VL GND V- U3 5 4 9 7 8 2 1 13 12 15 16 10 VCC CMOS Switch Synchronous Demodulator R5 20k R6 20k R8 20k 8 1 7 U2A U2B U2C R2 R9 LM324 LM324 LM324 R14 100k 100k 100k 8 8 8 + + + - - - 11 11 11 1k 1k 1k R3 R10 VCC_3V VCC_3V VCC_3V R16 3 5 9 2 6 10 C5 C1 C3 1µF 1µF 1µF VCC_3V VCC_3V VCC_3V R1 R4 20k 20k 20k R11 3-Axis IR Receivers and Preamps Q1 Photo NPN Q2 Photo NPN Q3 Photo NPN D2 HSDL- 4220 R12 10 Q4 2N2222A VCC_3V IR Transmitter 3-Axis Drive Motors D1 HSMS- C650 TP1 R13 2k_0805 Resistor summing junction to set demodulator detection threshold. R22 10k R23 10k R24 10k R25 10k R26 10k R27 10k R28 10k R29 10k Motor Motor Motor VCC_3V Indicator Visual LED M1 M2 M3 CARRIER VIS OUT IR OUT MOD REF 37 38 36 40 41 44 5 17 18 32 6 7 8 42 43 3 4 20 21 25 26 13 33 11

/AS

/DS P37 P36 P35 P00 P01 P02 P03 P04 P05 P34 P20 P21 P22 P10 P11 P12 P13 P14 P15 P16 P17 R/W

VSS34

34

VDD23

VSS2

23

2

C2 1000µF 6.3V VDD24 VSS1

24 VCC_3V 1 + VCC_3V P23 P24 P25 P26 P27 P07 P08 XTAL1 XTAL2 PREF1 P31 P32 P33 /RESET R//RL U1 9 10 14 15 16 22 19 26 27 39 29 30 31 35 12 BT1 3.6V Lithium

COL7 COL8 R31 1M R31 ROW6 ROW7 XTAL1 XTAL2 Z86E7316VSC

VCC_3V R30 1M R30 S1 SW DIP-3 2 S6 654 123 S3 S5 13 VCC_3V Y1 8MHz R17 100k R19 100k R15 100k S2 S4

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

9

Battery-Operated Door-Entry System Submitted by: Steve Price

Abstract The purpose of this Z8Plus-based system is to improve the security of an existing door. This simple low-cost entry system utilizes the Dallas Semiconductor D51990A iButton technology in addition to or instead of a conventional mechani- cal key. A battery system is preferred to eliminate complex wiring to the door. The Z8Plus microcontroller is ideally suited to battery applications, due to its low quiescent current, which is typically 250nA in STOP mode. The Z8Plus is brought out of STOP mode by pressing the wake-up switch SW. This switch is an integral part of the iButton receptacle. The Z8Plus checks the battery voltage using a single on-chip comparator. The Z8Plus then looks for the presence of an iButton in the receptacle PL1. If an iButton is detected, then its 6- byte serial code is read via PB1 using a 1-wire power/data protocol. iButton codes for up to 20 users can be stored in the EEPROM. The received code is checked against the table of stored codes in the EEPROM. If the correct code is found, the solenoid/actuator is activated for a short defined period that allows the door to be opened. The hi-color LED is green during this state. A flash- ing green warning indicates that battery voltage is low. At the end of this period, the peripherals are turned off and the Z8Plus returns to STOP mode. Should the unit fail due to exhausted batteries, a provision exists to bring an emergency power terminal PL2 out to the front panel. A 9-volt battery can be con- nected between the power terminal and earth ground of the iButton receptacle, while a valid iButton is read. When the door is opened, the batteries can be replaced. A method of resetting the Z8Plus may also be required. A predefined Master iButton places this system into LEARN mode. All user-button codes stored in the EEPROM are erased. The operator touches each new iButton within 10 of each other, storing the new user-button codes into the sys- tem. The hi-color LED provides user feedback. Monitoring of the battery supply rail is achieved using the on-chip comparator. A 5- volt reference is fed into one input of the comparator, while the other input moni- tors the battery rail via the potential divider R4 and R5. For the potential divider to function, the software must write a 0 to PB2. The resistor values provide a battery voltage of 6.5V that produces a 5-volt output from the potential divider. After the measurement, the software turns PB2 into an input that stops the current from flowing through the potential divider, thereby conserving current. The solenoid must be chosen for the application, in addition to the values of the transistor TR1 and base resistor R8.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

10

Figure 7. Battery-Operated Door-Entry System Block Diagram

9V Allkaline Battery Low 5V LDO Battery Dectect Regulator Pack Solenoid Actuator 2

Dallas 1 DS1990A 2 i Button i Button 1 Bi-Color Reader Z8Plus Red/Green LED MCU 1

1 Microswitch P80 (Stop Mode Recovery) 4 Serial EEPROM

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

11

Figure 8. Battery-Operated Door-Entry System Schematic Diagram +5V C10 100UF SOLENOID L1 100UF C8 100NF C4 D6 IN4001 100NF 100NF C9 C7 8 IC2 5 R8 TR1 VSS VCC CS CLK DI DO LED 3 1 2 3 4 93LC46 BI-COLOUR RED 470R R7 2 LP2950 IC3 GRN 1 LED1 9 8 7 6 13 12 11 10 100NF C3 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 14 15 100NF C6 +5V VSS VCC Z8E001 R6 100K PB1 PB2 PB3 PB4 XTAL1 XTAL2 /RST PB0 IC1 +5V 5 1 2 3 4 17 16 18 22PF C1 C2 22PF 4 00MHZ R5 54K R4 180K 100UF C5 12V 6V8 1N5817 1N5817 1N5817 1N5817 D1 ZD1 ZD2 1N4148 7UF C4 +5V D4 D5 D2 D3 R3 100K 6 x 1.5V AA BATTERIES SV R2 100K R1 50K PL2 PL1 WAKE-UP i BUTTON 9V POWER EMERGENCY RECEPTACLE

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

12

The Crab Submitted by: Andreas Voigt

Abstract The Crab is an autonomous robot, featuring a low-cost design, and powered by three AA batteries, with motion provided by DC motors. Obstacle detection and bump switches are incorporated into the design. Speed and distance is monitored to facilitate vectored motion patterns that offer the ability to collect and move small objects. The robot features an LED, speaker, and wireless communication possi- bilities with other forms of life. Floor sensors are added to avoid accidental falls. Infrared reflection sensors have proven their reliability. One standard for DC motor drive is an H-bridge, which is controlled by the PWM. Counting index holes in wheels allows the Crab to compute speed and distance. Wireless communication is implemented via a standard TV remote- control receiver chip and 40-kHz pulses from the infrared LEDs (IRLEDs). The Z86E31 was chosen because it is powerful and easy to use, and for its low- cost development using a ZiLOG CCP emulator and ZDS. Programming this chip in assembler language is easy. To keep costs as low as possible, one design rule is to use software to emulate hardware. Transmit IRLEDs are placed on the bottom left and right in front of the Crab to pro- duce floor sensors. Two IRLEDs look forward to detect obstacles. The mouth can capture small objects and hold them in place, as long as no backward motion is performed. One IRLED and a phototransistor monitor the operation of the mouth, forming a photointerrupter with an IRLED at the back, operating together as a beacon. The IR receiver chip is placed above the mouth. This chip is used for communication and as detector for 40-kHz pulses, generated by the IRLEDs and reflected by any object, even the floor, and also detecting TV remote controls and other crabs. The phototransistors to the front monitor ambient light. The top layer of the software consists of the mood model, the behavior layer below. Both are state-machines, and the action layer, the one executing motion or sound commands, is based upon the subsumption architecture, introduced by Professor Rodney Brooks. Transitions can be triggered, for example, depending on perception changes or elapsed time. The prototype exhibits all kinds of moods, and demands attention from time to time. It gets hungry (for light) and may get very depressed if not provided enough stimuli or attention. The Crab may even demonstrate suicidal actionsÑfor exam- ple, jumping off the desk on purpose.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

13

Figure 9. The Crab Block Diagram

Left ambient Right ambient light sensor light sensor Front IRLEDs

Mouth interrupter

Floor IRLED Floor IRLED left Wheel index sensors right

124 millimeters

Beacon IRLED

88 millimeters

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

14

Figure 10. The Crab Schematic Diagram MOT2 MOT1 ~ ~ 2 2 1 1

C7 C8

12 12 1K 100nF r Front 100µF + 2 2 1 1

2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1

1K 2 Beacon 2 1 1

3 2 2 2 2 3 3 3 3 3 2 3 2 2 3 2 1K 2 l Front 2 1 1 1 1 1 1 1 1 1 1

1K 2 Green 2 1 1

1K 12 12 r Index 12 12 12 12 12 12 2 2 1 1 1K 1K 1K 1K 1

1K 10R 10R 10R 10•R l Index 2 2 1 1 3

1K IR1 Mouth 2 2 1 1 SFH506 2

1K 2 right Floor 2 1 1

1K 2 left Floor 2 1 1 2 2 2 1 1 1

- - - + + 2 1 100nF

100K 2 1 Rightbump

BAT2 BAT1 BAT3 2 1 2 1 100nF

100K 2 1 Leftbump 2 1 2 1 1 2 1K Piezo 19 20 21 23 4 5 6 7 18 11 12 13 14 15 17 16 P00 P01 P02 P03 P04 P05 P06 P07 P30 P31 P32 P33 P34 P35 P36 P37 22 00 IC1 GND Z86E31 P20 P21 P22 P23 P24 P25 P26 P27 osc1 osc2 Back 2 1 2 1 2 2 1 1 50pF 100nF 2 1 2 1 100K C1 100R 10nF 1K 12 1 2 2 1 1 1 1 1 2 2 2 2 2 2 2 1 1 1 Floor L Front L Floor R Front R 100K 100K 100K Mouth 12 12 12 Index L Index R 12 100nF

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

15

Desktop Fountain Submitted by: Don Deschane

Abstract This project is a desktop-size pulsed water fountain with multiple jets. Each jet operates by quickly boiling a small amount of water at the bottom of a tube. The gas bubble created pushes the water in the tube a few inches up into the air. The same concept is used in coffee percolators and ink jet print heads. In this case, the largest jet is no more than 1mm in diameter. A Z8 microcontroller controls and monitors each jet individually, and causes an array of jets to pulse in various patterns and rhythms. Some jets point directly upwards, causing a splatter effect, while others are aimed at an angle, causing tubes or bubbles of water to fly up and follow a hyperbolic trajectory on the way back down into the fountain. Different incarnations of the product feature different numbers, sizes, and arrangement of jets and other options, such as underwater illumination and buttons to select patterns. The heart of the fountain is the jet boiler, one per jet. The bottom surface contains a resistor, which heats up when power is applied. Water enters from the sides in one or more small tubes and exits primarily through the larger top opening when a steam bubble forms on the heaters. The microcontroller monitors the temperature of the heater in real time to determine when the bubble forms, and subsequently turns off the heater. Each heating cycle begins with a cool temperature. When power is applied, the heater temperature increases gradually as the water warms, then quickly as the water boils and stops absorbing the heat. Power is turned off and as new water enters the chamber, the heaterÕs temperature drops. The heater temperature is measured using the Z8Õs A/D converter. The resistance varies with temperature. These changes are measured via the Z8 A/D converter connected to the jetÕs power drive sensor. Each jet should fire in a fraction of a , but with different size jets, the heat- ing time probably is not consistent, so the Z8 firmware must schedule the start of heating properly so that each bubble forms at the correct time (especially impor- tant for simultaneous firings). This system can he fine-tuned using real-time oper- ating information, which also compensates for variations in ambient water temperature, heater effectiveness, and power-supply voltage from unit to unit, over time. Monitoring the jets can also detect when the fountain runs out of water, clogs up, or gets knocked over. If a heater heats up too quickly or fails to cool, the fountain shuts down.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

16

Figure 11. Desktop Fountain Block Diagram

GSC Jet0 - Repeat for each jet

Power Driver

OUT + Jet Heater

SENSE

Z8 Microcontroller

7 more jets

Power/Status LED

Note: Other versions may support more jets with additional MUX circuits and/or larger Z8.

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

17

Figure 12. Desktop Fountain Schematic Diagram

Power Supply +12 +12 (regulated) 120VAC +5 +5 (regulated) +12 GND

heater (JET0)

16MHz Z86C83 drive +5 OSC XTAL1 P00 sense ACC

P01 JET1 AC1

P02 JET2 ¥• Duplicate jet driver for each jet heater. AC2 ¥• Actual component values and driver Unlisted pins are • design depends on size and power unconnected P03 JET3 • requirements of each jet. AC3

P04 JET4 THIS VERSION SUPPORTS 8 JETS +5 VCC AC4

AVCC P05 JET5 GND AC5

AGND P06 JET6 AC6

P34 JET7 AC7 P36

470 LED• ON = ON • 0FF = OFF • FLASH = FAULT

AN004901-0900

ZiLOG Design Concepts Z8 Application Ideas

18

DCF77 Clock Submitted by: Andreas Richter

Abstract This project describes a stand-alone clock. The clock uses a ZiLOG Z86E08, con- trolled by the DCF77 Time Signal, which is used in . The clock pro- vides time functions to the exact second, and date functions (, , and ). The display consists of a 6 x 7-segment LED display with a common cathode. By using the Z86E08, the hardware is reduced to a 74HC138 demultiplexer, resis- tors, and a DCF77 receiver (Conrad Electronics 64 1138). The software performs the display multiplexing, decodes the DCF77 signal, and generates a stand-alone clock. The clock is synchronized by the DCF77 signal.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

19

Figure 13. DCF77 Clock Schematic Diagram K K +5V

K

/Q6 GND

/Q5 /Q7

/Q4 E3

/Q3 /E2

7-Segment Displays Common Kathode

/Q2 /E1

/Q1 A2

/Q0 A1

Vcc A0 P 74HCT138 KK K A G D FB +5V EC Date/Time +5V F E B A P D C G 4.7k P2.3 P2.2 P2.1 P2.0 P0.2 P0.1 P0.0 P3.3 +5V GND Z86E08 10k P2.4 P2.5 P2.6 P2.7 Vcc XTAL2 XTAL1 P3.1 P3.2 8x100 Ohm DCF77-Signal 2x47p 12MHz +5V

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

20

Diagnostic Compressor Protector Submitted by: Mark E. Miller

Abstract The majority of Heating, Ventilating, and Cooling (HVAC) system failures occur over a period of time. When a compressor fails to operate, it is usually after con- tinuous operation while incurring a system fault. The product presented in this design is an early-warning device that monitors key parameters. It also functions as a compressor protector that inhibits operation in potentially damaging condi- tions such as electrical brown-outs, overheating, and overpressure. Using this device results in savings for the homeowner (minor repairs cost less than replac- ing a compressor), minimizes diagnostic time for the service person (diagnostic codes are output to several places), and reduces warranty returns to original equipment manufacturers (OEMs). The control is a low-cost design that performs an anti-short cycle (ASC) function and diagnostics. The anti-short cycle operation is accomplished by monitoring when the compressor is being requested to run. After a run cycle completes, it is inhibited from running for 3Ð5 , thereby allowing the pressure in the sys- tem to equalize before the run cycle starts again. As a diagnostic device, the con- trol monitors the voltage, temperature, pressure, and vibration of a compressorÕs operation. A low threshold is established for each parameter to alert the owner that service is required prior to a catastrophic failure. A high threshold, also moni- tored, diagnoses fault conditions. The most damaging system failures occur when more than one parameter goes out of range (an example would be high pressure and high temperature). Using triangulation of the fault parameters to lock out compressor operation reduces misdiagnosis and false lockouts. The ZiLOG Z86C04/Z86C08 and Z86C03/Z86C06 microcontrollers lend them- selves well to this design. The comparator inputs are invaluable for the analog inputs and are required for accurate thresholds. The programmable timer is also a key feature that is useful for some of the time-related thresholds. The ZiLOG pin- out compatibility permits a single layout that can be populated in several ways, such as a low-cost minimum-protection device (Z86C03), an optional serial port for data logging/external interface (Z86C06), and added algorithms for extended compressor life (Z86C04/Z86C08).

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

21

Table 2. Sensor Inputs

Input Name Low Threshold High Threshold Comments 24VAC Control Voltage The control voltage drops The control voltage is Monitors voltage to keep below 16VAC below 18VAC and above from operation during 16VAC brownouts, eliminates contact chatter Pressure Switch The pressure switch The pressure switch Used to evaluate over- cycles more than twice cycles more than five pressure conditions during six of run times during six hours of resulting from improper time run time refrigerant charge or flow Compressor Discharge 120¼F is the minimum 250¼F is the maximum Exceeding the threshold Temperature discharge temperature; discharge temperature; is early warning; time below the threshold time above threshold and determine determines severity determines severity severity Vibration Sensor A low-level threshold is Duration and frequency Ignored during startup set to monitor vibrations exceeding 10G is used and shut down periods exceeding 10G for high threshold

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

22

Figure 14. Diagnostic Compressor Protector Block Diagram Alarm Audible May be mounted in outdoor unit or remote Modem, etc. Data Port for Contacts Optional Serial RF transmitter,

Future Expansion

High-Voltage ie, RS485, display, SERIAL PORT SERIAL ON/OFF and Outdoor Fan Turns Compressor T7N

Compressor Contactor 8E48CD4052 Z86E04/8 TEST RESET CONTACTOR ALARM SWITCH system Switch LIGHT FAULT PRESSURE in Use Pressure Switch already High- Pressure

VIBRATION DISCHARGE COMMON SENSOR THRMISTOR 24 VAC INPUT Attach to top of Vibration Sensor compressor using large Hose Clamp Compressor 24VAC = ON Y Request for Common = OFF 24VAC Secondary side Fault Light Indorr Wall Thermostat of Compressor 240/24VAC to discharge line 100K Thermistor Transformer Clamp Thermistor Fault Light Control Line 240VAC Primary side of Transformer

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

23

Figure 15. Diagnostic Compressor Protector Schematic Diagram

Contactor Fault Light Fault Alarm Piezo

Compressor Wall Thermostat Wall 24VDC External P4 P19 P10 P11 1 3/16 +5VDC Q4 MPSA58 C12 .1µF 100V 1 1 2 1 M 2 1 VDD 3 1 1 PS D11 LED D3 -24VDC Diagnostic 2 K1 T70 2 R20 R17 R9 2k 1/8W 2k 1/8W 12 12 160 1W D4 1N4007 11 Q3 MPSA58 1 Q2 MPSA58 1 1 2 1 2 1 2 +5VDC 24VAC 3 3 1 Q1 MPSA06 +5VDC 10K R11

1/8W 1

3 1 P17:1 2 1

R16

1 Ð24VDC

2k 1/8W 2 12

CONN9M

2 P12:1

1K

1 R23

1/8W

R10 CLK

CONN9M 2K 1/8W

2 1 1

P13:1

1K Clock

1 R21

1/8W

DI Data In Data

CONN9M 2 1 P15:1

1K

1 R22

1/8W

18 17 16 15 14 13 12 11 10 DO Out Data

CONN9M 2 1

Serial Communications Port for Add-on Devices

P16:1 P23 P22 P21 P20 P02 P01 P00 P33

GND 1

C11 33pF 50V CONN9M 1 2 1 P24 P25 P26 P27 VCC XTAL2 XTAL1 P31 P32 U1 Z86C04 1 2 3 4 5 6 7 8 9 1 R15 10K R29 1/8W 100K 1/8W +5VDC 2 2 1 1 2 D12 R25 1N4007 1 1/8W 100K 2 1 1 R26 1 1/8W 100K R27 -24VDC +5VDC 2 1 12 100k 1/8W VSS C9 50V 100µF + 1 Gnd Logic 2 1 13 3 10K R24 1/4W D6 D9 D8 D10 X Y 1N4007 1N4007 1N4007 1N4007 12 11 2 1 P21 Gnd Logic U2 4052 A B INH X0 X1 X2 X3 Y0 Y1 Y2 Y3 D2 9 8 1 5 2 4 1N4007 12 Test Input R28 R30 R31 R32 16 12 14 15 11 P20 1212 1212 1212 12 100k 1/8W 100k 1/8W 100k 1/8W R33 R34 26.1k 1/8W R 1/8W 1/8W 100K 100K 1 1 1 2 2 1 +5VDC 2 1 2 1 2 1 1 +5VDC 5V 5V 5V Z1 Z4 Z5 C6 C1 C2 50V 50V 50V 22µF .01µF 0.1µF Gnd 2 2 2 Logic 1 1 1 R13 12 R19 R18 100k 1/4W R1 R4 12 12 R12 R2 R6 100k 1/4W 100k 1/4W 1/4W R7 33.2K 1/8W 1/8W 100K 100K 12 12 2k 2W 100k 1/4W 100k 1/4W C5 12 50V 1 2 47µF 1 1 1 2 1 1 2 + +5VDC +5VDC +5VDC 2 1 D5 1N4007 12 R8 10K R14 1/4W 1/4W 3.01K 1 D7 2 1 1 2 1N4007 Z3 12 20V C3 2 .1µF 100V D1 1N4007 12 R3 R5 C4 2W 7W 300 1.5K .1µF 100V 2 1 1 2 2 1 P9 P8

R

P14 P2 P6 P7 P1 1

PS 100mV/G 1

+5VDC 1

P5 P3

24VAC Thermostat Thermistor 100k 24VAC 0-5V Input

VSS

Common

Sensor Wall From Sensor Transducer

Pressure Switch Pressure ÒYÓ 24VAC Discharge Vibration

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

24

Digital Dimmer Box Submitted by: R. Hugo Vieira Neto and Francisco Eugenio Mauro

Abstract The Digital Dimmer Box is intended for stage illumination in theaters. It is simple and inexpensive. Designed with a ZiLOG Z8 OTP microcontroller, the device is completely compatible with older analog dimmer boxes and supports 4400-Watt loads. In stage illumination, dimming of each incandescent lamp is controlled by an ana- log voltage (ranging from 0 to 10 volts) and is supplied by a remote console. To achieve linear perception, a dimmer box should exhibit a nonlinear response to the control voltage. Older dimmer boxes employ analog processing for the task of compensation. The digital approach uses a simple software look-up table concept to implement response compensation. As a result, a dedicated external analog circuit is not required. The system control block uses the Z86E08 microcontroller running at 12 MHz. Some of the Z86E08Õs key features are: ¥ Onboard counter/timers with prescalers (generation of phase-control signals) ¥ Onboard analog comparators (AC line zero-crossing detection and control voltage acquisition) ¥ ROM (implementation of one or more look-up tables for visual response compensation)

To implement the A/D converter, an R-2R network is mounted on port P2. The out- put is used as the reference voltage (pin P33) for the Z8Õs onboard analog com- parators on port P3. The analog control voltage is connected to the first analog comparator input (pin P31) and the A/D conversion is completed by software using a successive approximation technique. The counter/timer generates a time delay between the zero-crossing of the line voltage and the TRIACÕs triggering pulse. As a result, power is delivered to the load. At 12 MHz, it is possible to achieve delays from 0 to 8.33ms with the correct settings of the counter/timer prescaler, which corresponds to the phase-triggering range for an AC line frequency of 60Hz.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

25

Figure 16. Digital Dimmer Box Block Diagram

DIMMER BOX

A/D Control Voltage Remote Converter Console

System Zero- Crossing AC Line Control Detector (220V)

Load TRIAC (4400W)

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

26

Figure 17. Digital Dimmer Box Schematic Diagram R3 R5 R9 R13 R16 R18 R21 R23 20.0K 10.0K 10.0K 10.0K 10.0K 10.0K 10.0K 10.0K R2 R4 R8 R12 R15 R17 R20 R22 20.0K 20.0K 20.0K 20.0K 20.0K 20.0K 20.0K 20.0K C2 22pF 6 15 16 17 18 1 2 3 4 P20 P21 P22 P23 P24 P25 P26 P27 XTAL2 X1 U2 12.0000MHz P00 P01 P02 P31 P32 P33 Z86E0812PSC 7 8 9 11 12 13 10 C1 22pF D4 1N 4148 C5 100nF D3 1N 4148 C3 C4 10µF/ 25V 100nF D2 1N 4148 D1 1N4148 +5V R7 1k R19 10k +5V V0 2 LED R1 20.0k R6 20.0k G 78L05 18k R14 U3 V1 13 LED1 C6 1000µF/ 25V D6 1N 4007 +5V R11 330R D5 1N 4007 CONTROL VOLTAGE (0-10V) U1 MOC 3020N S1 S2 S3 61 42 T1 6+6V/100mA R10 180R P2 P1 Q1 MAC 224A10 4400W LOAD1 (220V) AC LINE

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

27

Door Access Controller Submitted by: Suksaeng Kukanok

Abstract The Z8 Door Access Controller (Z8DAC) screens an authorized person for access to a restricted area. The Z8 microcontroller is used as the main controller. This application uses most of the on-chip resources, such as program memory, regis- ter, I/O, timer and interrupts. The Z8DAC can be set up as a multiple Z8DAC configuration, using an RS-485 interface or one Z8DAC configuration using an RS-232 interface. The Z86E30 microcontroller configuration consists of a magnetic card reader, keyboard, LCD display, I2C EEPROM, I2C RTC, and an asynchronous bus and door control ports. When using the magnetic card reader, The Z8 looks up the card ID using the ID parameter in the EEPROM. The content of the parameter provides the time allowed for access and the access key code (if necessary). If the controller requires a key code, the user must key in the access code within 30 seconds. If the unauthorized code is tried more times than the maximum number allowed, a panic signal is generated on P27. After the Z8 determines that access is allowed, the door unlocks itself. When the door opens, the door sensor sends a signal to the controller and locks the door. The parameter and each authorized ID are downloaded to the target Z8DAC. The PC on the system can be connected online or offline. If it is an online connection, the PC monitors in real time. If the connection is offline, the PC monitors using a batch process.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

28

Figure 18. Door Access Controller Block Diagram

Host Controller and Monitor

RS485

Z8DAC#1 Z8DAC#2 Z8DAC#N Block diagram when connected with PC via RS485

Host Controller and Monitor

RS232

Z8DAC Block diagram when connected with PC via RS232

Key Pad LCD Display 12:00 > 123456

RTC I2C Serial Communication Z8DAC with PC Core

I2C RAM PC

Door Lock Control

Door Sensor

Door Control Alarm Functional block diagram

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

29

Figure 19. Door Access Controller Schematic Diagram Txd 1 Rxd 2 Gnd 3 A 2 B 1 Gnd 3 100 R14 C5 22/16 C6 22/16 10k R17

150 R13 1 2 10k R16 1 3 4 5 14 13 7 8 D6 C313 Ri Ri To To 10k VCC

R15

C1Ð C2Ð C1+ C2+

8 16 15 CO3

R1 R2

7 VCC D5 C313 D5 C313 GND

CO2 T1 T2

6 CO1

V+ VÐ Ti Ro Ti Ro 5 R4 U6 MAX232

2 6 9 4

R3 11 12 10

3

R2 C4

2 22/16

R1 10k 10k C3 R11 R12 1 22/16

VCC P5 Key Pad Connector

Cathode C2

6 7

16 22/16

Anode

15 A B

DB7

14 VCC

DB6

13

DB5 8

R 5

12 D

DB4 RS E DB5 DB7 VCC VCC GND

11 RX485 RX232 TX485 TX232 DB3

10 2 4 6 8 10 12 14

DB2 Tx DE /RE Rx

9 U5 75176 E K

2 3 2 3

DB1 RS NC 4 3 2 1

8 Vcc

DB5 DB7 JP4 JP5

DB0 1 1

7

E P6 6

R/W TX485 DIR RX485

5 RX TX

RS

4 LCD Connector

Gnd Vo RW DB4 DB6 A NC

Vo

3 1 3 5 7 9

VCC 11 13

2

GND 1 U9 SC1601D GND Vo DB4 DB6 B_ligh Magnetic RCP RDD GND +5 Connector B1 CR2016 VCC 3 2 1 10k VR1 1k R8 RCP RDD 10k R10 VCC R9 10k VCC 2 1 DB4 DB5 DB6 DB7 CO1 CO2 CO3 RX INT RDD RCP TX DIR E RS 10 20 21 23 4 5 6 7 18 11 12 13 14 15 17 16 Z86E30 7 6 5

D2

P00 P01 P02 P03 P04 P05 P06 P07 P30 P31 P32 P33 P34 P35 P36 P37 BAT85

GND 8 VDD 22 INT

12 R7 SCL

SDA

VCC

GND 8 VDD 4 P20 P21 P22 P23 P24 P25 P26 P27 XTAL2 XTAL1 U1 VCC 1 2 3 9 24 25 26 27 28 10 OSCI OSCI AD U2 PCF8583 1 2 3 X1 1k R6 12MHz C7 5-30P or Fix 15P 2% SDA SCL Door Open Beep WP B-ligh Alarm Out 10k R18 C8 30p C9 30p X2 B-ligh KHz VCC 32.768 R2 10k S1 Door Sensor WP SCL SDA D1 BAT85 R5 3k9 R1 7 6 5 R4 10k 3k9 Q1 WP D4 Diode

BC327 SCL

SDA

Q2 GND VDD 4 8 D3 Diode BC327 VCC LS2 U3 AC A1 A2 Alarm Device 12V 24LC256 1 2 3

12V

K2 6 6

K1 5 5 K3

R3

3k9 4

WP SCL SDA 4

RELAY 12V Lock 3

3 Solenoid

RELAY 12V 7 6 5

2

2

Q3 1

WP 1

BC327 SCL SDA

GND 8 VDD 4 C1 1/250 VCC 12V LS1 Buzzer A0 A1 A2 U4 PCF8583 1 2 3

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

30

Electrolytic Capacitor ESR Meter Submitted by: Bob Parker

Abstract A major cause of electronic equipment failure is due to electrolytic capacitors developing excessive Equivalent Series Resistance (ESR). These capacitors may exhibit the characteristics of a normal capacitor, yet with a significant resistor in series. This design is for a digital meter that directly indicates the ESR of a capac- itor. A Z86E04 microcontroller, supported by a relatively small amount of hardware, allows the following features to be easily and economically implemented: ¥ Power on/off and test lead resistance zeroing with a single push-button ¥ Three automatically-selected measurement ranges ¥ Low battery voltage warning ¥ Automatic power switch-off

When pressed, the push-button initially forces Q1 to switch on. When running, the microcontroller switches to Q2. When the button is pressed again, Q2 is detected on P26. If the firmware measures the low resistance of shorted test leads, it sub- tracts their measured value from all ESR readings. However, if the firmware detects an open circuit, it switches off Q2 and consequently Q1, turning off the battery supply. A measurement begins when the microcontroller switches off the ramp-capacitor discharge transistor (Q11), allowing C10Õs voltage to increase linearly with time. One of the Z86E04 timers initiates a series of 8-µs pulses spaced 500µs apart, which drive either Q3, Q4, or Q5 to send current pulses of an amplitude depen- dent on the measurement range, through the capacitor under test. Between the pulses, Q6 is switched on to prevent the capacitor from accumulating a charge. The voltage pulses across the test capacitor, proportional to its ESR, are amplified and applied to the microcontrollerÕs P31 comparator. The firmware terminates this process when the voltage on C10 exceeds the amplified pulse amplitude. The total number of pulses is used to calculate and display the capacitorÕs ESR, after subtraction of the test lead resistance. Between measurement cycles, the microcontroller allows C10 time to charge to 2volts. If the battery voltage sample on its P32 comparator is below this 2volts, the firmware periodically flashes a b on the display as a Low-Battery warning.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

31

Display segment and decimal point data is sent serially from port 0 to a serial-to- parallel shift register (IC3), driving the LED displays that are multiplexed at a 100-Hz rate determined by the Z86E04Õs second timer. This timer additionally controls the automatic switch-off period and all other system timing. This design takes advantage of all the Z86E04 analog comparators and timers to produce a simple but versatile capacitor ESR meter. The firmware occupies about 700 bytes of program memory, and runs effortlessly at a 3.58-MHz crystal fre- quency.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

32

Figure 20. Electrolytic Capacitor ESR Meter Schematic Diagram 2V max 100mS max Display Circuitry Data Parallel Segment +5V (C10) capacitor Ramp gen. 9.4µA Serial-Parallel Shift Reg. (IC3) source current (Q9, 10) Constant LATCH DATA CLK DIGIT SELECT Switch (Q11) Ramp Cap Discharge P33 P27 P02 P01 P00 P23 - 3.58MHz - VCC OR IC2 + P31 + +5V Z86E0408 Z86E0412 GND X1 X2 P32 P25 P26 P22 P21 P20 P24 P31 +5V Capacitor discharge switch (Q6) OUT Driver (Q2) Power Switch Push button detect (IC1) R10 50mA Not to Scale IN +5V Regulator Sample 2V Batt. Voltage R8 5mA 8µS +5V R25 R26 (Q7, 8) Gain = +20 500µS Pulse Amplifier R6 0.5mA Q3 Q4 Q5

(Q1) + Ð Power switch ESR pulses Q3, 4, 5 switches Test current Current pulse 9V Battery Capacitor under test to capacitor ESR Zero Amplitude proportional On/Off/ Push Button

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

33

Electronic Door Control Submitted by: Fernando Garcia Sedano

Abstract Electronic door controls have been developed to control electrically-operated doors for railway toilets, especially for the handicapped. All commands received by the door control module are processed by the Z86E4016PEC microcontroller. The microcontroller also drives a ZiLOG Z853606VEC clock I/O (CIO). The CIO counts the encoder pulses and acts as a PWM generator. It uses two of three internal counter/timers. The Z86E40 software is used to modify the PWM-generated duty cycle and carrier frequency. Commands to and from the main toilet unit are sent via the octal D-latch U15 and D-latch U14. D-latch U17 implements the logic to satisfy the requirements of the Z8 timing signals and the Z84C15 intelligent peripheral controllerÕs (IPC) main control unit. The Z8 microcontroller uses an MG2-12 encoder to control door displacements, direction, and the opening and closing speeds. The electronic door control module has operated effectively on railway toilets in Spain since 1999.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

34

Figure 21. Electronic Door Control Block Diagram

MAIN CONTROL UNIT (Z84C15)

STATE COMMANDS

OUTPUT INPUT BUFFER BUFFER (74HCT373) (74HCT374)

Z8 MAIN CONTROLLER (Z86E40) 5 Vdc Z8

CIO COUNTER AND TIMER UNIT 5 Vdc CI0 (Z8536)

INPUT ISOLATION OUTPUT ISOLATION BARRIER BARRIER (4 X HCPL2211) (3 X HCPL2211)

FULL BRIDGE DRIVER 72 Vdc (HIP4082) H-Bridge (Full bridge)

Encoder Electric (DC) Motor MG 2-12 (DUNKER) E M GR 63x55 (DUNKER)

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

35

Firearm Locking System (FLS) Submitted by: Phillip F. King

Abstract The Firearm Locking System (FLS) is a firearm safety system designed to add an extra layer of protection to the keeping and use of guns. Using a Z8 microcontrol- ler, the FLS can make a firearm available and ready to use quickly when required, while virtually eliminating the chances of an accidental or unauthorized discharge. FLS can be manufactured into new firearms or added as an after-market option by a qualified gunsmith. It works with any existing mechanically-fired weapon, includ- ing handguns, rifles, and shotguns of any caliber. At the heart of the system is a Z86E83 Z8 microcontroller, the brain behind the FLS. The controller gathers input from sensors on the firearm (See Table 3), and out- puts a control signal to a mechanical solenoid that toggles the firearmÕs safety, typically by disengaging or blocking the firing pin or hammer. The software allows the user to define profiles of acceptable usage depending upon requirements. For example, a skeet-shooter might define an acceptable firing angle as anything above horizontal, while a handgun user who typically target shoots on an indoor range would allow a firing angle of only ±5 degrees off horizontal. Both users might also define a self-defense mode in which any firing angle is allowed.

Table 3. Firearm Sensor Input Functions

Input Function Rocker Switch Access Code Four rocker-toggle switches provide an eight-number Input input, and provides 8^N possible access codes for an N- digit code. Hand-Grip Sensor Senses pressure on the grip of the weapon that indicates it is being handled. Prevents accidental discharge when a weapon is dropped or transported. In self-defense mode, can also be used to determine, when a user has lost control of a firearm, to disable the weapon and prevent use by an assailant. Inclinometer Measures the current angle of the barrel. Prevents accidental discharge of a weapon being held in a rest or nonfiring position.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

36

Figure 22. Firearm Locking System Block Diagram

Inclinometer mounted in the axis of the barrel

1 3 5 7 Grip Switch Zilog Z8 OTP indicating that the Microcontroller gun is being held 2 4 6 8

Four dual-position switches for access code entry

Solenoid lock on firing pin and Indicator LED.

(Non-energized default position is safety-engaged)

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

37

Figure 23. Firearm Locking System Schematic Diagram RP1A Resistor 8pack-1K 1 16 2 15 S1 S2 3 14 4 13 S3 S4 .1µF C7 5 12 6 .1µF C6 11 S5 S6 .1µF C5 7 10 8 9 S7 .1µF C4 S8 22pF 22pF C1 C2 .1µF C3 VCC 8MHz Y1 (Recessed internal reset switch) S10 20 21 22 23 24 25 9 8 19 10 P00 P01 P02 P03 P04 P05 P06 26 XTAL1 XTAL2 /RESET AVCC AGND VCC is provided by a high-energy lithium cell 11 12 VCC GND VCC Q1 M1 Spring Balanced Solenoid (Mechanical interface to firing pin lock) MOSFET N U1 27 P21/AC1 P22/AC2 P23/AC3 P24/AC4 P25/AC5 P26/AC6 P27/AC7 P20 P31 P32 P33 P34 P35 P36 VCC 1 2 3 4 5 6 7 28 13 14 15 16 17 18 ZiLOG Z86E83 R1 1K S9 V_inc Analog variable capacitance inclinometer with built-in sense-amplifier. Q2 MOSFET N 1 2 VCC VCC GND Inclinometer U2 Inclinometer Power Control the gun wakes up FLS. use. Essentially, picking up Grip Switch-The Switch Stop Mode when not in active 32 that brings the system out of also generates the on Port

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

38

Forecaster Intelligent Water Delivery Valve Submitted by: James Martin

Abstract The Forecaster Intelligent Water Delivery Valve measures soil moisture and changes in air temperature and barometric pressure to prevent unnecessary watering before, during, or after natural rainfall. Simple analysis of three sensor readings over time determines whether to postpone water delivery in expectation of natural rainfall, or to skip to the next programmed cycle. The primary function of the Z8 microcontroller is timed actuation of an electric water valve. Timing may be relative or absoluteÑrelative timing is described herein for simplicity. User selection of watering schedule and duration can be set in a routine as simple as a relative start time (for example, hours from now) and duration (in ten- increments), and can be implemented with only two push-buttons. The sensors are used as follows: ¥ A simple moisture sensor reads true when water is present. This value effects a delay in valve actuation during or immediately after rainfall. Two other sensors utilize the available on-chip dual analog comparators. The first comparator is used to read the resistance of a temperature probe as part of a charging and discharging RC. An output pin is turned on, providing both a reference to the noninverting input to the comparator, and a charging voltage to the RC, which consists of a known capacitor and the resistance of the probe. An interrupt is generated when the RC is charged. The output pin can then be set Low. Another interrupt occurs when the RC is discharged (the time between interrupts can be used to calculate the resistance). ¥ The capacitance of the barometric pressure sensor can be determined in the same manner using the second comparator. A known resistance and the sensor capacitance together form the RC. ¥ The sensors can be polled in regular increments (for example, every 30 minutes). Absolute changes that exceed programmed limits trigger a delay if scheduled watering is about to occur.

This system allows regular watering to occur only in the absence of sufficient nat- ural rainfall, and when rain is not expected to occur based on temperature and pressure changes.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

39

Figure 24. Forecaster Intelligent Water Delivery Valve Schematic

Valve

Z86

VCC I/O 5 GND Comparators Programming Switches I/O 4 Pressure Probe IRQ I/O 3

I/O 2 Temperature Probe

I/O 1 H2O Sensor IRQ

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

40

Improved Linear Single-Slope ADC Submitted by: Li Gang

Abstract A highly accurate linear single-slope ADC is achieved by using a linear integrator and two comparison units on a Z8 microcontroller. A MAX418 is a high-input-impedance, low-power-consuming and rail-rail opera- tional amplifier. Combined with a resistor R4, a capacitor C1 and a diode 1N4148, it forms a linear integrator. At usual status, the P00 is set to one, and the output of the integrator is at a low level. To start the ADC conversion, set P00 to 0 to charge the integrator until its output increases. When the output of the integrator equals the voltage at P32, the comparison unit at P32 operates, allowing the timer to begin counting. The output of the integrator continues to increase. When it reaches the voltage level at P31, the comparison unit at P31 operates and the timer stops counting. As a result, the number in the timer displays the voltage dif- ference between P31 and P32. This kind of single-slope ADC exhibits higher accuracy than either PWM Ramp ADC or RC Ramp ADC, due to a linear integra- tor, rather than an exponential one, and makes use of the middle range of its input-output characteristic curve. A MAX619 is used to convert 3volts to a stable 5volts. The MAX418 features two operational amplifiersÑone is used as a buffer, and the other is used to form a lin- ear integrator as described above. The 2-point calibration is used instead of the conventional 1-point calibration. The calibration values are stored in an EEPROM (1C3, 24LC01), resulting in a great improvement in its measurement precision. The calibration is performed automatically. Insert the probe into the standard acid or alkali liquid, and press the calibration key K1. The microcontroller automatically determines that the measured calibration liquid is acid or alkali liquid. After the measurement value becomes stable, the Z8 stores the calibration results into 1C3 (24LC01) and the buzzer rings, indicating the calibration finished. For measure- ment, insert the probe into the liquid to be measured and press K2 to begin the measurement. If the differences among five successive measurement values are within a certain range, then the stable-measurement state is determined and the result is displayed on the LCD. The buzzer sounds, indicating that the measure- ment is completed. The final results are provided by linear interpretation with the two calibration points.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

41

Figure 25. Improved Linear Single Slope ADC Block Diagram

Z86C40 LCD Comparator P31 PH Probe Buffer

EEPROM P33 Integrator Comparator

P32 Vref Battery and Power Manager

P00

Keys

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

42

Figure 26. Improved Linear Single Slope ADC Schematic Diagram 3V Battery K4 VCC C9 10µF VSS K3 LCD VCC IC3 24LC01 7 R5 1K C8 0.22 WP SC SDA 18 BEEP 6 IC2 8 MAX619 C10 10µF C7 0.22 1 32 P20 P21 P22 P23 P24 P25 RESET IC1 VCC GND Z86C40 P31 P33 P32 P00 P04 P05 XTAL1 XTAL2 K2 K1 12MHz C6 0.047 C2 1/2 MAX418 1/2 MAX418 10µF 1N4148 C3 C4 27pF 27pF A1 A2 - + + - R4 10K C5 10µF C1 0.22 R1 10K R2 10K R3 1K PH Probe

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

43

Integrated Sailboat Electronic System Submitted by: David R. Sneitzer

Abstract The Integrated Sailboat Electronics System (ISES), by taking advantage of the price and feature set of the microcontroller, is able to provide a low-cost instru- ment with a level of integration never before seen in the sailing community at any price. It integrates the information in Table 4 onto a low-cost monochrome-graph- ics display.

Table 4. Graphics Display Features

Wind speed Heal angle Wind direction Heading Air temperature Boat speed Water temperature Distance Total/Elapsed Barometric pressure Time Total/Elapsed Depth Power (Voltage/Current)

ISES utilizes a state-of-the-art micromachined silicon ultrasonic transducer with a Z8 at the core of the sensor. By using two pairs of ultrasonic transducers, the x and y components of the wind can be measured. In order to determine the x com- ponent of the wind, the sensor pair aligned with the centerline of the boat is uti- lized. One of the transducers emits an ultrasonic pulse and Z8 reads the time delay until the pulse is received. For the same sensor pair, the roles are reversed. The time it takes for the sound to travel (propagate) through the air is dependent on air tem- perature and the speed the air is moving the sensors. By computing the aver- of the two delays, the propagation time through still air is calculated by the Z8 and the virtual air temperature is calculated. The air temperature is used to make corrections for the velocity calculation. This same procedure is used by the Z8 to calculate the component of the wind. A dual- axis accelerometer is placed in the y,z plane to acquire the angle that the boat is heeled at. The Z8 applies the heel angle to the y component of the wind to create wind speed and direction. The Z8 is also used as an I/O and display processor.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

44

Figure 27. Integrated Sailboat Electronic System Block Diagram

10.1 mi 271 79 01:27 62

12.5 KTS 028¼

6.7 KTS 59 FT

air• lo:49¼ high:83¼ 13.2 Volts water•lo:59¼ high:63¼ 1.75 Amps baro• lo:29.1¼ high:31.1¼ 74 Amp hrs since last charge 5,023• Miles wind• lo:1.3 avg:10 high:18.7 56 Amp hrs estimated remain 1825• Hours 10.1•• Miles 1.4•• Hours

Figure 28. Integrated Sailboat Electronic System Schematic Diagram

10.1 mi 271 79 Boat speed 01:27 62 sensor

2-axis Boat speed Mast mounted Z8, 12.5 KTS acceler- sensor Ultrasonic sensors, 028¼ ometer Interface electronics 2-axis Pressureacceler- 6.7 KTS 59 FT ometersensor

PressureHeading sensor Sensor analog HeadingVoltage interface sensor

Serial Com. Analog input VoltageCurrent interface sensor

CurrentTemp. sensor Non-volatile Simple memory keyboard TemperatureDepth sensor

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

45

Intelligent Guide for the Blind Submitted by: R. Sharath Kumar

Abstract This self-contained, self-propelled, intelligent guide incorporates the ZiLOG Z86E31 microcontroller. Using ultrasonic and infrared transducers, the surround- ings are scanned for complete, intricate detail, including pavement-surface defor- mations, puddles, and pits apart from general traffic. The microcontroller analyzes this information, determines the safest path, and controls a propulsion motor to manipulate and lead the handicapped safely through these obstacles. The guide further interacts with the individual via audio messages, informing of the surround- ings and distance traveled. A chosen direction of travel is commanded via push- button keys. The microcontroller immediately repositions the scanners toward this direction. An indicator lamp pulses on/off, together with a beeper, to alert a person of any slow-moving traffic or obstruction. The guide can also be programmed to remember the direction traveled automatically when commanded. The direction commands include Straight Ahead, Turn Left, Turn Right, and Reverse Back, and are received from keys SW1ÐSW4. The stepper motor is con- trolled in half-steps for increased position control by the microcontroller. A ping- pulse wave is emitted and transmitted through the air by the microcontroller through a 40-kHz ultrasonic transmitting transducer. The wave, reflected off objects in its path, is detected by the receiving transducer. The received echo is amplified, centered, and compared against a fixed reference voltage by an LM6132, and fed to the microcontroller. The microcontroller measures the timing of the wave from the instant it leaves the transmitter to the instant an echo is received (taking the Doppler effect into account) and calculates the distance. After the guide orients itself in the commanded direction, scanning continues in an oscillating mode. During this mode, the microcontroller continuously monitors the echo signals and maneuvers the movement accordingly. An infrared sensor is activated at the same time as the ultrasonic transceiver. This sensor scans the pavement surface ahead. Infrared transmitter D1A is pulsed on/ off at 1kHz, and the bounced signal is captured by D1B. The signal strength depends on the distance from the obstruction. This variable-strength signal is con- verted proportionally into pulses by the voltage-to-frequency converter, LM331. All information is updated to the individual via prerecorded messages. The sound chip is configured to operate in MESSAGE CUEING mode.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

46

Figure 29. Intelligent Guide for the Blind Block Diagram

Infra-red LM331 Voltage to ULN2803 7.5 Degree Receiver Stepper Motor M Stepper Motor D1B Frequency Converter Driver

Infra-red Transmitter Roll-on Motor 1 D1A Roll-on Motor 2

Z86E31 RPM Pulses Input 400 KHz Micro Controller Ultrasonic Beeper Transmitter Lamp Indicator

LM6132 OpAmp 400 KHz Amplifier and Ultrasonic Comparator Speaker Receiver User Desired ISO2590 Sound Chip Direction Inputs

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

47

Figure 30. Intelligent Guide for the Blind Schematic Diagram Vcc Q3 SL100 Roll-on Motor Supply M2 Q5 TIP31A D5 Vcc 1N4148 Beeper Q2 SL100 D7 1N4007 M1 Q4 TIP31A D4 R19 1N4148 D6 R19 1N4007 R19 A1 A2 B1 B2 Vcc R19 Speaker Ð + 7.5 Degree Stepper Motor 5 9 28 14 15 10 27 Supply 18 17 16 15 Stepper Motor 9 Vcc +VE 13 16 ULN2803 1 23 24 25 2 3 4 6 7 8 11 12 17 18 19 20 21 26 1 2 3 4 I/P RPM Pulses 10k x 4 nos R7 R8 R9 R6 1 2 3 4 5 6 7 15 16 17 14 11 28 22 8 Vcc Z86E31 12 16 18 9 10 19 20 21 23 24 SW4 XTAL C4 20pF D3 SW3 220 R10 1N4148 7.328MHz C3 20pF C2 SW2 100nF D2 1N4148 R17 3k3 Vcc R5 1k2 R4 1k SW1 C6 330pF R18 6k8 Vcc C1 47nF 3 5 4k7 R11 R12 R13 R14 Decay 8 4 adjust pot. Vcc 6 7 Vcc SW1 = Front SW2 - Back SW3 = Right SW4 = Left 1 6 7 2 4 8 Vcc R16 5k 3 2 1 5 C5 0.001µF DIA Infra-red transmitter R3 Q1 2N2222A R15 4k7 510k R1 Vcc 27k R2 510 Vcc = +5 Volts = Ground DIB receiver Infra-red Receiver Ultrasonic Ultrasonic Transmitter

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

48

Internet Email Reporting Engine Submitted by: Michael W. Johnson

Abstract The Internet Email Reporting Engine is a design that can he embedded inside a device to connect via a dial-up function to an Internet Service Provider, and send email reports to anywhere on the Internet. A ZiLOG Z02204 modem module provides the connection to the real world via a phone line. The Seiko iChip (S7600A) provides PPP and PAP authentication, and the Internet protocols IP, UDP, TCP, and ICMP. The ZiLOG Z8 controller receives commands from a serial connection and com- municates to the Seiko iChip via an 8-bit parallel CPU interface to control the modem and the iChipÕs Internet functionality. The Z8 MCU also provides a higher- level command and Internet functionality via software The software running on the ZiLOG Z8 CPU receives commands via a serial inter- face and processes them. Based on those commands, the Z8 performs dial-up and connects to the Internet, establishes an Internet connection to an ISP via the PPP protocol (authenticated with PAP), and opens a connection to a mail server. It then sends a message, and hangs up. Commands are sent to the engine via a serial port that is implemented as a soft- ware UART running at 2400bps on the Z8 controller. These commands are pro- cessed, the state of the email engine is updated, and a command status code is reported back through a software UART.

Table 5. Serial Commands sn Set phone number sl Set login name sp Set password sd Set DNS server IP sr Set recipient email address ss Set SRC email address du Dial-up and connect to ISP cs Connect to email server ps Print message to email body ms Message send hu Hang up

Each command is a parameter string that terminates with a return and a line feed. The software responds to each command using a return code that terminates with a return and a line feed. Once a connection is made to the Internet, sending email is as simple as configur- ing an email server to connect, choosing a recipient, and sending text as the body of the email.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

49

Figure 31. Internet Email Reporting Engine Block Diagram

DB9 5 X 2 Header

Optional RS232- CMOS/TTL C Level Serial Interface Converter/DB9 Header DCE iface

ZiLOG Z86E3116 CPU DC

7Ð15 V Seiko iChip Internet Data

Pump (S7600A) Clock/Divider Power Supply

ZiLOG Z02400 Modem Module

RJ-11 Phone Jack

Figure 32. Internet Email Reporting Engine Software Block Diagram

Software UART

Command Processor

SMTP API

Setup/ PPP Socket API Config Dialer Check

Seiko CPU Interface

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

50

Figure 33. Internet Email Reporting Engine Schematic Diagram C5 1µF + Jack C9 0.1µF RJ11 1 2 3 4 +3.3V D1 3.3V Zener .1 .1 C9 C10 +3.3V R1 200 FB1 FB2 C8 0.1µF C4 10µF + +5V J2-1 J2-2 J2-3 J2-4 J2-5 2 N/C N/C N/C TTP C7 0.1µF RING GND V in +5V Power Supply U2 78L05 C3 50µF Decoupling Caps 13 + Vcc Gnd DTR DCD MUTE AOUT N/C RXD TXD Z02400 Modem Module Zilog Modem Module C6 0.1µF J1-1 J1-2 J1-3 J1-4 J1-5 J1-6 J1-7 J1-8 J1-9 +5V 2 1 TXD +5V RXD /DTR /DCD C5 0.1µF 7-15 Vdc Power Connector +5V +3.3V TXD RXD /DTR /DCD XCLK RESET XCLK 9 8 7 6 5 2 4 1 3 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 7 6 5 3 2 4 1 13 12 14 15 xri xrtsj xtxd xdtrj xrxd xtcsj vss1 xdsrj xtest xdcd vdd1 xclock xresetj QI QJ QL QF QA QB QE QK QH QC QD QG xpar_in3 xpar_in4 xpar_in5 xpar_in6 xpar_in7 xpar_out1 xpar_out2 xpar_out3 xpar_out4 xpar_out5 xpar_out6 xpar_out7 CLR CLK HC4040 U3 Clock Divider (/32) 11 10 xsd0 xsd1 xsd2 xsd3 xsd4 xsd5 vdd2 xscan_ctl xsd6 xscan_en N/C xsd7 xsys_busyj xsys_int2 xsys_int1 xsys_intctrl xsys_writej xsys_psx vss2 xsys_readj xsys_c86 xsys_cs xsys_rs U2 Seiko S7600A Seiko iChip Internet Data Pump 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 SYSCLK D0 D1 D2 D3 D4 D5 D6 D7 CS RS RD INT WR BUSYX D3 D2 D1 D0 RS CS RD WR CTXD +3.3V +3.3V BUSYX 28 27 26 25 24 23 22 21 20 19 18 17 16 15 C10 .1µF + Vss RSTX CRXD P24 P23 P22 P21 P20 P03 P02 P01 P00 P30 P36 P37 P35 12 9 14 7 4 5

C13.1µF

5 P25 P26 P27 P04 P05 P06 P07 Vcc XTAL2 XTAL1 P31 P32 P33 P34 +

Zilog Z86E3116 U1 RSTX Zilog Z8 CPU RSRX 9 VÐ C2Ð C2+

CRXD

4 1 2 3 4 5 6 7 8 9 T1 OUT T2 OUT R1 OUT R2 OUT 10 11 12 13 14

8 (pin 6 MAX232) 3 C12 .1µF D4 D5 D6 D7 INT

+ CRXD R1 IN R2 IN T1 IN T2 IN C1+ C1Ð 7 MAX232E U5 2 4 6 8 SYSCLK V+

10

+5V 8 1 3

2 13 11 10

C2 27pF 6 DB9 Serial (DCE) (pin 2 MAX232) +5V

CMOS/TTL 1 3 5 7 9 1 5x2 Header Optional RS232-C Interface C10 .1µF + CTXD RSRX X1 MHz C1 27pF 7.3728 Serial Interface Header +5V CTXD SYSCLK

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

51

Lunar Telemetry Beacon Submitted by: Russell McMahon

Abstract The Lunar Telemetry Beacon (LTB) is a small Z8 microcontroller-controlled telem- etry system and radio transmitter. It is intended for deployment on the lunar sur- face to subsequently return temperature, seismic, and location information to Earth. No receiver is incorporated in the LTB, due to severe design constraints. Conse- quently, all decisions must be made on a preprogrammed basis. Key demands on the overall system include the ability to survive impact velocities of over 300kph and decelerations of 1000g, to return data to Earth using a self- contained aerial and transmitter, and to survive in an ambient temperature range of Ð180¼ to +130¼ Celsius (with the transmitter not operating at extreme tempera- tures). Key demands on the Z8 microcontroller include: ¥ Control of initial deployment from the main payload ¥ Control of the physical orientation of the LTB after landing ¥ Control of a transmitter to return data to Earth ¥ Thermal management of the electronic core to maximize the prospect of surviving the lunar nights (2 at Ð180¼ Celsius)

Because of severe mass, and therefore battery restrictions, the unit operates intermittently, with a decreasing duty cycle over time. Mechanical survivability is enhanced by the use of surface-mount construction, housing in a custom-fitted mechanically-compliant pressure shroud, encapsula- tion of the whole system in a homogeneous medium, and subsequent mounting in an external matrix-medium that ensures controlled deceleration over the maxi- mum available distance. The LTBÕs initial objective is met if it transmits successfully from the lunar surface for a period of a few Earth days. Over this period, transmissions are relatively fre- quent. Long term operation (weeks to ) requires surviving the low tempera- tures of lunar nights. Lunar night survivability is targeted by use of a super- insulated core for the key electronics and the provision of very low levels of elec- trical heating under system control. Battery systems utilize two versions of lithium chemistry due to their potential tolerance of the extreme thermal conditions and high energy densities. Thionyl Chloride batteries (800 Watt-hr/kg) are used for core stay-awake electronics (due to their good energy density) and lithium-sulfur

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

52

dioxide batteries (300 Watt-hr/kg) for transmitter power (with a somewhat lower energy density but better high-current performance). The key technical objectives are: ¥ Survive landing ¥ Deploy aerial system successfully ¥ Return at least one successfully-received message

The above three objectives are listed together because, while each is a separate goal, all must result before success is achieved. The device must additionally be able to: ¥ Send transmission bursts increasingly less frequently throughout one lunar day (2 Earth weeks) ¥ Survive one lunar night (2 weeks at Ð180¼ Celsius) ¥ Send transmissions at regular infrequent intervals throughout the lunar day, and as many possible subsequent lunar days

Message data includes temperature and seismological observations and sponsor dictated content (not necessarily advertising per se). A failure to return some or all data would still be a reasonable success, provided actual transmissions continued to be received. All activities must be accomplished with a minimum of weight and power con- sumption. The Lunar Telemetry Beacon is designed to be as independent of the main space- craft and main payload as possible while communicating with it prior to deploy- ment. Communication with the core spacecraft control system is by way of a single bidirectional data serial circuit which interfaces with a bus interface in the spacecraft. Power can be provided to a stay-alive input on the LTB prior to launch to avoid utilizing the internal inaccessible and nonrechargeable batteries. How- ever, this connection is used when the final stage of the countdown commences. A failed LTB prior to launch is not repaired; it is replaced in its entirety. After launch, the LTB does not function until lunar impact. It can communicate with the main spacecraft as required. Under strictly predefined conditions, a mission failure mode exists whereby the LTB can self-deploy, if it is obvious that the main mission has failed. The pros- pects are good for an LTB to survive a catastrophic explosive failure of the main craft upon reaching orbit. As lunar impact is imminent, the LTB arms itself.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

53

A combination of advice from the main craft and/or loss of communication at the appropriate time determine the approach and occurrence of lunar impact. On impact, the LTB is ejected horizontally from the main payload to prevent it from being trapped in the main debris. The small pyrotechnic charge for this activity is external to the LTB. While the LTB can technically initiate this action if the main craft should fail, it is unlikely that its command would be accepted if the main controller fails to initiate the release. Shortly after impact, and having come to rest, the LTB ascertains its survival, and attempts to determine its attitude using its onboard triple-axis accelerometer. In a preferred orientation, as encouraged by its weight distribution, the LTB deploys its main aerial using a pyrotechnic charge to trigger a release mechanism. The antenna is of spring construction with a deployed orientation normal to the body. It is a simple whip antenna that is mechanically wound around part of the outside body. A nonoptimum orientation of the LTB on the surface can be corrected by deploying a sequence of up to three other similar antennae, followed by the actual antenna. When the antenna is deployed (or if it cannot be), the LTB commences its transmission sequence. Transmissions are initially frequent, and decrease with time. During two-Earth- lunar nights, temperatures fall below battery and transmit- ter safe operating limits. Under such circumstances, the LTB shuts down all activ- ities except core activities, and attempts to maintain its core temperature at a minimum but safe level. With the return of lunar day, the LTB attempts to reestablish its transmissions. It is intended that the core continue to function after the transmitter fails. If the LTB determines that the transmitter has failed, it ceases transmission, except for occa- sional short retries.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

54

Magic Dice Submitted by: Darren Ashby (www.chipcenter.com)

Abstract The ZiLOG Z8PE001 microcontroller generates a display of six numbers, and the sound effects of rolling dice. The ZiLOG microcontroller also generates the ran- dom numbers rolled on the dice. The LEDs are multiplexed using only the ZiLOG microcontroller and the display components; no other ICs are required. The LEDs are positioned to represent the dots on a pair of dice. The dice displays are animated, rolling as real dice do. By controlling the bright- ness of each individual LED, (using the timer interrupt capabilities of the ZiLOG part), the user can achieve a visual effect to simulate rolling dice. The animation slowly comes to a stop at the final value of the dice. Each individual die may stop at different times, further enhancing the simulation. As the dice roll, sound effects simulate the bouncing action of a real die. At the end of the roll, additional sound effects are added as required for various final val- ues. For example, a short victory song can play when a player has rolled double sixes. Such a scenario is fairly simple to create using the TOUT mode on the Z8PE001 to drive the piezoelectric buzzer. Four controls are provided to the user. Switch 1 causes only one of the dice to be rolled at a time. The first press rolls the first die, leaving the second die blank. The second press rolls the second die (the first roll is still displayed). The process then repeats. Switch 2 rolls both dice at once. Switch 3 is a reset button in case of problems. Switch 4 is a special toggle feature that causes the dice to be seven-sided, where numbers 1 though 7 are possible. Geometry makes it impossible to create an actual die with seven sides that offers an equal chance of any number occurring. Such is not the case with the Magic Dice board.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

55

Figure 34. Magic Dice Block Diagram

Reset

Z8Plus Microcontroller

LEDs are positioned to represent the dots on dice

7-sided switch Roll one die Roll both dice at a time together

Simple packaging design

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

56

Figure 35. Magic Dice Schematic Diagram LD12 LD14 LD13 PA4 PA5 PA6 SW3 LD10 PA3 2N4403 Q2 1K

1

R12 VCC 3 10K C19 0.1µF

2

LD11 LD6 LD4 VCC R10 R2 4.7K PA0 PA1 PA2 RESET DICE2 PB1 LD7 LD8 LD9 Piezo Buzzer 470 R69 PA4 PA5 PA6 LD5 BUZZER PA3 2N4403 Q1 1 VCC 3 2 LD1 LD2 LD3 PA0 PA1 PA2 PA3 PA4 10MHz X1 R1 4.7K PA0 PA1 PA2 33 33 33 33 33 R5 R6 R7 R8 R9 DICE1 C18 0.1µF VCC 14 15 16 17 13 12 11 10 9 PA5 PA6 VCC PA0 PA1 PA2 PA3 PA4 VSS VCC XTAL2 XTAL1 33 33 R3 R4 Z86E001 U1 PB0 PB1 PB2 PB4 PB3 /RST PA7 PA8 PA5 1 2 4 3 5 6 7 8 18 VCC GND Connection to a 2PIN-900-SLDR-HD 4.5 VDC battery pack

Roll one die

Roll both dice 10K DICE1 DICE2 RESET

BUZZER SW1 SW2

VCC R14

10K 10K

R10 VCC VCC R11 SW4 dice switch Seven-sided

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

57

Modular Light Display Panel Submitted by: Phillip King

Abstract Each Modular Light Display Panel is made up of an 8x8 array of pixels. Each pixel contains 3 LEDs (red, green, and blue), which are controlled by a Z8 microcontrol- ler. Panels provide a modular building block for expandable full-color LED dis- plays. A single panel, running alone, can serve as electronic art, providing algorithmically-generated patterns of light and color. A linear array of panels becomes a full-color scrolling text and graphic display, such as a marquee, or an attractive enunciator panel. By connecting together a two-dimensional array of panels, users can construct large color displays. As a result, users can buy a small number of panels to start their display, and add panels as required. Every 8x8 panel contains a Z86E21 OTP microcontroller. 192 bytes of the Z8 on- chip RAM form the image buffer containing the current state of the display. Three 64-byte arrays make up each color plane. The intensity of every LED is controlled using pulse-width modulation. At any given instant, an LED is either fully on or fully off, but by varying the duty cycle of on-time to off-time, the Z8 can vary the perceived intensity of every LED. The array can be built to allow strobing of one row of the panel at a time, or allow additional discrete latches to be used for a fully-static display (at slightly higher cost). In either case, the fully-digital control system can provide a seemingly analog variation in the color intensity of each pixel. The software control is offered by two pads. A periodic interrupt routine updates the state of the currently-driven row of the LED array, providing the appearance of varied intensity of every pixel. The mainline code modifies the image buffer as directed by serial communication with the control computer and those panels around it. Because every panel communicates with those around it, the array itself can perform simple image manipulations such as wipes and simple animations. The total bandwidth required is reduced within the array, because not every panel must receive a fully-updated state during every frame. When multiple panels are assembled to form larger displays, each panel commu- nicates serially with the four around it. At power-on, each panel queries the four compass directions, and the top left panel becomes position (0,0). Every other panel determines its position successively from those above and to the left of it. When running, an external PC controlling the array can address every panel inde- pendently. The control PC coordinates the array, handling tasks such as scaling images to the available number of panels.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

58

Figure 36. Modular Light Display Panel Module Block Diagram

Serial Link to Row Upper and Left Latch Panels (Blue)

ZiLOG Z8 Row 3•- COLOR Microcontroller Latch LED ARRAY (Blue)

Serial Link to Lower and Right Row Panels Latch (Blue)

Column Driver FETs

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

59

Figure 37. Modular Light Display Panel Module Schematic Diagram ÐPixel Drive 10 ÐPixel Drive 11 ÐPixel Drive 12 ÐPixel Drive 13 ÐPixel Drive 14 ÐPixel Drive 15 ÐPixel Drive 16 ÐPixel Drive 17 ÐPixel Drive 20 ÐPixel Drive 21 ÐPixel Drive 22 ÐPixel Drive 23 ÐPixel Drive 24 ÐPixel Drive 25 ÐPixel Drive 26 ÐPixel Drive 27 ÐPixel Drive 30 ÐPixel Drive 31 ÐPixel Drive 32 ÐPixel Drive 33 ÐPixel Drive 34 ÐPixel Drive 35 ÐPixel Drive 36 ÐPixel Drive 37 2 5 6 9 12 15 16 19 2 5 6 9 12 15 16 19 2 5 6 9 12 15 16 19 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 U2 U3 U4 D0 D1 D2 D3 D4 D5 D6 D7 CC CLK D0 D1 D2 D3 D4 D5 D6 D7 CC CLK D0 D1 D2 D3 D4 D5 D6 D7 CC CLK 74ACT374 74ACT374 74ACT374 3 4 7 8 1 3 4 7 8 1 3 4 7 8 1 13 14 17 18 11 13 14 17 18 11 13 14 17 18 11 Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Latch1 Clk Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Latch2 Clk Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Latch3 Clk Note: This design uses the minimal number of external latches to have any one column of the display energized at a time. More latches and one extra layer of latch clock decoder logic can be used for a higher-duty-cycle or fully-static display. C7 .1µF Inter-panel serial interconnection. (On-board UART is for primary North-South communication channel.) J1 C6 .1µF 1 2 3 4 5 6 7 8 9 10 CON10 C2 22pF C1 C5 .1µF 22pF VCC Y1 12MHz internal C4 .1µF (Recessed reset switch) S1 Data0 Data0 Data0 Data0 Data0 Data0 Data0 Data0 UART in West in East in South in North Out West Out East Out UART Out C3 .1µF VCC 17 18 19 20 21 22 23 24 33 26 40 16 15 38 27 32 30 31 34 35 36 37 44 AS DS P20 P21 P22 P23 P24 P25 P26 P27 P30 P31 P32 P33 P34 P35 P36 P37 R/W R/RL

XTAL2 XTAL1

RESET GND

39

GND

28

GND 22

VCC VCC

29 GND 6 ZiLOG Z86E21 U1 P00 P01 P02 P03 P04 P05 P06 P07 P10 P11 P12 P13 P14 P15 P16 P17 1 2 3 4 5 7 8 9 41 42 43 10 11 12 13 14 stand-along panel.) or a back connector on the LATCH1 CLK LATCH2 CLK LATCH3 CLK COL SEL0 COL SEL1 COL SEL2 COL SEL3 COL SEL4 COL SEL5 COL SEL6 COL SEL7 (VCC is provided by an external power supply through the frame,

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

60

Nasal Oscillatory Transducer Submitted by: Sarah Brandenberger and Doug Keithley

Abstract The Nasal Oscillatory Transducer (N.O.T.) is an electronic device that does not use drugs or chemicals. It acts as a nasal decongestant and uses a piezoelectric speaker, hooked up to the speaker of a frequency generator. Press the N.O.T. to the offending sinus area and press the start button. The N.O.T. immediately starts alleviating sinus congestion. For greater effectiveness, set the switch to HIGH-POWER mode and an LED illuminates. In five minutes, the N.O.T. stops making sounds, and turns itself off. By exciting the sinusÕ resonance , mucus becomes more fluid and is easily expelled. Various sinus cavities tend to resonate at frequencies within the audio range. Variances in individuals and even variances in sinus size within the same person dictate the requirement for exciting the sinus cavities at multiple fre- quencies. The N.O.T. sweeps through a range of frequencies. Through micro- phone feedback, the N.O.T. determines the specific resonant frequencies that are excited for a short duration. Because the resonant frequencies are dynamic (due to changing volumes), the sweep and excite process is repeated every 30 sec- onds for 5 minutes. Circuit Description: ¥ Power SupplyÑLM2937 was chosen because of low voltage drop-out. The unregulated 9 volts is supplied by a battery and powers the output the output driver directly. ¥ Output DriverÑsimple single transistor drives a 45-ohm speaker. Fidelity is not necessary. ¥ Reset circuitÑsimple RC time constant as specified by data sheet ¥ Variable Output VoltageÑthe Z8 timer is configured as PWM per data sheet and output on PB1. The signal is passed through an active 2nd order low-pass filter and is used as the reference on the analog comparator inside the Z8. ¥ Microphone feedbackÑan electric condenser microphone is AC-coupled to an active 2nd-order low-pass filter and peak detector. The output of the peak detector is fed into the analog comparator of the Z8. ¥ Z8Ñdirect drive of the LED indicator and the -dog timer prevents excessive on-time, a ceramic resonator provides acceptable timing, and a security bit protects firmware features from competitors. ¥ FirmwareÑprovides all timing using a 16-bit internal timer, algorithms for modulating the output driver pin to generate sounds out of speakers, and

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

61

monitoring resonance by comparing the peak microphone signal to the PWM- generated reference.

Figure 38. Nasal Oscillatory Transducer Block Diagram

Power Supply Clock Circuit (+9VDC unreg, (Ceramic Resonator) +5VDC reg)

PA1 POR User I/O RESET (RC+Diode for (High-power Switch PB2/PA7 fast recovery) IRQ3 and LED Indicator)

Input Sensor Output Driver and PA0 Z8Plus Audio Transducer (Electret Microphone) (Transistor & Speaker)

Filter DAC (Active 2nd Order PB4 PB1 (PWM through an Lowpass and Peak + PWM active 2nd Order Follower) Lowpass Filter) PB4 Ð

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

62

Figure 39. Nasal Oscillatory Transducer Schematic Diagram SPK1 45ohm 7 Q1 2N4401 LM2904N - + 9VDC 6 5 C14 0.1µF 5% 2nd Order Lowpass Filter C12 0.1µF 5% R3 1.5k Output Driver and Transducer R7 15k R6 15k LED1 Yellow Green/ R2 300 NC NC NC NC NC NC VCC 12 13 1 18 7 8 9 10 11 (PB0) (PA6) (PA5) (PA4) (PA3) (PA2) Open for High Power S2 R1 100k High Power Select and Indicator VCC LED DRV (PA1) PWM OUT (PB1) SPKR DRV (PA0) 15 VSS ZILOG 14 VCC Z8E00110SEC VCC U1 (PB2) IRQ3 (PA7) HIGH SW XTAL1 XTAL2 RST (PB4) AN IN (PB3) REF IN 2 6 5 4 3 17 16 D1 1N914 X1 10MHz C11 1µF R4 100k VCC C3 C4 22pF 22pF Ceramic Resonator 1 Circuit Layout is Critical LM2904N - + VCC C10 0.1µF 9VDC VCC 2 3 C18 0.1µF VCC C13 0.1µF 5% 9V R5 470k C2 10µF 10V C9 0.1µF + 2nd Order Lowpass Filter and Peak Follower 47k 10k R12 R13 35V VCC R10 120k VCC LM2937 C8 0.1µF VOUT V1 2 C16 0.1µF 5% VCC GND VIN 1 R9 C7 0.1µF 4.7k 500mA LDO 5V Regulator C1 0.1µF 9VDC + C2 C6 0.1µF 1µF C15 S1 R8 6.8k 9VDC B1 9V Start Button C1 9VDC C5 10µF 16V 9VDC Elec MIC1 Condenser

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

63

New Sensor Technologies Submitted by: James Champion

Abstract The ZiLOG Z8 is ideal for use in applications where a small, minimal I/O proces- sor is required. Incorporating different levels of capability in the same pin-out foot- print makes the Z8 family an excellent choice where a series of increasingly feature-rich products are made with the same basic high-volume circuit design. Micropower Impulse Radar (MIR) is an emerging technology that has recently attracted attention. The technology can be licensed from Lawrence Livermore Laboratories (LLNL) to develop a new series of products aimed at in-tankfluid- level sensing, and fuel-level applications. However, unlike the cover of Popular , a full Radar on a Chip is a few years away. As with any emerging tech- nology, the first products must be flexible (programmable), avoid the develop- ment-risk ASIC or custom chip (because the technology is still emerging), and yet be cost-effective. A ZiLOG OTP processor can perform some of the functions performed by discrete components in basic MIR Circuits, provide the required flexibility, and keep cost low on product design. The technology employs a method of Equivalent-Time Sampling, where many thousands of pulses are sent out, and the reflected response is built-up by adding up a single time-delayed sample from each reflected pulse to form a response sig- nal at a lower frequency than the original. The outgoing pulses are sent at a Pulse Rate Frequency (PRF) of 4 MHz (the oscillator frequency used for the Z8). A simple reset pulse from the Z8 to start the sample time base initializes a sample delay circuit. The recovered sample signal for the fluid measuring probe features a maximum length of typically 20msec, determined by the rate the reset pulse is sent by the Z8. Given a PRF of 4MHz and a sample time base of 20 msec, 80,000 pulses are sampled to create the equivalent-time waveform. An example of a reset pulse and recovered waveform are shown as the top and bottom waveforms in Figure 40. This waveform is applied to the comparator circuit of the Z8. The Z8 timer measures the time from the reset pulse to the reflection to determine the fluid level. By using an OTP Z8, fuel tanks with unusual shapes can exhibit a level indication, compensated for the nonlinear volume response with a look-up table. Additionally, by using techniques outlined in US patent 5898308, contaminated fuel can be detected by measuring both the return pulse from the fluid level, and the return pulse from the probe end.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

64

A 100-Hz PWM signal generated by the Z8 is used to drive an indicator. The low power of the MIR circuits and the Z8 result in easy vehicle load-dump protection.

Figure 40. New Sensor Technology Waveform

1 1

2

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

65

Figure 41. New Sensor Technology Block Diagram

FIXED TRANSMIT PULSE DIRECTIONAL DELAY SIGNAL DRIVE NETWORK COAXIAL PROBE PRF

VARIABLE SAMPLE PULSE SAMPLE DELAY SIGNAL DRIVE GATE TANK

RAMP CIRCUIT

RESET AMP ZiLOG Z8 OSC

REF

VCC PWM POWER OPTION MOSFET JUMPERS

12/24 V LOAD DUMP POWER VCC TELEFLEX INPUT PROTECTION REGULATOR OUT MIR FUEL LEVEL SENDER

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

66

Phone Dialer Submitted by: Daniel Dina

Abstract The Phone Dialer is a device that attaches to a telephone and monitors all activity from either the line or the phone. The line activity being monitored involves detect- ing several phone line conditions such as on-hook, off-hook, and ringing. The ana- log portion of the circuit detects these conditions and provides logic levels and wake-from-sleep-mode interrupts to the microcontroller. The phone activity being monitored starts when the Phone Dialer device either detects the handset being picked up, or if programmed accordingly, answers the phone. Should a customer pick up the phone and start dialing, the Phone Dialer receives all key presses and, based on the phone number dialed by the user, gen- erates a new string that ultimately dials out on the line. This new string contains all the prefixes and codes necessary to utilize the lowest-cost carrier available to the user. Through proper filtering, all phone numbers entered by the user are blocked from reaching the line, thus preventing the an outgoing call. The Phone Dialer device ultimately dials the numbers, along with the proper pre- fixes and suffixes. The Phone Dialer device can also be programmed through the phone (by turning on the answer feature), or by picking up the phone and entering the program mode (by the use of a password). A simple example of operation for the device is as follows: 1. A user picks up the phone. 2. The circuit detects an off-hook condition and wakes up the Z8 microcontroller, enables the filter, and starts listening for a tone generated by the phone. 3. The user dials a number. 4. The firmware begins decoding the phone number being dialed, and makes decisions based on the area code and the prefixes, using programmed routing numbers. 5. Based on all programmed variables, the device forms the complete string and dials the number.

The Z86E08 device additionally helps to reduce part count by incorporating a built-in reset circuit. Its low sleep-mode current drain enables the shut-down oper- ation of the circuit. The device analog circuitry (D4ÐD7) allows the Phone Dialer to be connected to any phone line regardless of polarity.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

67

Figure 42. Phone Dialer Block Diagram

Phone dialer device

Telephone Phone Company

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

68

Figure 43. Phone Dialer Schematic Diagram J1 C4 12pF C5 12pF G F Q2 +V D 3.3V 2N7000 C9 .1µF XTAL1 12MHz R12 2.2k D2 V1T1 uP CNTRL1 MMSZ5 11 12 13 7 6 8 9 10 4 3 2 1 A2 A1 A0 P00 P01 P02 P31 P32 P33 GND XTAL1 XTAL2 Q4 2N 3904 R9 470k 14 R1 1Meg +V U3 U1 VCC GND 3.3V Z86E08 24LC01/02B C3 .1µF P20 P21 P22 P23 P24 P25 P26 P27 SDA SCL WP VCC 5 6 7 8 1 2 3 4 15 16 17 18 R15 2k D3 V1T1 V3 R8 470k MMSZ5 sampling node Microprocessor +V 3.3V +V R16 2k 3.3V Q1A MPQ 3904 R2 470k R4 12k C8 10mF D1 R3 Zener 470k +V 3.3V Red Wire (tip) C2 .1µF U4 Com 3.3V Power Supply for uP and Memory +V 3.3V In Out LP2950CZ R7 1Meg CNTRL2 C10 100nF R17 374k G C1 47µF D F 20 19 18 17 16 15 14 13 12 11 D3 D2 D1 D0 Q3 ESt VDD RSO 2N7000 St/GT Green Wire (ring) DS/RD IRQ/CP U2 D6 1N4002 D5 1N4002 D7 1N4002 D4 1N4002 R11 1Meg MT88L89AE CNTRL3 L1 10mH IN+ INÐ GS VREF VSS OSC1 OSC2 TONE R/W/WR /CS G J2 R10 100 1 2 3 4 5 6 7 8 9 10 D F Q5 R6 Teleco Phone Jack 2N7000 100k R4 12k XTAL2 3.5795MHz C6 J3 .1µF R13 100k C7 100nF Red Wire (tip) Green Wire (ring) Customer phone jack

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

69

Pocket Music Synthesizer Submitted by: Stan Sasaki

Abstract The pocket music synthesizer is an instructional aid and motivational tool for ele- mentary and middle school band and orchestra students and teachers. The syn- thesizer is loaded with a variety of scores, and the student can play back selected pieces and parts of any score. For example, the cello track can be removed, or just the flute track can be played. Tempo can be adjusted without affecting pitch, so that students can practice at home at their own pace. The student can jump to any location in a composition to repeatedly listen to and play along with challeng- ing passages. This jump location corresponds to the sheet music measure num- ber and call loop between measures. Other features include a metronome, instrument tuner, and scale transposer. Sound is output via an RF modulator played over any FM radio. The unit is similar in appearance and size to a TV remote with an LCD display. It can stand on-end on a music stand. For durability, the only connector is for battery charging. A Z86C96 microcontroller interprets the score and the various instrument waveta- bles stored in a single 1-Mbyte Flash memory chip. The Flash chip contains both program and data memory. The Z86C96 features a 64-KB external memory inter- face. An additional four I/O lines extend the data space range to 1Mbyte. A small complex programmable logic device (CPLD) manages the program/data memory segmentation; the CPLD also performs other I/O signal management. Each instrument track is stored in digital notation (for example, MIDI) where a note is encoded as instrument type, pitch, duration, and volume. For each note, the microcontroller reads the template note for that instrument out of the wavetable. The wavetable memory contains sound chunks of the actual instrument at selected points in its pitch range and with a prototype attack-sustain-decay enve- lope. The microcontroller adjusts for intermediate pitches by sample rate adjust- ment. The playback code is straightforward, because the wavetables are not compressedÑthe microcontroller simply reads and sums data arrays from mem- ory. The composite digital audio signal is written to a D/A converter, and the analog signal drives an FM broadcast band modulator. The carrier is phase-locked to allow exact tuning, because receivers are now also synthesized. The Z86C96 scans the keypad for user commands and displays operating status in the LCD display. For example, the LCD displays the real-time measure number during playback. The microcontroller requires a crystal oscillator for pitch and modulator tuning accuracy. The score and wavetable flash memory is downloaded from a PC by the instructor at the beginning of a school year. For grade school, the entire yearÕs orchestration

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

70

can be stored, while middle-school applications require periodic updates due to the complexity and length of scores. The memory is loaded via an infrared link directly decoded by the Z86C96Õs UART port. The UART interface allows any PC serial port driving an infrared diode pod to load the memory. The synthesizers for an entire class can be loaded in parallel by pointing them all at the emitter; each unitÕs LCD display verifies download integrity.

Figure 44. Pocket Music Synthesizer Block Diagram

Keypad 4-char LCD 4x4 matrix display

Z86C96 RF Modulator - IR detector 8-bit D/A Microcontroller FM broadcast band (for download) converter 20 MHz PLL synthesized-monaural

Prog Mem Data Mem (16 kbytes) (1008 kbytes)

1 MByte 2.4V DC-DC Flash Memory rechargeable +5V converter asymmetrically-blocked battery

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

71

Figure 45. Pocket Music Synthesizer Schematic Diagram R6 C3 C13 C4 Q1 VCC L4 C14 VCC VCC R14 R13 RESET VCC 16 15 14 13 12 11 10 9 29 31 33 35 38 40 42 44 12 16 14 11 28 26 C8 FV LD FR PD OV OR VSS VDD BY RP CE OE WP WE DQ0 DQ1 DQ2 DQ3 DQ4 DQ5 DQ6 DQ7 Q2 L2 C11 R15 MC145170 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 A-1 OSCI OSCO REFO FIN DIN ENB CLK DOUT U3 U2 8 Mbit Flash PLL synthesizer enable flash read flash write flash 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 C9 E28F800B5-B60 16 17 48 18 19 20 21 22 23 24 25 45 R12 VCC D5 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 19 18 17 16 15 14 13 12 SCLK Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 C10 D1 D2 D3 D4 D5 D6 D7 D8 CLK OC L3 74HC574 U6 Addr latch 1 D6 11 AD7 2 AD6 3 AD5 4 AD4 5 AD3 6 AD2 7 AD1 8 AD0 9 6 5 4 SY VCC DIN SCK R17 MATRIX C12 addr stb DAC 4X4 KEYPAD AD5301 C15 VO GND VDD U8 r1 r2 r3 r4 c1 c2 c3 c4 1 2 3 + ser data load pll ser clk load dac A19 A18 A17 A16 R19 R2 R18 PLL filter 24 25 26 27 28 29 31 32 41 40 39 38 37 36 34 33 17 16 14 13 VCC B8 C0 C2 C3 C4 C7 C8 D0 D2 D7 D8 B10 B13 B15 C13 C15 D11 D12 D13 D15 VCC C7 R16 CPLD VCC VCC VCC VCC GND GND GND GND IN0 IN1 IN2 IN3 A0 A2 A5 A8 A11 A12 A13 A15 B0 B2 B3 B4 U9 1 2 4 5 6 7 8 9 3 PZ5064-10A44 44 11 12 21 20 19 18 15 23 35 10 22 30 42 43 7 4 3 VCC LX LBO OUT SCLK A15 A14 A13 A12 A11 A10 A9 A8 AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 P2HS DM MAX1674 FB GND LBI REF U4 Boost converter 24 25 26 27 28 29 30 58 41 42 43 44 45 46 37 38 16 12 10 58 59 60 61 62 63 54 55 7 67 18 49 11 15 1 8 2 AS DS P07 P06 P05 P04 P03 P02 P01 P00 P17 P16 P15 P14 P13 P12 P11 P10 P27 P26 P25 P24 P23 P22 P21 P20 P37 P36 P35 P34 R/W C1 P0DS P1DS + R5 R4 Z86C96 RST R/RL SCLK X2 X1 P47 P46 P45 P44 P43 P42 P41 P40 P57 P56 P55 P54 P53 P52 P51 P50 P63 P62 P61 P60 P33 P32 P31 P30 Microcontroller U5 9 5 6 4 1 2 8 19 53 13 14 68 64 65 40 39 33 34 35 36 22 23 47 48 57 58 50 21 66 D1 D2 L1 low battery R11 C5 C6 Y1 SCLK D3 VCC R3 R7 R8 R9 R10 trickle only 1 OUT 20MHz R1 RST C0 C1 PNA4602M D4 demodulator VDD GND Integrated IR VIN GND LCD pak U1 U7 2-cell MC34064 MUX'D 1 2 3 4-DIGIT 2 3 replaceable J1 DC in VCC VCC

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

72

Portable Individual Navigator (PIN) Submitted by: Leonard Lee

Abstract A ZiLOG 16-MHz Z86E83 microcontroller serves as the controller for a small, self- contained, belt-carried device that provides an individual with bearing and dis- tance traveled on foot from an initial location. It can be used for individual naviga- tion both indoors and outdoors. The device combines data from a solid-state magnetic compass sensor and an accelerometer-based stride sensor. The accel- erometer is also used to compensate for mounting tilt. Iterative algorithms are used to compute the accumulated bearing/distance vector on the fixed-point microcontroller in an efficient way. A typical application might be an individual who is hiking. The portable navigator can also be used indoors to track the location of people wearing the device in a certain area. When the device is initialized, the wearer can wander freely on foot, both indoors and outdoors. When it is time to return home, the device displays the required compass bearing and distance in meters to the starting point or most recent waypoint. The design requires the sensing of voltage from several sensors. It also provides user input and display control; therefore, a microcontroller with a large number of I/O pins is required. It is possible to sense analog voltages using Z8 devices with- out analog-to-digital (A/D) converters (for example, measuring the charge time of an RC circuit connected to a comparator input). However, these methods require external circuitry and can be considered somewhat ad hoc measures. Conse- quently, the ZiLOG Z86E83 (OTP version) was chosen because it features an 8- channel A/D converter and a relatively large number of I/O pins. These features permit the PIN to include minimal glue logic and external analog circuitry. Z86E83 software is the heart of the system and performs all functions, such as reading the sensors, converting the data into distance and bearing, and managing the user interface. The Z86E83 is configured to use a crystal oscillator clocked at 16 MHz to offer maximum code flexibility for the prototype software. To keep power supply design simple, an LM2930T-5.0 low drop-out linear voltage regulator is used to regulate the 6-V battery voltage (from two 3-volt lithium CR3032 coin batteries) down to 5volts. The efficiency of the linear regulator in this case is 5V Ö 6V = 83%, which is comparable to a switching supply, because the input-output differential is only 1V.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

73

Figure 46. Portable Individual Navigator A/D Ratio Over Time

Peaks due to footfalls threshold for footfall detection

A/D reading Stride from correction based accel. on time interval

Time Increased tilt lowers average level (0 degree tilt = 098)

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

74

Figure 47. Portable Individual Navigator Schematic Diagram Pushbutton FRONT SIDE 6V Two CR3032 3V lithium coin cells in series + Slider pot LCD Linear slider pot. for scrolling control 10k +5V 2 Spare unused input GND OUT IN 31 LM2930T-5.0, 5V low dropout regulator NC (spare outputs) 2.2k .1µF +5V

12 27 5 6 7 16 18 17 3 13 11 26

P00 Vcc 19 P25 P26 P27 P34 P35 P36 P31

GND

AVcc

AGND P01 20 XTAL2

D5 D4 D3 D2 D1 D0

AC33/P23 P02

21

P03 75 Degrees 1312•m

XTAL 22

16MHz XTAL1

Zilog P04 910 23

RW D7 D6 P05

4 5 14 13 12 11 10 9 8 7

20pF 20pF 24 Z86E8316PEC

RS

P06 6 OPTREX DMC-16117N 16x1 LCD 25 E AC0/P20 AC1/P21 AC2/P22 P32 RESET P33 P24 1 2 8 4 28 14 15 VCC VEE VSS 10k 2 3 1 NC +5V 10k 9 10 12 Notes:• -• Magnetic north and true geographical differ by the ••••• magnetic declination - can be ignored for relative measurements. -• A/D is used to digitize signals near DC only. Antialiasing filter not needed. Sensors have limited bandwidth and this limits noise.• 10k 0 2 +5V 100k UCA D 1 47 13 14 LCD Dinsmore 1655 Halleffect compass sensor Aout Vin contrast 1 8 2 11 Threshold for foot impacts 3 +5V 4 5 50k 6 ADXL105 accelerometer -AQC variant (ext. temp. range) +5V .22µF +5V

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

75

Postal Shock Recorder Submitted by Bryon Eckert

Abstract The increased competition between shipping companies has brought lower costs for business and the consumer. Demand from these sectors has caused the speed with which packages are handled to become more important than care in their handling. The result has been increased breakage of fragile items. An inexpensive shock recorder can be very helpful in pinpointing the probable time of breakage by recording the amplitude of each shock, along with a time stamp in serial EEPROM. Low cost is the most important requirement. Light weight and small volume is also important, as it relates to cost of use. The heart of the shock recorder is the sensing element. Three sensors are used (one for each axis), each consisting of a ceramic magnet epoxied to the end of a metal strip. A shock causes the metal strip to vibrate and produce a time-varying magnetic field proportional to the amplitude of the shock. The magnetic field variation produces a voltage across a sensing coil. Balanced amplifiers minimize interference pick-up. AC coupling to the subsequent amplifier stages eliminates the requirement for DC offset adjustment. U3C provides low- impedance virtual Ground, allowing single-supply operation while adding minimal additional power consumption. Each sensing amplifier feeds an inverting peak detector. The diodes are inside feedback loops to minimize temperature drift. All three amplifier outputs are connected across a single tantalum capacitor for charge storage. The Z86E04 usually runs in STANDBY mode, minimizing power consumption. When a shock is detected, the peak detector voltage rises above the level preset by R27 and R28, triggering IRQ3 (rising edge). The CPU wakes and starts the A/D conversion routine. Voltage readings are taken for several seconds, with the high- est reading stored in EEPROM (8-bit value), together with a time stamp (24-bit value). A second comparator is used to monitor battery voltage. A low drop-out reg- ulator provides a stable reference voltage and makes efficient use of a low-cost carbon-zinc 9-V battery. With LM324A operational amplifiers, the overall current consumption is about 5 mA, allowing up to 100 hours of operation. A 93LC66 EEPROM contains 512 bytes of memory, allowing up to 125 events to be stored (leaving room for the base date and time and a tracking number in BCD format). The user interface consists of a serial port and an alarm LED. The serial port is implemented in firmware, and can run at up to 38.4K baud for a 4-MHz crystal in low-EMI mode. The serial cable must be kept short (less than 6 feet), because the interface is not a RS-232-level interface. The base date and time is set through the serial port, and the EEPROM is read and erased through the

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

76

serial port. The alarm LED indicates that a shock threshold is exceeded, and/or the battery is low. PC-based software allows a user-friendly interface when the postal shock recorder is connected to a personal computer.

Figure 48. Postal Shock Recorder Block Diagram

Inductive Sensor (Magnet wire around iron nail) Y X

Ceramic magnet

Spring steel Z LM2951-5.0

ADC RAMP COMPARATORS LOW DROPOUT REGULATOR Z86E04 BATTERY SAMPLE IN BATT X AXIS P01 93LC66 SHOCK PEAK VALUE RAMP CS SENSOR AMPLIFIER P02

SENSOR DATA IN P00 Y AXIS SERIAL DATA OUT EPROM SHOCK PEAK VALUE CHARGE TO IRQ3 P32 SENSOR AMPLIFIER STORAGE COMPARATOR CLOCK

Z AXIS LEVEL REFERENCE P33

SHOCK PEAK VALUE SENSOR AMPLIFIER

ALARM LED

1 MHZ RXD SERIAL DATA

CPU TXD INTERFACE

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

77

Figure 49. Postal Shock Recorder Schematic Diagram J1 DB9M 9 8 7 6 5 4 3 2 1 +5V 8 7 6 5 NC VSS VCC ORG 22k R29 D8 MMBT 914 D9 MMBT 914 CF CK BI DO +5V +5V U6 93LC66A

U5 Z86E04

1 2 3 4

P23 P24

1

18 D7 C14 100µF 6.3V

LED

P22 P25 ALARM

2 C11 0.1µF 17

470

R30 P21 P26 +5V +

3

+5V 16

P20 P27

4 15

GND VCC 4 3 2 1

5 14

P02 XTAL2

6 13 NC

P01 XTAL1 GND GND

7 12

P00 P31

OUTPUT 8 11

P33 C10 22pF P32

9 10 NC GND GND IN 8 R33 100k 14 220 U2C U2D U7 LM2931AM-5.0 R34 5 6 7 8 LM324AM LM324AM X1 4MHz + + Ð Ð C13 0.1µF C12 0.1µF 9 10 12 13 C9 22pF B1 9V SW1 SPDT R31 R32 100k 220k AT STRIP CUT CRYSTAL C8 4.7µF 10V + D1 D2 D3 R8 1.0M MMBT914 MMBT914 MMBT914 1 7 14 R16 R26 1.0M 1.0M U2A LM324AM U2B LM324AM U3D LM324AM 4 11 + + + Ð Ð Ð R6 3 5 2 6 R15 R25 12 13 1.8M 1.8M 1.8M +5V +5V +5V 22k 22k R14 R24 R7 22k 7 7 14 U1B LM324AM U1D LM324AM U3D LM324AM + + + Ð Ð Ð R5 5 5 R13 R21 6 6 1.0M 1.0M 1.0M 12 13 8 C5 C7 C3 0.1µF 0.1µF 0.1µF 1 1 8 + Ð C2 R3 U1A LM324AM U1C LM324AM U3A LM324AM 1.0H C4 C6 0.01µF R11 R19 9 1.0H 1.0H R23 100k 10 0.01µF 0.01µF 4 4 11 11 + + + Ð Ð Ð R4 2 3 2 9 3 R12 R20 10 1.0M 1.0M 1.0M R1 R9 R17 R22 4.7k 4.7k 4.7k 180k C1 4.7µF 10V R2 R10 R18 4.7k 4.7k 4.7k +5V + L3 Sensor L1 Sensor L2 Sensor Spring Spring Spring Magnet Magnet Magnet Mounted Mounted Mounted

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

78

PWM Input/Output Interface Module Submitted by: Fernando Garcia Sedano

Abstract The PWM I/O interface module is designed to process pulse-width monitor (PWM) input and output signals, very often used on railroad vehicles to transport analog information on train lines (for example, brake demand). With a PWM signal, ana- log information is a function of duty-cycle index modulation. Usage of PWM sig- nals to transport analog information is due to the very high electrical noise immunity. It is also easy to isolate a PWM signal from other voltages, due to the pseudodigital appearance, making these signals suitable to be demodulated using only digital circuits. The circuit receives three different PWM input signals with galvanic isolation at two different voltage levels (depending on R10 and R11 value). There are three input stages (U2, U3, and U4) with their corresponding overload protection (T6, R12, T7, R7, T8, and R8), and with EMC protection (D1, D2). The third PWM input channel (U4) feeds back the PWM output signal (24VPP maximum). The Z8 microcontroller is programmed to demodulate PWM input signals, to count the times where PWM input is at high and low levels, and to perform the corre- sponding division. Obtained values are loaded in the DPRAM. The Z8 is pro- grammed to address external memory using Port 0 and Port 1 to send address and data lines. DPRAM works as a data buffer between the Z8 microcontroller and any other external microprocessor or microcontroller.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

79

Figure 50. PWM Input Output/Interface Module Block Diagram Output Current

Interface PWM2 Input2 PWM3 Input3 Output PWM External Train-line

PWM Input1 24V (LM231J) Frequency to

Current Converter 24V Input Barrier Barrier Output DCÐDC Isolated Isolation Isolation Converter (3XHCPL2211) (1XHCPL3101) 74HC151) (74HC4020+ PWM Output Frequency Selection PWM1 PWM2 PWM3

On/Off Control

P3 P2

(TCX0) Z8 Microcontroller (Z86E40) Microcontroller Z8

MC12083P)

(T67PZ12.8+ 6.4MHz

P1 P0 Main Crystal Oscillator DAB[7..0] Logic

Address

74HC139 D_LATCH 74HC374 CEL\ AB[11..8] DB[7..0]

SEML\ SEMR\ 4Kx8 DPRAM

DPRAM CER\ Address Logic (IDT7314LA70JB) (74HC139+79HC02) supply +5Vdc filtered for internal power

DB[7..0]

74HCT245 Data Bus Buffer Bus Data

EMC Filter DPRAM I/O DPRAM AB[12..1] AB[14,13] IOWR\, IORD\ IOBHE\, IOSEL\ +5Vdc Interface External BCU ( 80C196) Control Buses) (Data, Address and

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

80

Reaction Tester Submitted by: Martin Bass

Abstract The Reaction Tester measures the reaction time of an automobile driver using repeated cycles of signaling, time measurement, data display, data transmission via serial interface (to a PC that performs evaluation over the entire runtime), and waiting randomly for the next signal. Power-on also performs a system check (dis- play, lamps, buzzer, and serial interface) at this time. All system functionality is performed by software: ¥ LED-multiplex for 7-segment display and lamps ¥ Sound via buzzer ¥ Reading status of the contact switches ¥ Serial output

This device is built into a car simulator (a box containing seat, steering wheel, and two pedals) and uses contact switches to check for steering left, steering right, gas, and brake. A Z86E0812-1866 is the heart of this device, which is optimized for maximum integration and minimum parts count. The power supply is an AC/DC wall adapter that delivers an unregulated 9volts to 12volts at a 500-mA load. A capacitor and standard linear voltage regulator uses a diode in series to protect against a wrong connection and a ZORB diode for overvoltage protection. The multiplexed display consists of 3-digit drivers and the 74AC164 shift register; these components per- form I/O expansion and power-sink driving for segment currents. Multiplexing drives three of the four LED lamps. The buzzer is driven by the con- troller port pin via a small electrolyte capacitor in series, and is controlled by soft- ware. The serial interface yields real RS-232 voltages (approximately +4V, +8V, and Ð9V under load) to be operable even on problematic PCs (for example, some do not interpret 0V for the more negative voltage). If there is an immense cost problem, it can be easily downgraded to +5V/0V. To read the status of the contact switches, the Reaction Tester includes an inter- face consisting of pull-up resistors, capacitors for noise clamping, and input pro- tection for the controller port. The oscillator is run by an 8-MHz quartz crystal.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

81

Figure 51. Reaction Tester Block Diagram

AC AC/DC DC Adaptor 9-12V 500mA

J3

7 Seg. LED-Display LED Lamps

Power

LED-Driver

CPU Z86E0842-1866 Buzzer

RS-232 Converter Contact-Interface

J4 J2 10 MB

TxGND Rx Contact Switches

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

82

Figure 52. Reaction Tester Schematic Diagram

1N4148

1N400R J3 +5V 7805 9-12Vdc 500mA + + IC3 100n 470µ 22µ 16V 1613

1SKE18A

100W T1 T2 T3 T4

3x7 Seg. Disp. C.A., Red 714 9

3 4 5 6 74 10 AC IC2 11 164 12 13 8x68E

DC 728

4xLED-Lamp

2E2

7E5 BC337-25 T5

+5V 2x22pF

100n 3k3 QUARZ +5V 8MHz 2 13 12 11 5 4 6 7 1 T6 47k P25 P02 P01 P00 Vcc Vss C P24 4 8C556C P27 18 P23 17 Z86E0812-1866 P22 330 9 P32 3 + 1k P26 P33 P34 P21 P20 BUZZER IC1 10 8 16 15 4µ7/10V

1N 47µ/16V +5V 4148 + +5V 1N +5V 4148 4x100k

100k

4x4k7 4x100W 10k 2x 1N4148

J1 C (MB) J2

Tx Rx GND

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

83

Remote-Controlled Air Conditioner Submitted by: Shailendra S. Vengutlekar

Abstract The Z86E30 controls an electronic air conditioner. Remote-controlled operations are available together with manual key operations. The remote range is 10 meters. There are two different sensing points for temperature control. A/D conversion uses two analog comparators. The A/D channels work simultaneously with PWM reference P33. Previous settings are restored when the unit is powered on. The electronic air conditioner uses two timers. INTR4 tracks the time of the On/Off timer control mode, stepper motor control pulses, SLEEP mode, day-mode time track, remote-control pulse count, and display refresh pulses. PWM generation for A/D conversion uses INTR5. The Remote-Controlled Air Conditioner features the following items: ¥ Fuzzy temperature control ¥ Four modes of operation ¥ Three fan speeds ¥ Automatic fan speed ¥ Stepper motor control for split air conditioner ¥ 12- On/Off timer ¥ Selectable room temperature ¥ Air-swing On/Off control ¥ ZiLOG Z86E30 microcontroller

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

84

Figure 53. Remote-Control Air Conditioner Block Diagram

AIR CONDITIONER CONTROL REMOTE CONTROL

TEMIC TDSG5160, ZILOG TURBO IC TLHX5405 Z86E30 24C02

TEMIC TSIL6400, DISPLAY AC MCU IIC MEMORY IR LED TEMIC 1N4148

POWER SUPPLY LOW/HIGH KBD AND IR IR AND RELAY VOLTAGE DISPLAY ASP621 RECEIVER TRANSMITTER CONTROL PROTECTION CONTROL

OPTIONAL

TI ULN2003, TEMIC T174LS145 TEMIC TI UA7805CKC, 4N33 TFMS5380 TI 74HCT374, TEMIC BYT41M DIODE

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

85

Figure 54. Remote-Control Air Conditioner Schematic Diagram C12 D11 Diode 10k R13 P33 1 2 1 2 1 2 25V 2200µF 1 2 10k R12 D10 Diode VCC P32 1 2 VCC C10 1 2 RP1 R_Array 9 D8 Diode L8 22µF 25V TANTALUM 8 L7 1 2 7 L6 P31 6 L5 1 D8 Diode 12 5 D16 Diode L4 1 2 VCC 4 L3 P30 3 21 21 D12 Diode D13 Diode 12 L2 Horizontal holes for LEDs PCB Size 150mm x 70mm D17 Diode 2 L1 Mounting holes diameter 4.2mm D18 Diode XTALK2 3 8 5 1 2 P

D Put separate GND and Power Track for Micon

0 P0Ð6

COM COM

S5 P0Ð5 D1 Diode

21

D10 Diode 2200µF cap (C10) should be near Power Supply Connector XTALK1 Mode_sel P0Ð4

VCC

1 2 P0Ð3 12

D15 Diode

P0Ð2 P0Ð1

7642191 P0Ð0 1 2 3 4 ABCDEFG S4 S9 J6 U4 FND500 On_off CON4 12 Air_swing D14 Diode 3 8 5 P

D

0 P0Ð6

SOLVOL LF MF HF COM COM S3 S8 P0Ð5

Set_temp

P23 P0Ð4 2 5 6 9 12 15 16 19 Fan_speed P0Ð3

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

P0Ð2 P0Ð1

7642191 P0Ð0 U6 ABCDEFG S2 S7 U3 FND500 Off_timer Too_cool 74HCT374 D0 D1 D2 D3 D4 D5 D6 D7 OC CLK 3 4 7 8 1 13 14 17 18 11 COMCON L1 L2 L3 L4 L5 L6 L7 L8 S1 S6 P00 P01 P02 P03 P04 P05 P06 P07 P21 1 2 3 4 5 6 7 9 Too_warm On_timr_set 10 11 R2 R3 R4 R5 R6 R7 R1 390E 390E 390E 390E 390E 390E 390E 0 1 2 3 4 5 6 7 8 9 12 12 12 12 12 12 12 P31 P32 P27 P25 U2 C11 12 0.1µF C4 A B C D P01P02 P0Ð1 P03 P0Ð2 P04 P0Ð3 P05 P0Ð4 P06 P0Ð5 P0Ð6 P00 P0Ð0 0.1µF 74LS145 15 14 13 12 1 2 VCC VCC P32 P31 R16 6.8k 2 VCC 1 2 C7 1 2 3 4 J3 1 0.1µF CON4 Thermister2 R15 6.8k VCC P25 SDA P27 P04 P05 P06 P07 XTALK2 XTALK1 P31 P32 P33 1 2 Thermister1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 C1 0.1µF C5 MPX Thermister1: For sensing room temperature Thermister2: For sensing coil temperature 0.1µF Sensor 1 2 Remote P25 P26 P27 P04 P05 P06 P07 P31 P32 P33 P34 VCC C13 L1 4.7µF 2 C6 0.1µF 1 XTAL2 XTAL1 C14 4.7µF 2 1 2 R17 U1 1/4W 330E P30 12 21 1 Z86E30 R14 100k 1 2 VCC MFR 1% 1 P24 P23 P22 P21 P20 P03 VSS P02 P01 P00 P30 P36 P37 P35 D7 1 2 3 4 TIMER 28 27 26 25 24 23 22 21 20 19 18 17 16 15 A2 1 2 3 4 WP J2 VSS BUZ CON4 P24 P23 P21 P03 P02 P01 P00 P30 P0Ð1 2 12 C9 0.1µF Memory AT24C04 L2 L3 VCC N/C SCL SDA U5 8 7 6 5 VCC VCC SCL R8 2k2 XTALK1 XTALK2 C3 47pF 1 2 1 1 1 1 1 1 2 2 BZ1 VCC 2k2 R11 BUZZER X1 AIR_SWING D2 FAN D3 COOL D4 DRY D5 SLEEP D6 HEAT 8MHz 1 1 2 SOLVOL COMCON HF LF MF AIR_SWING 1 2 8 7 6 5 4 3 2 1 J5 C2 47pF R9 CON8 R10 120E 120E P0Ð2 2 P0Ð3 2 P0Ð4 2 P0Ð5 2 P0Ð6 2 BUZ 12 12 SCL SDA

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

86

Remote-Control Antenna Positioner Submitted by: R. Sharath Kumar

Abstract Antennae, parabolic dishes, and other types of wireless signal-receiving devices are today a common essential necessity in almost every home, office, and military application. Owing to the present number of communication satellites, it is often necessary to precisely reorient an antenna to different positions. Generally, this procedure involves laborious cranking of mechanical gears while observing a cal- ibration scale. A microcontrolled antenna-positioning device allows a user to align an antenna to the required elevation/azimuth precisely to the nearest degree by pushing a but- ton on an infrared hand-held remote. The device consists of two modules: a controller and a hand-held infrared trans- mitter. The controller module based on the Z86E31 manages reception of coded commands from the hand-held remote. The Z86E31 decodes a command and drives the two motors to align the elevation/azimuth. The LCD display is updated to indicate the exact aligned position. Up to 20 positions can be preset on the sys- tem memory and recalled for alignment. Positive feedback is incorporated to ensure precision up to the nearest degree. Fault tolerance is embedded to avoid an erroneous command value from overdriving and damaging the antenna or the mast. The motion circuitry is biased-off and a beeper sounds along with the mes- sage Error: Out Of Range flashed on the LCD of each module. Encoded commands from the hand-held remote are received on the infrared receiver D1A and processed by the microcontroller. The beeper is pulsed On/Off to indicate a successful decode. The power transistors T5ÐT8 and T13ÐT16 are biased-on to drive the elevation and azimuth motors M1 and M2, respectively.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

87

Figure 55. Remote Controlled Antenna Positioner Block Diagram

LCD Module

Power M Infra-red Z86E31 Bridge Azimuth Receiver Control Motor D1A Microcontroller Motor Driver M Elevation Control Motor

Beeper

LM331 LM331 Elevation Feed Back Voltage to Frequency Voltage to Frequency Converter Converter

Azimuth Feed Back

Figure 56. Hand-Held Remote Block Diagram

LCD Module

Infra-red Z86E02 Transmitter D1B Microcontroller

0123 4567 4X4 Keypad 89

CLR PC

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

88

Figure 57. Remote Controlled Antenna Positioner Schematic Diagram T10 T18 SL100 SL100 R6 10k 10k R20 VCC VCC T9 T17 SK100 SK100 R7 10k 10k R21 VCC = 5 volts Motor Supply < 40VDC T8 T7 T16 T15 Beeper TIP31A TIP31A T2 TIP32A TIP32A SL100 VCC 1 D10 1N4148 D3 D5 D7 D9 M1 M1 +VE +VE Motor Motor Azimuth D8 D4 Elevation D6 1N4007 x4NOS D2 1N4007 x4NOS Motor Supply Motor Supply Azimuth Motor Forward Direction Control Elevation Motor Forward Direction Control T5 T13 T6 T14 LCD Module TIP32A TIP32A TIP31A TIP31A R3 10k R5 10k 10k R19 T4 T4 SK100 SK100 VCC VCC T3 T11 SL100 SL100 4 6 7 8 9 10 11 12 13 14 5 3 RS CE D0 D1 D2 D3 D4 D5 D6 D7 RW VLC

R4

10k 10k R18 Azimuth Motor Reverse Direction Control Control Direction Reverse Motor Elevation 1 2 3 4 5 6 7 15 14 24 25 26 27 28 16 13 3k3 R13 C6 8 330pF 6k8 R17 Z86E31 22 12 R8 11 9 10 3k3 C4 330pF 6k8 R12 3 5 XTAL 8 R1 4k7 C2 7.328MHz 2N VCC 4 20pF VCC VCC 2222A LM331 1 6 7 2 3 5 8 VCC 4 5k R16 R2 4k7 LM331 1 6 7 2 POT DIA C5 diode C1 receiver Infra-red 20pF 0.001µF 5k R11 C3 0.001µF 4k7 R14 10k R15 POT R9 4k7 10k R10 POT Coupled to for Feedback Elevation Motor Coupled to for Feedback Azimuth Motor

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

89

RF Dog Collar Submitted by: John Kocurck

Abstract Current electronic fencing relies on a wire that is buried around the perimeter of the area to be fenced. A signal is sent through the wire that activates a dog collar should a dog stray too close to the barrier. If the dog decides to chase a varmint, it triggers a beep (or shock) when it enters the area around the buried wire, and nothing more. Using the ZiLOG Z86E02 on both the transmitter and the receiver, a better system can be designed. This system addresses the weak points of the electronic fencing systems currently on the market. Each transmitter features a unique 64-bit num- ber supplied by a Dallas Semiconductor DS-2401. That number, along with a con- trol byte, is transmitted via a Convergent Inc. radio transmitter at approximately 2Kbps. Each transmission lasts for less than 50ms and is repeated every 250ms. The dog collar receives the packet and checks if the serial number is stored in its 128-bit serial EEPROM. If it checks out, the processor in the collar resets. If the collar does not receive a valid packet within 800ms, it enters ALARM mode and sounds the buzzer. As a result, the dog returns to the house. When the dog is back in range, the collar resets and turns off the buzzer. New transmitters can be added by bringing the collar into range and pressing the button on the transmitter. The transmitter then sends out a special control packet and serial number that the collar recognizes, and stores it into the EEPROM for future reference. This method allows the building of short-range jammers to deny certain areas and also small hand-held units for RF leashes. Because of the unique 64-bit serial number, neighbors using the same dog-control system do not extend the dogÕs range because of overlapping areas.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

90

Figure 58. RF Dog Collar Block Diagram

Z86E02 Convergent Convergent Z86E02 Inc. Inc. AF Transmitter RF Transmitter

16 byte OS2401 sent with +5 EEPROM

SA 840IL

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

91

Signature Recognition and Authentication Submitted by: James Doscher and Harvey Weinberg

Abstract As more transactions are completed electronically, concerns about threats to data security increase. In particular, a user is required to be able to ensure that no one else can forge a signature or a password. There are new products on the market that attempt to solve this problem. For example, there are mouse devices that claim to be able to read fingerprints, and much development is occurring in the area of digital signature analysis. An alternative solution is a pen device that recognizes the unique characteristics of a signature to authenticate the user. Typical applications could be encryption, secure web transactions, receiving (signing for a UPS package), and controlled access to secure data. Existing systems, such as pen tablets, record the shape of a signature, but not necessarily the speed or emphasis (pen pressure) of the signature. By using a micromachined accelerometer to sense pen movement, an individualÕs distinctive signature motions can be recorded and compared against a stored copy. Recog- nition algorithms from speech processing are used to compare and correlate a personÕs signature. Prototype systems have already shown greater than 90% accuracy in recognition. At the heart of the system is a ZiLOG Z8 for recognition algorithms, and the Ana- log Devices ADXL202 dual-axis accelerometer. The Z8 fans the recognition algo- rithms, decodes the accelerometer signal, and administers power management for the accelerometer. The accelerometer measures pen movements in the X and Y-axis in the plan of the paper.

Figure 59. Signature Recognition and Authentication Module Block Diagram

ADXL202 Z86C06

Power

Acceleration Host Alarm Interface

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

92

Figure 60. Signature Recognition and Authentication Module Schematic Diagram

ADXL202 Z86C06

Reset VDD P35 P22 PWM OUTPUTS Host Serial 120K P21 P23 XOUT Interface

YOUT P20 P24 COM XFILT GND Vcc

YFILT

.1µF .1µF 4MHz +5V

47µF 47µF .47µF

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

93

Smart Phone Accessory Submitted by: Syed Naqvi

Abstract The Smart Phone Accessory eliminates the hassle of dialing long strings of tele- phone numbers by employing predefined user-programmed keysets. The Z8 microcontroller offers many advantages toward this solution, by providing the required power, RAM, and ROM to perform the application. The Z8 features scal- able software compatibility and a configurable I/O that offers great flexibility in the design. The Z8 is also relatively inexpensive. Caller ID offers unique usability to the party receiving the phone call. In most cases (depending on the service provider), the name and telephone number of the calling party is displayed. The receiving party can then keep a log of received calls for future use, or accept a choice of not answering the telephone call. On the other hand, most telephone companies offer the choice of an unlisted (unpub- lished) telephone number. However, if a person with an unlisted phone number makes a call, there is a possibility that his/her phone number will be displayed to other parties. The Caller ID feature can be disabled by dialing a predefined key sequence prior to calling. This step can be cumbersome and hard to remember on a regular basis. Another very popular and fast-growing telephone service is the 10-10 calling ser- vice. Customers can secure very competitive long distance rates by predialing 7 more digits plus the phone number. The Smart Phone Accessory automatically dials the numbers prior to each call. The Smart Phone Accessory is designed to work in series with the telephone handset. The product can use the telephone handset number pad, or it can dis- play its own number pad. The predefined keys (for caller ID and long distance) are programmed into the product. The Smart Phone Accessory can be reprogrammed or removed from the phone line very easily, thus offering customers complete flex- ibility. The power for the complete circuit is derived from the telephone line.

Figure 61. Smart Phone Accessory Block Diagram

Smart Phone PSTN Accessory

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

94

Figure 62. Smart Phone Accessory Schematic Diagram

To Handset

Telephone Interface & PSTN Power Circuits

Keyboard Interface

1 2 3 4 5 6 7 8 9 * 0 #

14 1 Vcc1 13 PB0 PA0 2 12 PB1 PA1 3 11 PB2 PA2 Touch Tone 4 8 PB3 PA3 Generator Circuit 1 5 PB4 PA4 2 6 RST PA5 3 7 XTAL2 PA6 4 8 XTAL1 PA7 Z8E001 GND 15

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

95

Smart Solar Water Heating System Submitted by: Eduardo Jose Manzini

Abstract The goal of the Smart Solar Water Heating System is to control the heating of the water supply for a home. After power-up, the microcontroller checks the value in EEPROM of the target value for temperature, and turns the LED on. The micro- controller reads the boiler temperature sensor (BTS), the sun collector tempera- ture sensor (SCTS), and turns on a corresponding LED. If the value of SCTS is higher than BTS, the water flow pump (WFP) is powered up to increase/speed the heating of the water by the sun until BTS becomes equal to SCTS. If both are lower than the target temperature, the microcontroller turns off the WFP and turns the electrical heater on and up to the required temperature. There are two control keys and five LEDs used for the required temperature. Each time a target temperature is selected, the microcontroller saves it in EEPROM. The required temperature is kept in case VAC is missing (110 ~227 failure). The other five LEDs (10 total) reflect the current temperature of the boiler.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

96

Figure 63. Smart Solar Water Heating System Block Diagram

Begin

or Y Save valve target LED on. temperature? Turn off others.

N

Reads temperature *WFC pump = Water sensor and lights Flow Control Pump the nearest LED red

T. boiler < T. target N T. sun collector? > Heater off VR T. boiler

VR Fill up pump OPTIONAL or solenoid Heater off WFC pump off Power Battery Supply System

*WFC pump on Heater on VR Vcc

Vcc Water flow control

Z86E31 VR

50¼C or Vcc Heater 45¼C or 45¼C or Comp 1 VREF1

Vcc 40¼C or 40¼C or

Temperator Boiler 35¼C or 35¼C or VREF2

Vcc Lower than 30¼C Lower than 30¼C Vss Temperator Boiler Vcc

Current boiler Target temperature temperature indicator indicator EPROM

Increase Decrease the target the target temperature temperature

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

97

Smart Window with Fuzzy Control Submitted by: Tan Boon Lee

Abstract Many homes in Southeast Asia contain sliding windows because of their lower cost. Most people open the windows when they are at home and close them dur- ing rains or when nobody is at home. The Smart Window with Fuzzy Control design features an automatic window con- troller using the Z8. The Z8 uses a formula implemented in fuzzy logic to control the opening of a single sliding window that is proportional to the temperature, force of wind, and intensity of rain. Port 2, pin 20 and pin 21 drive a 12-V DC motor via two relays. The motor features a current sense resistor (5R) connected to a comparator circuit to detect motor stall. The comparator circuit consists of a 100-ohm and 10-µF low-pass filter and a threshold detector implemented using LM339. The wind and rain detector features a similar circuit. Both charge a 10-µF capaci- tor until a certain voltage is exceeded to trigger the Z8. The trigger voltage can be adjusted via a 20-ohm variable resistor. The innovative feature of this design is the use of a single-slope ADC to read three switches and the temperature. The arrangement of the switchesÑopen, close, and autoÑpresent different voltages to P32. Different temperatures indi- cate different voltage outputs from the LM358 operational amplifier. The Z8 reads the temperature or the switch using the 74HC4006 analog switch. The single-slope ADC yields consistent readings. A timer measures the charging of the capacitor (pin 33). When pin 33 reaches the input voltage of either the switch or the temperature, an interrupt is issued. The timer values are inversely proportional to the input voltage, because the timer is a downcounter. The range of the timer can be divided into 50 divisions very accurately but only 5 are required for 10¼C above the minimum set by the 20-ohm variable resistor. Upon power-on reset, the Z8 reads the switches to check for AUTO mode. In AUTO mode, the position of the window away from the closed position is based on a weighted average of the temperature and wind. When rainy weather begins, the window shuts to a closed position. Manual positioning is possible in MANUAL mode. An LED indicates AUTO mode, and a buzzer sounds should the motor stall or the window is open during a rain.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

98

Figure 64. Smart Window with Fuzzy Control

Reflective strips for position sensor DC motor and gears

Threaded Rails

Rain sensor Limit switch The resistivity decreases Closed position when water ÔconnectsÕ the interdigit of the sensor.

Hidden Z8 board

Switch box and LED

Smart Window with Fuzzy Control

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

99

Figure 65. Smart Window with Fuzzy Control Schematic Diagram Auto/ Manual t¼ 6.8K thermistor 6k8 Open Close Vcc 20k VR 12 DC Vcc 10k 10k Motor and Gears 1k 3k9 1k8 3k9 5R 12V Relay + - 10k Motor Stall 10k 33k 6k8 + - 30k VR 100R LED 1k 12V

On/Off For/Rev ADC discharge Switches Temp

4066

ULN2003 74HC Buzzer P32: Switch/Temp ADC Switches Temp 22pF P23 P22 P21 P20 P02 P01 P00 Z86E04 XT1 XT2 P24 P25 P26 P27 P31 P32 P33 22pF 1/4 4066 ADC Vcc discharge 10k VR Rain Wind Position Sensor Closed Position Motor Stall Switch/Temp ADC 0.1µF Single-Slope Vcc - + 1/4 LM339 - + 20k VR 10k 10k 10µF 10µF 1M 10k 1/4 LM339 Rain 100k - + detector 20k VR Vcc - + 1M 10k 20k VR 2k2 10µF Wind detector Motor Stall

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

100

Solar Tracker Submitted by: David Ellis

Abstract To achieve maximum efficiency from a solar device, the greatest possible amount of solar radiation must be collected. With a fixed angle, only a small portion of the available energy can be collected. The purpose of the solar tracker is to lock on to the location of the sun and to continually position the device to follow the path of the sun. The addition of a solar tracking device produces a smaller, more efficient photovoltaic system, allowing it to collect the greatest amount of energy over a longer period of time. The solar tracker uses four CdS (Cadmium Sulfide 0 photoconductive) cells, wired in series and mounted on opposite sides of a vertical blind. When these cells are pointed directly at a light source, typically the sun, they exhibit approximately the same resistance. The output of the amplifier is half the supply voltage. This volt- age is converted by the Z8 microcontroller into digital data, and set equal to 128, or half of an 8-bit conversion. By comparing this digital value to 128, the direction of the light source can be determined. If the value is larger than 128, move the tracker to the left. If lower than 128, move the tracker to the right. Using two sen- sor setups allows the unit to control two axes and position itself directly at the brightest light source. At the same time, using relays or MOSFETs to drive a larger unit, the solar tracker can keep one or more devices pointing at the brightest source. U1A provides a virtual Ground. U1B and U1C provide a buffer for the sensors. R5 and R6 form the primary sensor. RV2 allows for adjustments for difference in the CdS cells. RV1 allows for adjustments to the overall gain of the amplifier, forming the X position sensor. R9, R10, RV3, and RV4 form the Y position sensor. The outputs of the sensors are fed to a 2-to-1 analog multiplexer made from a dual- switch ADG273 device. The output is fed to the comparator input of the Z8E001, which is set up as an A/D converter. Connectors P1 and P2 provide the control signals for the positioning motors, and are connected to a set of relays or H-bridge drivers.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

101

Figure 66. Solar Tracker Block Diagram

X Position Sensor X Motor Drive

Processor

Y Position Y Motor Drive Sensor

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

102

Figure 67. Solar Tracker Schematic Diagram C6 1 2 L1 P2 47uH C7 47pF 47pF Ð + X Motor 12 GND TB3POS 1 2 1 2 3 18 17 16 15 14 13 12 11 10 1 2 3 Ð + PB0 PA0 PA1 PA2 PA3 VSS VCC GND P1 XTAL1 XTAL2 Y Motor R13 100K TB3POS 12 Z8E001 PB1 PB2 PB3 PB4 RESET* PA7 PA8 PA5 PA4 1 2 3 4 5 6 7 8 9 PROCESSOR CIRCUIT C4 0.1µF D1 S1D 1 2 1 2 1µF C5 1 2 R14 100K 1K +5V 1 2 R15 GND 12 7x7 mm SW1 8 7 6 5 S2 D2 IN1 GND ADG723 S1 D1 IN2 VDD U2 1 2 3 4 3 2 3 U1B TL084 RV1 2 Ð + 13 100K U1C 1 2 TL084 RV3 (4=+5VA, 11=GND) Ð + 13 100K 2 1 (4++5VA, 11=GND) 2 YÐPOSITION SENSOR R3 100K 2 1 R8 RV2 100K R5 CdS R6 CdS 100K 1 3 1 2 1 2 1 R10 CdS RV4 100K R9 CdS 1 2 1 3 1 2 R7 15K R4 10K 1 2 1 2 GND R11 15K R12 10K 1 2 1 2 10µF 10µF C3 C2 +5V 1 2 1 2 + + GND 3 C9 C10 + 12 12 0.01µF 100µF

U1A

TL084 Ð + +Vin 1

1 2 (4=+5VA, 11=GND) GND

2 VR2 +Vout POWER SUPPLY 78ST105H 3 +5V +9V R4 10K R4 10K 1 1 2 2 C8 1µF 12 CENTER VOLTAGE REFERENCE XÐPOSITION SENSOR C1 100µF 1 2 +

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

103

Speedometer Submitted by: Mylnikov Pavel

Abstract This speedometer design is intended for measuring the speed of a walking pedes- trian. It can be worn on a waist-belt. The design uses a Z86C06 microcontroller because of its small size (18 pins) and speed (12MHz). The speedometer measures the difference in travel time of an ultrasonic signal from the speedometer to the ground and back. The signal consists of two short impulses with a short interval. When turning on the speedometer, the user must remain motionless for a few sec- onds so that the speedometer can define its height over ground. The height is defined using the following formula: h = t x V ÷ 2

where: h = height t = passage time of impulse v = velocity of sound in air (331 ms)

The speedometer is ready after the height is defined and the indicator light illumi- nates. During movement, the height changes are fixed automatically. The speed- ometer indicates horizontal speed only. Vertical movement can be approximated by linear functions. The speedometer indicates average speed over a period of a few seconds. The speedometer can indicate an individualÕs speed and travel distance. Indication of speed or length is switched using a button. A reset button clears the displayed travel distance.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

104

Figure 68. Speedometer Flow Diagram

Begin A

Save TC1 Initialization into Memory

Clear Way Length Counter Increase TC2 (WLC) and TC3 B No Clear Time P31 = 1? Counters (TC1, TC2 and TC3) Yes

Save TC2 and TC3 Send First into Memory Impulse

Calculate new way Length Delay a Few and Velocity

Add WLC with Send Second new way Length Impulse

Indicate or Send Results Yes P31 = 1? A

No B

Increase TC1 and TC2

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

105

Figure 69. Speedometer Block Diagram

Z86C06 1 2 XTAL1 P34

12MHz 3 4 XTAL2 P31

5

Spd/len P25 P2

Unit P26

Vcc Reset P27 1,3 = Amplifier 2 = Ultrasonic Speaker Vcc VCC 4 = Microphone P33 R>10 k½ 5 = Indicator GND

+ - Vcc

3V

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

106

Stages Baby Monitor Submitted by: Joe Peck

Abstract There are a wealth of baby monitors on the market today, all with one purpose in mind: to alert the parents of the slightest noise, regardless of the necessity of doing so. The Stages baby monitor empowers the parents to balance between parentsÕ necessity to hear their babyÕs every move and their necessity to get a good nightÕs sleep. The monitor can act as a traditional baby monitor, and broadcasts every little noise. Typically, parents only want to respond if the baby is awake or requires help, not if it rolls over and bumps a toy. The Stages monitor can be set to turn on for a fixed period of time if there is a particularly loud noise, or if a medium volume is sustained for a longer period. The sensitivity can be set by the parents to match their particular comfort level and environment. The monitor can also be set to help soothe the baby prior to actually turning the transmitter on. The monitor, upon detecting noise, can be set to play a short recording made by the parents if the noise exceeds the set level. If the noise continues or becomes significantly louder, the playback is stopped and the transmitter is turned on. A ZiLOG Z86E83 Z8 OTP is the core of the Stages baby monitor. Circuit Overview ¥ The On/Off Switch connects the 5-volt external power supply to the monitor. ¥ The mode switch is connected to digital input lines on the Z8. These lines are periodically sampled to set the operating mode appropriately. ¥ The Record switch is connected to another digital input. Holding the Record button causes the Z8 to record the audio from the microphone and write it to Flash memory. ¥ The sensitivity setting is controlled by a linear potentiometer and is connected to an ADC channel. ¥ The playback volume is controlled by a linear potentiometer and is connected to another ADC channel. ¥ The microphone is connected through a basic audio amplifier to another ADC channel. The Z8 uses this data differently depending upon the mode of operation. ¥ There are many transmitter circuits to choose from, depending upon required performance levels. This product uses a general transmitter black box.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

107

¥ An audio amplifier connected to a PWM output drives the speaker. The PWM output is RC-filtered to create he audio output signal. ¥ The flash ROM uses a latched address scheme to reduce the number of pins required from the Z8.

Figure 70. Stages Baby Monitor Block Diagram

Power

On Off

Stage

Wireless 132 Transmitter

Record

Playback Volume Audio Amp

Z86E83 PWM Low High Speaker Sensitivity

Low High

Audio Amp

Microphone Flash Memory

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

108

Figure 71. Stages Baby Monitor Schematic Diagram Data Flash Address

RD WR 7 . . 0 15 . . 0 Dual 8-bit latch 8-bit Dual Wireless Transmitter +5V +5V PWM . . P27 P26 P36 P34 P35 P23 P06 P00 P25 P24 Z86E83 Vcc AVcc Gnd AGnd Reset XTAL1 XTAL2 AC0 AC1 AC2 P31 P32 P33 +5V Mode Mode +5V Record +5V +5V Jack Power Note: Minor components (bypass caps, etc.) are omitted from this schematic.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

109

Sun Tracking to Optimize Solar Power Generation Submitted by: Willy Tjanaka

Abstract To gain optimal efficiency, and hence maximum solar power generation, solar cells must be positioned directly toward the sun. This project, incorporating a ZiLOG Z8E001 processor, offers a solution for tracking the location of the sun and moving the solar cell panel correspondingly. The solar panel attaches to a mechanical fixture that allows the solar panel to rotate vertically and horizontally. The 13 photosensors are arranged with equal spacing on top of a hemispheri- cally-shaped housing. Each sensor is equipped with an optical filter to prevent the sensor from signal saturation. An A/D converter with a multiplexer samples the sensor signal and sends it to the Z8E001. The Z8E001 controls the vertical and horizontal rotational movement of the solar cell panel using the DC motors. Verti- cal and horizontal absolute encoders provide location feedback to the Z8. The Z8E00110PSC is the controller chosen for this application. The PWM output on port PB1 provides a control signal for the motors (M1 and M2). Because only one PWM output is available, glue logic is required to control M1 and M2 one at a time. A Low on PB0 selects the horizontal motor (M2). A High on PB0 selects the vertical motor (M1). B1 is an H-bridge-style motor driver that translates the PWM signal and direction signal to drive a DC motor. M1 and M2 are the DC motors used to rotate the solar cell panel vertically and horizontally, respectively. B2 and B3 are absolute position encoders to track the position of the solar panel. The outputs of B2 and B3 are connected to the control- ler through serial interfaces (ENC_CLK, ENC_HDATA, and ENC_VDATA). B5 controls the 13 photosensors arranged on a hemispherical housing. Optical fil- ters are used to reduce the light intensity from the sun and prevent the sensors from saturating. The signal from each sensor is sampled sequentially by the A/D converter (B4). The ADC_SEL0 to ADC_SEL3 signals determine which A/D con- verter channel to sample. Data is transferred to the controller through a serial interface (ADC_CLK and ADC_DATA). The program scans the signals of all the photosensors (B5) using the A/D con- verter (B4). By knowing the location of each photosensor and comparing all the intensity values to each other, the program determines the location of the sun. The program computes the horizontal and vertical rotations required to move the solar panel. Next, the program selects the horizontal motor (M2) and generates the PWM signal to move the solar panel with the signal from B3 as feedback. Sim- ilarly, the solar panel is rotated vertically by driving the vertical motor (M1) and using B2 as position feedback.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

110

Figure 72. Sun Tracking Block Diagram

Vertical Absolute Rotation Position DC Motor Encoder

Solar Horizontal Cells Absolute Rotation Position DC Motor Encoder SUN

Motor Drivers

A/D Converter Z8E001

13 Photosensors with Optical Filters arranged on a Hemispherical Housing

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

111

Figure 73. Sun Tracking Schematic Diagram 1 2 1 2 Data Data B3 B2 Clock Clock B5 Encoder Encoder Absolute Absolute - - + + A A M1 M2 and Position Encoder and Position Encoder DC Motor DC Motor Vertical Rotation Motor Horizontal Rotation Motor 13 Photosensors on a Hemisphere PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13 1 2 3 4 5 6 7 8 9 8 7 6 5 10 11 12 13 VMÐ VM+ HMÐ HM+ B1 1 2 3 4 5 6 7 8 9 10 11 12 13 V DIR V PWM H DIR H PWM AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AIN8 AIN9 AIN10 AIN11 AIN12 AIN13 1 2 3 4 H-Bridge Motor Driver B4 DOUT CLK SEL0 SEL1 SEL2 SEL3 4 10 14 15 16 17 18 19 Photo Sensors and an A/D Converter with Input Multiplexer 13 Channel A/D Converter U2B 74HCT02 U2C 74HCT02 5 6 8 9 1 13 U2A 74HCT02 U2D 74HCT02 2 3 11 12 PWM SELECT PWM SIGNAL PWM VDIR PWM HDIR ENC CLK ENC HDATA ENC VDATA ADC DATA ADC CLK ADC SEL0 ADC SEL1 ADC SEL2 ADC SEL3 18 1 2 3 4 13 12 11 10 9 8 7 6 PB0 PB1 PB2 PB3 PB4 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 C1 0.1µF U1 DIP-18 VCC Z8E00110PSC VCC VSS RST XTAL2 XTAL1 5 14 15 16 17 C4 15pF +5V +5V Y1 C1 C5 10µF 10MHz 0.1µF + D1 1N4148 +5V C3 15pF C2 1µF R1 100k + +5V 1 2 P1 1k Power Conn R2 S1 SW PB

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

112

Tandy Light Control Submitted by: Jerry Heep

Abstract The Tandy Corporate headquarters building is a two-tower complex located in downtown Fort Worth, Texas. There are over 1800 lamp sockets on the east and west tower shear walls. Designed to accomodate 40-watt lamps, the sockets are arranged in an array that is six across at the upper levels and pyramid down to 14 across at the third-floor level. A strip of lamps, six wide, is used to display public service messages, for example: United Way, Stock-Show, May Fest, and Think Best. Prior to 1998, adding or removing the light bulbs from the sockets created these messages. Due to the height above street level, window washers from a local company were hired to build messages. A better system was developed using Z8 OTPs. This system allows the building engineer to control these Tandy Center lights by computer. The system consists of a master computer, two custom light computers, and 420 lamp controller boards. Each controller board contains a Z86E08 OTP, and can control up to five lamps. Twelve boards are used on each floor of both towers. The master computer, a conventional PC, is located in the Tandy Center engi- neering office. This computer runs a Visual Basic program to allow message cre- ation, editing, and downloading. The message is formed by using a predefined library of letters, or by clicking individual lamps on and off. Once the message design is complete, it is compiled and downloaded to the two light computers, which are located on the tenth floor of each tower. The download is accomplished with standard 1200 baud RS-232, using a very simple packet protocol. There is no hardware handshaking. There are slightly more than 50 branch circuits feeding the lamps in each tower. Each branch may contain 18 to 30 lamps. The light computer takes the lamp data downloaded from the master computer and converts it into lamp locations. The light computer signals individual lamp controllers using the AC power source as a medium. The controllers can display simple messages or can be programmed to display up to eight screens that are separated by up to 255 seconds of display time per screen. The Z8 knows 16 light commands.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

113

Figure 74. Tandy Light Control Block Diagram

Same as West Wall EAST WALL EAST Existing Wire

WEST WALL Light Circuit Relays Tower 2 Breakers Fifty-Four Fifty-Four Computer Solid-State 3rd Floor 24 Lamps 30 Lamps 18 Lamps 18 Lamps 20th Floor 18th Floor 17th Floor TANDY TOWER 2 Existing Wire 1100 Feet, Dual Shielded Twisted Pair 1200 Baud, RS-232 Six Six Six Six Z8 Light Z8 Light Z8 Light Z8 Light Controllers Controllers Controllers Controllers Phase A Reference Existing Wire Master Computer Power Engineer's Office Located in Building Com1 Com2 Three Phase Six Six Six Six Z8 Light Z8 Light Z8 Light Z8 Light Controllers Controllers Controllers Controllers Existing Wire Existing Wire Phase A Reference

5th Floor 30 Lamps 18 Lamps 18 Lamps 24 Lamps 19th Floor 18th Floor 17th Floor EAST WALL EAST 1200 Baud, RS-232 Fifty Fifty Light Circuit Relays Tower 1

Breakers WEST WALL Computer Solid-State TANDY TOWER 1 4th Floor 24 Lamps 30 Lamps 18 Lamps 18 Lamps 19th Floor 18th Floor 17th Floor 100 Feet Dual, Shielded Twisted Pair Existing Wire Six Six Six Six Z8 Light Z8 Light Z8 Light Z8 Light Controllers Controllers Controllers Controllers

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

114

Figure 75. Tandy Light Control Schematic Diagram

C6 30P

C2 .1 XTAL2 VCC Y1 C7

30P XTAL1 3.579545MHz 3 Z86E0812PSC

.1

C3 GND 14 7 6

U3 5 P27 P26 P25 P24 P23 P22 P21 P20 P31 P32 P33 P00 P01 P02

OUT GND 2 4 3 2 1 8 9 18 17 16 15 10 11 12 13

5 VOLTS Cut resistors to code board

R12 R11 100k R11 IN U1 LM78M05

21

1 R13 R10 100k R10

4

C1 1000 16

R14 R9 100k R9

+ RELAYDRIVEPIN6 4 3 D1 1N4740 10V 10 VOLTS

DATACLOCK

1 2 RELAYPWR R3 DATANOT RELAYDRIVEPIN5 5.1k 2W 4 3 D3 1N750 4.7V C5 1000 16 BLACK + RELAYPWR

C4 .01

POWER

2 1 LAMPPWRPIN6 R2 51k D5 1N4732 4.7V RELAYDRIVEPIN4 4 3 R1 51k R6

D6 1N5230 4.7V

Heatsink 760 25W

2 1 LAMPPWRPIN5 RELAYDRIVEPIN3 POWER 4 3 POWER

R8 51k 1 DATACLOCK 2 RELAYPWR LAMPPWRPIN4 D4 RELAYDRIVEPIN2 HIDATANOT 1N4002 R4 51k 4 3 BLACK

BLACK 1 BLACK BLACK 2

LAMPPWRPIN3 R5 1 LAMPPWRPIN2

Heatsink 1.5K 10W 2

3

4

5 6

WHITE WHITE 7

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

115

Temperature Measuring Device Submitted by: Hong Yu Qing

Abstract The purpose of this Z8-based system is to measure temperature in a simple and precise way. A 9-volt battery powers the temperature-measuring device, eliminat- ing the use of complex wiring. The Z8 features two analog comparators that measure absolute temperature. An IrDA encoder sends the measured value through an infrared LED. A notebook computer with an IrDA interface receives the IrDA serial-infrared data. The AD590 temperature sensors IC1 and IC2 generate a constant current that is proportional to absolute temperature. R1 and R2 determine the reference voltage VREF. The VREF is connected to the comparatorÕs inverting input (P3.3). Lines P2.5 and P2.6 are configured as outputs. In the beginning of every cycle, capacitor C1 is discharged through D1 by setting P2.5 to Low. When the Z86E04 timer turns on, P2.5 is set to High. C1 is charged with constant current. The constant current is produced by the IC1 temperature sensor and is proportional to the absolute temperature until the voltage reaches VREF. As the comparator interrupt takes place, the timer stops and P2.5 is set to Low and C1 starts discharging. The absolute temperature (t) equation is:

T = C x VREF ÷ T

where T is the time C1 takes to charge. The measured temperatures are encoded using a software IrDA encoder, accord- ing to Infrared Data Associated protocols. The encoded measured temperatures are sent via infrared LEDs D3 and D4. S1 and S2 select the communicating baud rate. The data sending cycle is selected by S3 and S4.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

116

Figure 76. Temperature Measuring Device Block Diagram

Temperature Z86E04 Infrared IRDA Encode Sensor (I) LED Signal (1 KB 0TP)

Temperature Baud Rate Sensor (II) Selector

Reference Frequency Voltage Selector

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

117

Figure 77. Temperature Measuring Device Schematic Diagram 9V BATTERY 470µ/10V 104 R3 D3 D4 T 1 2 SECOND 1 SECOND S2 S3 S4 S1 1/2 SECOND 1/4 SECOND 2 78L05 R4 ON ON OFF OFF 3 S3 S4 FREQUENCY ON ON OFF OFF PA2.7 PA2.0 PA2.1 PA2.2 PA2.3 IC3 VCC Z86E04 P2.6 P3.1 P3.2 P3.3 XTAL2 XTAL1 GND P2.5 12M 104 600 1200 2400 4800 27Px2 D2 D1 ON ON OFF OFF R2 R1 VREF S1 S2 BAUD RATE ON ON OFF OFF C2 IC2 C1 IC1 AD590 x2

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

118

Transmission Trainer Submitted by: Robert Ashby

Abstract The Transmission Trainer enables CDL (Commercial DriverÕs License) students to learn to shift the gears of large trucks in a classroom setting prior to actual high- way experience driving a truck, where inexperience may potentially be hazardous on public roads. The Transmission Trainer consists of mock-up clutch, brake, and accelerator ped- als. Mounted to the clutch is a momentary switch that closes when the clutch is activated. The brake and accelerator pedals include mounted potentiometers that reflect the position of the pedal. A transmission tower set next to the driver includes momentary switches that close as the user attempts to shift into any one of the six positions of the transmis- sion. The tower also includes solenoids that, when activated, prevent the gear shift from going into position. A small motor with an offset weight attached to the gear shift provides the realistic vibration when shifting gears. A set of displays provides feedback of RPM, speed, incline of the road, and weight of the vehicle. The instructor can use a set of provided buttons to adjust the weight or incline while the driver experiences different situations and different responses of the vehicle to different situations. Reading of the accelerator and brake is accomplished using the time to charge a capacitor method of A/D conversion. A small speaker or piezoelectric buzzer pro- vides the changing engine noise (using TOUT mode). The ZiLOG chip can easily figure the mathematics to provide the driver with a realistic situation in shifting that can take years to perfect in the real world of the highway. Factors that are taken into account are incline, weight of vehicle, road speed, and position of the accelerator pedal. The gears must be closely matched in order to complete the shift. The feedback of motor sound, RPM and speed gauges, and the vibration on the gear shift allows students to learn shifting techniques in a variety of situations without spending large amounts of time and money with an actual vehicle. It is ideal to be able to demonstrate this method in a classroom situation, which could save the driver and teaching institution thousands of dollars in time and money and prevent repairs on vehicles.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

119

Figure 78. Transmission Trainer Block Diagram Pedal Assembly Tower Transmission Console Assembly Sensing switched Chair Solenoids (extended) Hi-Lo Switch Slide Potentiometer MPH INCLINE WEIGHT Slide Potentiometer Brake Accelerator Down Down Incline Weight Clutch Switch CONSOLE ASSEMBLY RPM Up Up Clutch Incline Weight

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

120

Figure 79. Transmission Trainer Schematic Diagram BRAKE ACCELERATOR 10k R16 C3 1µF CW CCW 3 1 3 1 3 1 SVDC 2 2 2 Q8 2N4401 Q9 2N4401 Q7 2N4401 BRAKE 1k 1k 1k R14 R15 R13 BRAKE_WIPER CAP_DISCHARGE CAP_DISCHARGE CAP_CALIBRATE ACCELÐWIPER ACCELÐWIPER 10k R12 C2 1µF CW CCW 3 1 3 1 3 1 SVDC SVDC SVDC 2 2 2 Q4 2N4401 Q5 2N4401 Q6 2N4401 1k 1k 1k R9 R10 R11 ACCELERATOR ACCEL_WIPER ACCELÐWIPER BRAKEÐWIPER 3 1 3 1 SVDC SVDC CAP_CALIBRATE CAP_DISCHARGE CAP_DISCHARGE 2 2 Q2 2N4401 Q3 2N4401 1k 1k R7 R8 INCLINE_UP WEIGHT_UP SCL SDA SENSE0 SENSE1 SENSE2 SENSE3 SENSE4 SENSE5 INCLINE_DOWN WEIGHT_DOWN CLUTCH INCLINE_UP WEIGHT_UP HI/LO_SENSE SOLENOID0 SOLENOID1 SOLENOID2 SOLENOID3 SOLENOID4 SOLENOID5 ACCEL_READ BRAKE_READ INCLINE_DOWN WEIGHT_DOWN SVDC 2 3 4 5 6 7 8 9 10 R R R R R R R R R 11 26 27 30 34 5 6 7 10 28 29 32 33 8 9 12 13 35 36 37 38 39 2 3 4 C RS2 10K ACCEL_READ BRAKE_READ P00 P01 P02 P03 P04 P05 P06 P07 P10 P11 P12 P13 P14 P15 P16 P17 P20 P21 P22 P23 P24 P25 P26 P27 1 VCC SVDC XTAL1 XTAL2 RD/WR ZAS ZDS RESET P30 P31 P31 P33 P34 P35 P36 P37 GND U1 Z86E40 1 15 14 20 40 21 25 16 17 18 19 22 24 23 31 PIEZO BUZZER SENSE0 SENSE1 SENSE2 SENSE3 SENSE4 SENSE5 CLUTCH PB1 HI/LO_SENSE 1k R6 X1 3 1 16MHZ RESET BRAKE SPEAKER SVDC VIBRATOR 2 3 4 5 6 7 8 9 10 CAP_CALIBRATE ACCELERATOR CAP_DISCHARGE 2 R R R R R R R R R C RS1 10K Q1 2N4401 1 R3 R2 1% 1% 10k 5.63k 1k R4 SVDC SVDC D1 1N4148 SPEAKER RESET R5 C1 0.1µF 100k SVDC 1k R1 SW-CONTACT-.40 SW1

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

121

UFO Flight Regulation System Submitted by: Martin Gundel

Abstract The heart of the UFO Flight Regulation System is a ZiLOG Z86E08 microcontrol- ler. Because the receiver of this radio-control system is sensitive to electromag- netic interference, the Z8 operates in low-EMI mode with a clock frequency of 4MHz. The versatile interrupt capability of the Z8 makes it possible to measure the pulse width of the sensor and generate 4 PWM output signals to drive the motors. For sensing the inclination of an aircraft, a two-axis acceleration-sensor, the Ana- log Devices ADXL202, is employed. The output is a PWM signal with a pulse width between 2.5 to 7.5ms and a frequency of about 100Hz; making it possible for the UFO to accelerate at a rate of ±2g. If the sensor is at plane level, the out- put pulse is about 5ms long. An acceleration of 1g is equal to a pulse variation of 1.25ms. This variation corresponds to an inclination of 90 degrees. To measure an inclination of one degree, there must be a resolution of 13 microseconds or better. Timer 0 is clocked by 1 MHz, to achieve a better resolution. Two radio control channels move the UFO in the X and Y directions. Another channel determines the average speed of the motors for take-off and landing. The signals of the RC unit are also pulses, with a pulse width between 1 and 2 milli- seconds. The necessary resolution to obtain a good regulation is 6 bits. The four motors are driven by four PWM output stages. The Z8 microcontroller software calculates the necessary impulse width for the motors to keep the UFO on a plane level. Depending on the RC signals, the motor speed is changed slightly to move the aircraft. The output PWM signals are generated under the control of Timer 1. A soft start for the motors is absolutely necessary. The PWM signal of the motors attains the same frequency, but are slightly shifted, to prevent high current peaks.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

122

Figure 80. UFO Flight Regulation System Block Diagram

2-Axis Radio Control Receiver Acceleration Sensor

X Y CH1 CH2 CH3 Glue - Logic Lo Batt IRQ2 XYSEL_XY CHAN1 CHAN2 CHAN3 LOBAT

P3.2 P2.7 P0.0 P0.1 P0.2 P3.1 P2.5

Push Z86E08 P3.3 Button Microcontroller

P2.4 P2.6 P2.0 P2.1 P2.2 P2.3

LED Motor-Driver Buzzer Stages

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

123

Figure 81. UFO Flight Regulation System Schematic Diagram 1 2 1 2 1 2 1 2 1 2 JP4 JP5 JP6 JP7 JP8 MOTOR1 MOTOR2 MOTOR3 MOTOR4 GND UBAT C11 100nF CR1 4MHz C7 22pF C10 D4 D5 D6 D7 BYTO8 BYTO8 BYTO8 BYTO8 VI 220µF/16V 2 C6 7 6 IC4 GND 22pF LM78L05 VO 31 XTAL1 XTAL2 IRF540 IRF540 IRF540 IRF540 Q2 Q3 Q4 Q5 C9 22µF/10V 1 3 1 3 1 3 1 3 Z86C08 P20 P21 P22 P23 P24 P25 P26 P27 P31 P32 P33 P00 P01 P02 1 2 3 4 8 9 2 2 2 2 15 16 17 18 10 11 12 13 C8 VCC 100nF MOT 2 MOT 3 MOT 4 MOT 1 MOT 1 MOT 2 MOT 3 MOT 4 BUZZER LOBAT LED SEL XY IRQ2 XY B IN CHAN1 CHAN2 CHAN3 XY LED B IN B IN IRQ2 LOBAT CHAN1 CHAN2 CHAN3 11 SEL XY 11 SW1 4011 IC2D R8 470R IC1A 4030 SW Pushbutton 12 13 2 1 4 10 R4 12 13 47K IC2A 4011 RED LED1 IC2B 4011 4011 IC2C D3 D1 D2 1N4148 1N4148 1N4148 3 3 4 10 VCC 5 6 8 9 BZ1 BUZZER VCC IC1A IC1B 4030 4030 4030 IC1C VCC C9 22µF/10V C5 1 2 5 6 8 9 C1 1nF C1 1nF C1 1nF C4 47nF 47nF 10 9 11 12 5 R1 R2 R3 47K 47K 47K R5 1M2 Q1 BC238 T2 XOUT YOUT Y_FILT X_FILT R7 10K UBAT 1 2 1 2 1 2 ADXL202 JP1 JP2 JP3 IC5 RC-Channel DIR X RC-Channel DIR Y RC-Channel SPEED VDD VDD ST VTP NC NC NC COM COM 3 2 1 6 8 7 4 14 13 1K R6 VCC

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

124

Vehicle Anti-Theft Module Submitted by: James Doscher and Harvey Weinberg

Abstract Traditional car alarms protect a vehicle from theft when a door is opened, a win- dow is broken, or the ignition is disabled. These alarms cannot protect from being towed by a tow or flatbed truck, or the wheels from being stolen. These chal- lenges can be solved by adding a tilt-sensing module to the alarm system. The tilt sensor must be able to resolve very small changes in the inclination of the car. It is possible to free the wheels of a sports car by lifting one end of the car as little as 1.5 degrees. The module must be intelligent enough to reject minor long-term changes in tilt due to settling suspension, melting snow, and (relatively) large short-term movement due to wind or passing trucks. The Z86C06 provides the system intelligence, while the tilt sensor is the ADXL202 dual-axis accelerometer from . Conventional liquid tilt sensors are inconvenient to use because of their fragility. In addition, the high resolution required in this application would necessitate a high-accuracy A/D converter (12- bit or better) if using a liquid tilt sensor. The ADXL202 outputs a 14-bit accurate PWM signal that is proportional to the inclination. The PWM signal is read by the Z86C06 by using both timers simultaneously. One timer is used with the 6-bit prescaler, while the other timer counts at full speed. The concatenation of the two timers results in a 14-bit timer range. A software temperature-compensation method must be considered, because the tilt sensor grows in temperature sensitivity such that changes in temperature may appear to be changes in inclination. An intelligent algorithm can sample one set of tilt samples measured every half-second, and compare the result to the previous set of samples. If the rate of change of tilt (da/dt) does not fall within a specified window (for example, 0.0125 to 0.3 degrees per second), no alarm signal is issued. Because the temperature does not change significantly in 0.5 seconds, temperature drift is ignored. The windowing function also rejects false alarms due to minor long-term and large short-term tilt changes. Low power consumption (1mA average current) is required, because the alarm runs while the car is off. Because sampling only occurs twice per second, the Z86C06 is in STOP mode most of the time to conserve power. To reduce the power consumption even further, the Z86C06 cycles power to the ADXL202, turn- ing it off between sample periods. Communication to the main alarm module occurs via the Z86C06 SPI interface.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

125

Figure 82. Vehicle Anti-Theft Module Block Diagram

ADXL202 Z86C06

POWER

ACCELERATION SPI ALARM INTERFACE

Figure 83. Vehicle Anti-Theft Module Schematic Diagram

ADXL202 Z86C06

Rset Vdd P35 P22

SPI Serial 120K Xout P21 P23 Interface Yout P20 P24 COM Xfilt GND Vcc

Yfilt P34

.47µF .47µF 4MHz +5V

47µF 47µF .47µF

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

126

Windmill Commander Submitted by: Nathan Novosel

Abstract Using the Z8 OTP microcontroller to serve as a windmill commander to heat water to a comfortable temperature can extend the swimming season of many home pools. The Z8 microcontroller harnesses the maximum wind energy by controlling the windmill blade pitch and the alternator output current. The resistive load for heating can receive a wide range of electric current without constraint on fre- quency, voltage, or current levels. As a result, the load is the ideal type for a vari- able-speed alternator, driven by the wind. The Z8 microcontroller, the heart of the windmill commander, responds to control inputs, monitors system status, and controls the output power by both alternator control and windmill blade pitch control. Additionally, a battery charger function is included in the Z8 program to maintain battery power for periods of decreased wind activity. The Z8 microcontroller determines the speed of the alternator, and the output power by measuring the voltage across the load resistors. Using the flash A/D converter in the Z86E83, the instantaneous voltage drops across the load resis- tors can be measured. The output power can be determined by averaging over several AC cycles. The temperature is measured by utilizing two analog channels that receive a differential voltage from a thermistor in the pool water. The flash converter allows accurate differential measurements, because the high speed of the flash converter can minimize sampling time between channels. The required output temperature is set by push-button control, with one button serving to increment and the other to decrement the target temperature. A two- digit LED display shows the temperature setting for five seconds following push- button entry, and then returns to power-off state. The Z8 microcontroller is programmed to determine the state of the system, based on the alternator speed and output power. Using coefficients for the partic- ular windmill hardware that are programmed into the OTP memory, the windmill commander can determine how to adapt to the particular conditions at any given . The commander controls the state of the system by varying the field current to the alternator by using pulse-width modulation (PWM) and a power MOS transistor. The field current directly controls the output current of the alternator that causes the mechanical load to the windmill to change proportionally. The windmill com- mander can adjust the blade pitch to adapt to both the load and the wind condi- tions as determined by the propeller speed (derived from the alternator frequency). The position of the blade pitch is determined by a potentiometer

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

127

located in the drive actuator configured as a resistor divider to provide an analog voltage that corresponds to the pitch position. The power supply utilizes a 12-volt battery, and a battery charger function is built into the Z8 program to maintain battery voltage. The battery voltage is divided and measured by another channel of the Z8 A/D converter, and the microcontroller triggers an SCR to supply current to the battery via a ballast resistor.

Figure 84. Windmill Commander Block Diagram

Actuator Pitch Control Propeller Position Sensor Actuator

Bidirectional Power Bridge

Alternator

3-Phase PWM Rectifier Field Control

voltage & frequency measure Power Resistors

PWM Battery Charger position measure PWM Temperature temperature measure Z86E83 Sensor battery voltage Battery

POOL

Temperature Setpoint Temperature Setpoint Voltage Display Input Regulator

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

128

Figure 85. Windmill Commander Schematic Diagram display Temperature a b c d e f g com Q2 Ð + adjust VCC SCR1 Temperature 20 X3 a b c d e f g com Q1 2.7K M2 1K f c a b d e g 2.7K M1 2.7K 2.7K VCC 1µF A B C D LT BL LE Alternator 1µF P06 P05 P04 P03 P02 P01 P00 P35 P36 P34 P33 AC0 AVCC AGND 7805 Z86C83 AC1 AC2 AC3 AC4 AC5 AC6 AC7 RESET XTAL1 XTAL2 GND VCC P31 P32 1µF 1µF VCC Propeller Z1 1K 9.1K 910 22pF 910 1µF 4.33 MHz 9.1K 22pF actuator DC pitch control VCC 1µF D3 1µF 2.7K 2.7K D2 D1 2.7K VCC 2.7K Shaft position sensor 25K X2 M4 Heating elements M3 Thermistor X1 POOL

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

129

Wireless Accelerometer Submitted by: Mark Nelson

Abstract One of the frustrations of playing video games is the tangle of wires connected from the computer to the controller. Another frustration is the wire length that limits the distance and freedom of playing the games. A solution to this problem is to use a ZiLOG Z8 microcontroller, Analog Devices accelerometer, and the Abacom transmitter-receiver pair for wireless operation. The accelerometer is the Analog Devices micromachined ADXL202, which is an A2G device used for measuring tilt in two axes, making it ideal for joystick applica- tions. The output is pulse-width modulated and easily read by the microcontroller. The heart of this system is the ZiLOG Z86C06 microcontroller, which samples the accelerometer digital outputs and the states of six push-buttons. It stores the instantaneous values into a register where it is converted into serial format to be output to the transmitter section. The high clock frequency of the microcontroller enables the sampling to be fast enough to recreate the original PWM information from the accelerometer and push-buttons. Serial transmission at 9600 baud ensures that the operator does not notice any delay in the video. The Abacom XRT418 transmitter offers a maximum data rate of 10Kbps and operates at 418MHz. The serial data from the microcontroller is applied to the dig- ital input and is transmitted to a matching receiver at the PC. Its range is 100 meters, suitable for use with very large monitors. The Abacom RCVR 418 receiver offers analog and digital outputs. Test results indicate that reconstruction of the input signal is very good. The design uses another Z8 microcontroller to translate the incoming serial stream into a digital output byte. The accelerometer bits are converted to current sources to drive the game port inputs. This design highlights the many functions and processing capabilities of the Z8 microcontroller. The Z8 collects PWM information, converts it to a standard serial stream, and recreates the original data states at a remote location. With further programming at the receiver, the Z8 can adapt to other game protocols.

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

130

Figure 86. Wireless Accelerometer Block Diagram

6-bit input

x ADXL202 Z8 Lynx Accelerometer CPU Transmitter y

Lynx Z8 Receiver CPU 8-bit digital output

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

131

Figure 87. Wireless Accelerometer Schematic Diagram

VCC Z86C06 VCC

13 14 5 10 PWM Outputs 15 x P2.0 3 P36 2 9 16 y P2.1 TXM 12 17 13 5 418 P2.2 5 Serial Out 11 18 XL202 P2.3 14 24 7 P2.4 125K 0.47µF 0.47µF 25 P2.5 26 P2.6 27 P2.7 Digital X2 X1 Inputs 6 7

VCC Z86C06

5 15 P2.0 VCC 16 P2.1 17 5 P2.2 18 1 7 13 P2.3 Data P36 24 RX P2.4 Out 25 418 P2.5 26 P2.6 27 24 P2.7

X2 X1

7

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

132

Index

Numerics Analog Devices ...... 91, 121, 124, 129 64-byte arrays ...... 57 analog inputs ...... 20 analog processing ...... 24 analog voltage ...... 24 A analog-to-digital converters ...... 72 anti-short cycle ...... 20 A/D conversion ...... 24, 75, 83, 118 area code ...... 66 A/D converter 15, 24, 72, 100, 109, 124, 126, ASC ...... 20 127 asynchronous bus ...... 27 Abacom ...... 129 attack-sustain-decay envelope ...... 69 absolute encoders, vertical and horizontal 109 audio amplifier ...... 106-107 absolute temperature ...... 115 authentication ...... 48, 91 AC coupling ...... 75 auto mode ...... 97 AC line frequency ...... 24 automatic window controller ...... 97 AC power source ...... 112 automobile driver ...... 80 accelerometer ...... 91, 124, 129 automobile engine ...... 4 dual-axis ...... 43, 91, 124 Automotive Rear Sonar ...... 1 three-axis ...... 53 Automotive Speedometer, Odometer, accelerometer-based stride sensor ...... 72 and Tachometer ...... 4 access key code ...... 27 Autonomous Micro-Blimp Controller ...... 6 actuator ...... 9, 127 autonomous mobile nodes ...... 6 ADC channel ...... 106 autonomous robot ...... 12 ADC, single-slope ...... 40, 97 axle assembly ...... 4 address scheme, latched ...... 107 air conditioner, electronic ...... 83 air temperature ...... 38 Air-Core meter ...... 4 B aircraft inclination ...... 121 ballast resistor ...... 127 alarm mode ...... 89 barometric pressure ...... 38 alarm system ...... 124 batch process ...... 27 algorithmically-generated patterns ...... 57 battery rail ...... 9 algorithms, iterative ...... 72 battery voltage ...... 9, 30, 72, 75, 127 algorithms, recognition ...... 91 Battery-Operated Door-Entry System . . . . . 9 alternator output current ...... 126 bidirectional data serial circuit ...... 52 ambient light ...... 12 black box, transmitter ...... 106 ambient temperature range ...... 51 boiler temperature sensor ...... 95 ambient water temperature ...... 15 brake demand ...... 78 amplitude, shock ...... 75 BTS ...... 95 analog circuitry ...... 66, 72 bump switches ...... 12 analog comparator .1, 24, 31, 38, 60, 83, 115 bumper-switch matrix ...... 6 analog control voltage ...... 24 bus interface ...... 52

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

133

C Dallas Semiconductor ...... 9, 89 Cadmium Sulfide ...... 100 data ...... 69 calibration ...... 40 arrays ...... 69 scale ...... 86 buffer ...... 78 car alarms ...... 124 display ...... 80 car simulator ...... 80 logging ...... 20 carrier frequency ...... 33 security ...... 91 carrier signals ...... 6 transmission ...... 80 carrier, phase-locked ...... 69 day-mode time track ...... 83 cathode ...... 18 DC motors ...... 12, 109 CDL ...... 118 DC offset adjustment ...... 75 CdS ...... 100 DCF77 Clock ...... 18 ceramic magnet ...... 75 DCF77 receiver ...... 18 charge time ...... 72 DCF77 Time Radio Signal ...... 18 CIO ...... 33 decelerations ...... 51 clock I/O ...... 33 delay circuit ...... 63 CMOS ...... 6 demodulation ...... 6 code flexibility ...... 72 demultiplexer ...... 18 coils ...... 4 Desktop Fountain ...... 15 color intensity ...... 57 Diagnostic Compressor Protector ...... 20 color plane ...... 57 dial-up ...... 48 command status code ...... 48 digital circuits ...... 78 Commercial DriverÕs License ...... 118 Digital Dimmer Box ...... 24 comparator circuit ...... 97 digital input ...... 129 comparator input ...... 20, 72 lines ...... 106 composite digital audio signal ...... 69 digital notation ...... 69 Compressor Discharge Temperature . . . . .21 digital signature analysis ...... 91 compressor protector ...... 20 display control ...... 72 configuration switches ...... 6 display refresh pulses ...... 83 Conrad Electronics ...... 18 DOF-drive ...... 6 control voltage ...... 21, 24 Door Access Controller ...... 27 acquisition ...... 24 Doppler effect ...... 45 controlled access ...... 91 downcounter ...... 97 controller port pin ...... 80 DPRAM ...... 78 Convergent Inc ...... 89 dual-axis accelerometer ...... 43, 91 core temperature ...... 53 duty cycle ...... 33, 51, 57 counter/timer ...... 1, 24, 33 index modulation ...... 78 Crab, The ...... 12 crystal oscillator ...... 69, 72 current sense resistor ...... 97 E early-warning device ...... 20 EEPROM ...... 9, 27, 40, 89, 95 D serial ...... 75 D/A converter ...... 69 electric current ...... 126

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

134

electrical brown-outs ...... 20 freely-rotating axle ...... 4 electrical noise immunity ...... 78 frequency generator ...... 60 electrolyte capacitor ...... 80 fuel tanks ...... 63 Electrolytic Capacitor ESR Meter ...... 30 fuel-level applications ...... 63 electromagnetic interference ...... 121 fuzzy logic ...... 97 electronic air conditioner ...... 83 electronic art ...... 57 Electronic Door Control ...... 33 G electronic fencing ...... 89 gain ...... 100 emitter ...... 70 galvanic ...... 78 encryption ...... 91 isolation ...... 78 energy densities ...... 51 gear shift ...... 118 engine noise ...... 118 Germany ...... 18 enunciator panel ...... 57 glue logic ...... 72, 109 Equivalent Series Resistance ...... 30 Equivalent-Time Sampling ...... 63 equivalent-time waveform ...... 63 H ESR ...... 30–32 H field ...... 4 execution time ...... 1 hand-held remote ...... 86 external ...... 69 handset ...... 66, 93 interface ...... 20 handshaking ...... 112 external memory ...... 78 H-bridge ...... 1, 12, 100, 109 interface ...... 69 heel angle ...... 43 extreme thermal conditions ...... 51 helium envelopes ...... 6 high energy densities ...... 51 high-power mode ...... 60 F homing behavior ...... 6 fault conditions ...... 20 HVAC ...... 20 Fault tolerance ...... 86 feedback ...... 2, 9, 60, 86, 109, 118 loops ...... 75 I fingerprints ...... 91 I/O ...... 1, 27, 43, 63, 93 Firearm Locking System ...... 35 expansion ...... 80 firmware ...... 15, 30Ð31, 60, 66, 75 interface module, PWM ...... 78 Flash memory ...... 106 lines ...... 69 chip ...... 69 pins ...... 72 floor sensors ...... 12 signal management ...... 69 FLS ...... 35 I2C ...... 27 fluid level ...... 63 iButton technology ...... 9 fluid-level sensing ...... 63 iChip ...... 48 fluid measuring probe ...... 63 Internet functionality ...... 48 FM broadcast band modulator ...... 69 ICMP protocol ...... 48 Forecaster Intelligent Water Delivery Valve 38 image buffer ...... 57 Fort Worth, Texas ...... 112 immunity ...... 78

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

135

impact velocities ...... 51 Lawrence Livermore Laboratories ...... 63 Improved Linear Single-Slope ADC ...... 40 lead resistance zeroing ...... 30 incandescent lamp ...... 24 Learn mode ...... 9 inclination, aircraft ...... 121 LED . . . . . 2, 9, 12, 18, 31, 57, 60, 75, 76, 80, Inclinometer ...... 35 95, 97, 126 Infrared Data Associated protocols ...... 115 LED, infrared ...... 115 infrared diode pod ...... 70 light intensity ...... 109 infrared receiver ...... 86 line activity ...... 66 Infrared reflection sensors ...... 12 linear integrator ...... 40 infrared sensor ...... 45 linear perception ...... 24 input protection ...... 80 linear potentiometer ...... 106 input voltage ...... 97 linear voltage regulator ...... 72, 80 input-output differential ...... 72 lithium chemistry ...... 51 instrument tuner ...... 69 lithium-sulfur dioxide batteries ...... 51 Integrated Sailboat Electronic System . . . .43 load-dump protection ...... 64 Intelligent Guide for the Blind ...... 45 look-up table ...... 24, 63 intelligent peripheral controller ...... 33 low-EMI mode ...... 75, 121 Internet Email Reporting Engine ...... 48 low-pass filter ...... 60 Internet functionality, iChip ...... 48 LTB ...... 51 Internet Service Provider ...... 48 lunar nights ...... 51 Introduction ...... ix lunar surface ...... 51 inverting peak detector ...... 75 Lunar Telemetry Beacon ...... 51 IP protocol ...... 48 IPC ...... 33 IR ...... 6 M bandpass amplifiers ...... 6 Magic Dice ...... 54 receiver chip ...... 12 magnet, moving ...... 4 IrDA encoder ...... 115 magnetic card reader ...... 27 IrDA interface ...... 115 magnetic compass sensor ...... 72 IRLEDs ...... 12 magnetic field strength vector ...... 4 ISES ...... 43 magnetic field variation ...... 75 ISP ...... 48 magnetic field, time-varying ...... 75 iterative algorithms ...... 72 manual mode ...... 97 master computer ...... 112 mechanical key ...... 9 J Message Cueing mode ...... 45 joystick applications ...... 129 message passing ...... 6 metronome ...... 69 microphone feedback ...... 60 L Micropower Impulse Radar ...... 63 lamp controller ...... 112 MIDI ...... 69 lamp sockets ...... 112 minimum-protection device ...... 20 large color displays ...... 57 MIR ...... 63 latched address scheme ...... 107 mixer/demodulator channels ...... 6

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

136

modem module ...... 48 password ...... 48, 66, 91 Modular Light Display Panel ...... 57 pavement-surface deformations ...... 45 modulator tuning accuracy ...... 69 peak detector ...... 60 moisture sensor ...... 38 inverting ...... 75 MOSFETs ...... 100 voltage ...... 75 motion circuitry ...... 86 pen device ...... 91 motor stall ...... 97 pen movement ...... 91 mounting tilt ...... 72 pen pressure ...... 91 multiplexing ...... 18, 80 pen tablets ...... 91 personal computer ...... 76 phase-locked carrier ...... 69 N phase-triggering ...... 24 nasal decongestant ...... 60 Phone Dialer ...... 66 Nasal Oscillatory Transducer ...... 60 photointerrupter ...... 12 natural rainfall ...... 38 photosensors ...... 109 New Sensor Technologies ...... 63 phototransistor ...... 12 noise clamping ...... 80 photovoltaic system ...... 100 nonlinear response ...... 24 piezoelectric buzzer ...... 2, 54, 118 nonlinear volume response ...... 63 piezoelectric speaker ...... 60 ping-pulse wave ...... 45 pin-out compatibility ...... 20 O pitch range ...... 69 Obstacle detection ...... 12 Pocket Music Synthesizer ...... 69 octal D-latch ...... 33 polarity ...... 66 odometer ...... 4 Popular Science ...... 63 OEMs ...... 20 port pin ...... 80 off-hook condition ...... 66 Portable Individual Navigator ...... 72 offset weight ...... 118 positioning motors ...... 100 on-chip RAM ...... 57 Postal Shock Recorder ...... 75 on-hook condition ...... 66 potential divider ...... 9 open-drain mode ...... 6 potentiometer, linear ...... 106 operational amplifier, rail-rail ...... 40 power ...... 106 operational amplifiers ...... 6, 40, 75 consumption ...... 52, 75, 124 operational modes ...... 6 management ...... 91 optical filters ...... 109 supply ...... 60, 72, 80, 106, 127 oscillator frequency ...... 63 transistors ...... 86 OTP Selection Guide ...... x power-sink driving ...... 80 output driver ...... 60 PPP protocol ...... 48 output pulse ...... 121 preprogrammed decisions ...... 51 overvoltage protection ...... 80 prescaler ...... 1, 24, 124 Pressure Switch ...... 21 PRF ...... 63 P program memory ...... 27, 31 program mode ...... 66 PAP protocol ...... 48

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

137

programmable timer ...... 20 RC time constant ...... 60 propagation ...... 1, 43 Reaction Tester ...... 80 propeller ...... 6 reaction time ...... 80 speed ...... 126 receiver detector ...... 1 propulsion motor ...... 45 Recognition algorithms ...... 91 prototype software ...... 72 reference voltage ...... 24, 45, 75, 115 Prototype systems ...... 91 refresh pulses, display ...... 83 pseudodigital appearance ...... 78 relative timing ...... 38 pull-up resistor ...... 80 relays ...... 100 pulse count, remote-control ...... 83 remote console ...... 24 Pulse Rate Frequency ...... 63 remote range ...... 83 pulse variation ...... 121 Remote-Control Antenna Positioner . . . . . 86 pulsed water fountain ...... 15 remote-control pulse count ...... 83 pulse-width modulation ...... 57, 126 Remote-Controlled Air Conditioner ...... 83 PWM ...... 12, 60, 126, 129 reset circuit ...... 60, 66 drive signal ...... 4 reset pulse ...... 63 generator ...... 33 resistive load ...... 126 input channel ...... 78 resistor-summing junction ...... 6 input signal ...... 78 resonance frequencies, sinus ...... 60 Input/Output Interface Module ...... 78 return code ...... 48 output ...... 107, 109 RF Dog Collar ...... 89 output signal ...... 78 Rocker Switch ...... 35 output signals ...... 121 rolling dice ...... 54 Ramp ADC ...... 40 rotational movement ...... 109 reference ...... 83 rotational speed ...... 4 signal ...... 64, 78, 109, 124 routing numbers ...... 66 PWM-generated reference ...... 61 RPM ...... 118 pyrotechnic charge ...... 53 RS-232 interface ...... 27 RS-485 interface ...... 27 run cycle ...... 20 Q quartz crystal ...... 80 S sample rate adjustment ...... 69 R scale transposer ...... 69 R-2R network ...... 24 SCR ...... 127 Radar on a Chip ...... 63 SCTS ...... 95 radio transmitter ...... 51 secure web transactions ...... 91 railroad vehicles ...... 78 security bit ...... 60 rain, intensity of ...... 97 segmentation, program/data memory . . . . 69 ramp-capacitor discharge transistor ...... 30 Seiko ...... 48 random numbers ...... 54 seismological observations ...... 52 RC circuit ...... 72 sender ...... 6 RC filter ...... 107 sensing coil ...... 75

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

138

sensing element ...... 75 strobing ...... 57 sensitivity ...... 1, 106 subsumption architecture ...... 12 temperature ...... 124 successive approximation ...... 24 sensor capacitance ...... 38 sun collector temperature sensor ...... 95 serial cable ...... 75 Sun Tracking to Optimize Solar serial communication ...... 57 Power Generation ...... 109 serial data ...... 129 system check ...... 80 serial interface ...... 48, 80, 109 system control block ...... 1, 24 serial port ...... 20, 48, 70, 75, 76 serial-to-parallel shift register ...... 31 shift register ...... 31, 80 T shock amplitude ...... 75 tachometer ...... 4 shock threshold ...... 76 Tandy Corporate headquarters ...... 112 shut-down operation ...... 66 Tandy Light Control ...... 112 signal strength ...... 45 tantalum capacitor ...... 75 signature analysis ...... 91 TCP protocol ...... 48 Signature Recognition and Authentication .91 telemetry system ...... 51 single ...... 97 temperature control ...... 83 single-slope ADC ...... 40, 97 temperature drift ...... 75, 124 single-supply operation ...... 75 Temperature Measuring Device ...... 115 sinus congestion ...... 60 temperature-compensation method . . . . 124 sleep mode ...... 83 test lead resistance ...... 30 sleep-mode current drain ...... 66 test leads ...... 30 sliding windows ...... 97 theater ...... 24 small-echo signals ...... 1 Thermal management ...... 51 Smart Phone Accessory ...... 93 thermistor ...... 126 Smart Solar Water Heating System ...... 95 Thionyl Chloride ...... 51 Smart Window with Fuzzy Control ...... 97 threshold detector ...... 97 soil moisture ...... 38 tilt ...... 72 solar cell panel ...... 109 tilt-sensing module ...... 124 solar radiation ...... 100 time functions ...... 18 Solar Tracker ...... 100 time measurement ...... 80 solenoid ...... 9, 35, 118 time stamp ...... 75 sonar ...... 1–2 time track, day-mode ...... 83 sound effects ...... 54 timed actuation ...... 38 spacecraft ...... 52 timer control mode ...... 83 speedometer ...... 4, 103 timer values ...... 97 stage illumination ...... 24 time-related thresholds ...... 20 Stages Baby Monitor ...... 106 time-varying magnetic field ...... 75 stand-alone clock ...... 18 TOUT mode ...... 54, 118 standby mode ...... 75 train lines ...... 78 stepper motor ...... 45, 83 transducer ...... 1 STOP mode ...... 9, 124 infrared ...... 45 stride sensor, accelerometer-based ...... 72 receiver ...... 1

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

139

receiving ...... 45 voltage-to-frequency converter ...... 45 transmitting ...... 45 VREF ...... 115 ultrasonic ...... 43 Transmission Trainer ...... 118 transmitter ...... 1, 6, 45, 52, 53, 89, 106 W black box ...... 106 wake-up switch ...... 9 driver ...... 1 watch-dog timer ...... 60 driver circuit ...... 1 water flow pump ...... 95 power ...... 52 wave burst ...... 1 infrared ...... 6, 45, 86 waveform, equivalent-time ...... 63 radio ...... 51, 89 wavetables ...... 69 ultrasonic ...... 1 web transactions ...... 91 transmitter-receiver pair ...... 129 WFP ...... 95 trigger ...... 97 wind direction ...... 43 voltage ...... 97 wind energy ...... 126 triple-axis accelerometer ...... 53 wind speed ...... 43 TV remote- control ...... 12 wind, force of ...... 97 windmill blade pitch ...... 126 Windmill Commander ...... 126 U Wireless Accelerometer ...... 129 UART ...... 48, 70 wireless communication ...... 12 UDP protocol ...... 48 UFO Flight Regulation System ...... 121 ultrasonic signal ...... 103 Z ultrasonic transceiver ...... 45 Z02204 ...... 48 ultrasonic transducers ...... 1, 43 Z84C15 ...... 33 user input ...... 72 Z86C03 ...... 20 Z86C04 ...... 20 Z86C06 ...... 20, 103, 124, 129 V Z86C08 ...... 20 Variable Output Voltage ...... 60 Z86C96 ...... 69, 70 variable-speed alternator ...... 126 Z86E04 ...... 4, 30, 31, 75, 115 variable-strength signal ...... 45 Z86E08 ...... 1, 18, 24, 66, 80, 112, 121 vectored motion patterns ...... 12 Z86E21 ...... 57 Vehicle Anti-Theft Module ...... 124 Z86E30 ...... 27, 83 velocity calculation ...... 43 Z86E31 ...... 12, 45, 86 Vibration Sensor ...... 21 Z86E40 ...... 33 virtual air temperature ...... 43 Z86E83 ...... 35, 72, 106, 126 virtual Ground ...... 75 Z8E001 ...... 109 Visual Basic ...... 112 Z8PE001 ...... 54 visual response compensation ...... 24 Z8Plus ...... 9 voltage drop-out ...... 60 ZDS ...... 12 voltage regulator IC ...... 2 zero-crossing detection ...... 24 voltage regulator, linear ...... 72, 80 ZiLOG CCP emulator ...... 12

AN004901-0900 ZiLOG Design Concepts Z8 Application Ideas

140

ZORB diode ...... 80

AN004901-0900