F 2 MC-8FX FAMILY MB95200 SERIES ELECTRONIC SAFE DEMO REFERENCE SOLUTION 8-BITMICROCONTROLLER APPLICATION NOTE

Similar documents
Chapter 13. PIC Family Microcontroller

User Manual. AS-Interface Programmer

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Old Company Name in Catalogs and Other Documents

PAC52XX Clock Control Firmware Design

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

Microtronics technologies Mobile:

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

Serial port interface for microcontroller embedded into integrated power meter

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

WIFI OBD GPS Tracker T356 User Manual

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Training Document for Comprehensive Automation Solutions Totally Integrated Automation (T I A) MODULE A5 Programming the CPU 314C-2DP

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

1. Computer System Structure and Components

The FT6x06 series ICs include FT6206 /FT6306, the difference of their specifications will be listed individually in this datasheet.

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

OPENUPS. 6-30V Intelligent Uninterruptible Power Supply. Installation Guide. Version 1.0f P/N OPENUPS-06

Software Real Time Clock Implementation on MC9S08LG32

POCKET SCOPE 2. The idea 2. Design criteria 3

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Designing an Induction Cooker Using the S08PT Family

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

How to design an insulin pump

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

Design of an Insulin Pump. Purpose of an Insulin Pump:

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

Backup Power Domain. AN Application Note. Introduction

A PSTN Terminal for FSK Decoding and DTMF Dialing Applications

Flexible Active Shutter Control Interface using the MC1323x

Using the HT1632 for Dot Matrix LED Displays

USING I2C WITH PICAXE

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE

AN1229. Class B Safety Software Library for PIC MCUs and dspic DSCs OVERVIEW OF THE IEC STANDARD INTRODUCTION

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

HT46R14A Single Phase AC Induction Motor Frequency Converter Application

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

SIMATIC NET. CP AS-Interface Master B C. Preface Contents. Technical Description and Installation Instructions Interface to the User Program

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

T3 Mux M13 Multiplexer

AVR Butterfly Training. Atmel Norway, AVR Applications Group

Use of the ZENA MiWi and P2P Packet Sniffer

User s Manual. Management Software for Inverter

Microcontrollers in Practice

IRTC Compensation and 1 Hz Clock Generation

L10. Quectel GPS Engine. EVB User Guide L10_EVB_UGD_V1.00

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

UTC UNISONIC TECHNOLOGIES CO., LTD. 1 DIGITAL ALARM CLOCK

USER MANUAL V5.0 ST100

APPLICATION. si32library. Callback CMSIS HARDWARE. Figure 1. Firmware Layer Block Diagram

User and installation manual

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

Z8 Encore! XP F64xx Series Flash Microcontrollers. In-Circuit Emulator. User Manual UM

Fujitsu Microelectronics Europe Application Note MCU-AN E-V10 FR FAMILY 32-BIT MICROCONTROLLER MB91460 CLOCK SUPERVISOR APPLICATION NOTE

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

An Introduction to MPLAB Integrated Development Environment

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

If anything is damaged or missing, contact your dealer.

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

Operating Systems. Lecture 03. February 11, 2013

ET-BASE AVR ATmega64/128

ECP & ECP240-32EX

Timer A (0 and 1) and PWM EE3376

FLOOR INDICATORS CATALOGUE 2007

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

CR Band Auto Set Dual Alarm Clock Radio ROBERTS. Sound for Generations. Please read this manual before use

Table 1: Address Table

Tutorial for MPLAB Starter Kit for PIC18F

HDMM01 V1.0. Dual-axis Magnetic Sensor Module With I 2 C Interface FEATURES. Signal Path X

ZMD31050 Advanced Differential Sensor Signal Conditioner

Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas

Old Company Name in Catalogs and Other Documents

AN4646 Application note

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Wireless Temperature

5 Dry Contact Cable User Manual

WinCON8000-R2/R8. Hardware User s Manual

ZL30136 GbE and Telecom Rate Network Interface Synchronizer

The Access Engine. Building Integration System - The Access Engine. Security Systems

OWNERS MANUAL. Status Monitor. for Windows 95, 98, ME, NT 4, 2000 & XP. SIGNALCRAFTERS TECH, INC.

PHONE MANAGER INDEX. page

Section 29. Real-Time Clock and Calendar (RTCC)

71M6521 Energy Meter IC. Real Time Clock Compensation. The Challenge. The RTC in the 71M6521D/F. Theory of Operation APPLICATION NOTE

User Manual of WT 493

6ES7313-5BF03-0AB0. Supply voltages Rated value 24 V DC Yes permissible range, upper limit (DC) circuit breaker type B, min. 4 A

Designing VM2 Application Boards

HANDLING SUSPEND MODE ON A USB MOUSE

Transcription:

Fujitsu Semiconductor (Shanghai) Co., Ltd. Application Note MCU-AN- 500056-E-10 F 2 MC-8FX FAMILY 8-BITMICROCONTROLLER MB95200 SERIES ELECTRONIC SAFE DEMO REFERENCE SOLUTION APPLICATION NOTE

Revision History Revision History Date Author Change of Records 2009-11-4 Kevin Lin V1.0 This manual contains 18 pages. 1. The products described in this manual and the specifications thereof may be changed without prior notice. To obtain up-to-date information and/or specifications, contact your Fujitsu sales representative or Fujitsu authorized dealer. 2. Fujitsu will not be liable for infringement of copyright, industrial property right, or other rights of a third party caused by the use of information or drawings described in this manual. 3. The contents of this manual may not be transferred or copied without the express permission of Fujitsu. 4. The products contained in this manual are not intended for use with equipment which requires extremely high reliability such as aerospace equipment, undersea repeaters, nuclear control systems or medical equipments for life support. 5. Some of the products described in this manual may be strategic materials (or special technology) as defined by the Foreign Exchange and Foreign Trade Control Law. In such cases, the products or portions thereof must not be exported without permission as defined under the law. 2009 Fujitsu Semiconductor (Shanghai) Co., Ltd. MCU-AN- 500056-E-10 Page 2

CONTENTS CONTENTS REVISION HISTORY... 2 CONTENTS... 3 1 OVERVIEW... 4 2 DEMO PLATFORM... 5 2.1 Platform... 5 3 FEATURES... 6 3.1 Multiple Password Level... 6 3.2 Alterable Code Length... 6 3.3 Operation Indication and Error Alarm... 6 3.4 Low Battery Capacity Alarm... 6 3.5 Error Lock... 6 3.6 Dual Power Supply Source... 6 4 FUNCTIONS... 7 4.1 How to open the Safe... 8 4.2 Main Code Operation... 8 4.3 User Code Operation... 8 4.4 Emergency Code... 9 5 HARDWARE... 10 5.1 System Block... 10 5.2 Modules... 12 6 FIRMWARE... 15 6.1 Flow Chart of Main Function... 15 6.2 Firmware Project... 16 7 MORE INFORMATION... 17 8 APPENDIX... 18 8.1 Tables... 18 8.2 Figures... 18 MCU-AN- 500056-E-10 Page 3

Chapter 1 Overview 1 Overview Fujitsu Electronic Safe demo set which is based on Fujitsu MB95200 series is a high costeffective solution. It consists of the components below: 1 x main board with a MB95F214K 1 x 12-key keyboard 1 x electronic valve 1 x battery case for 4 5# batteries This demo set supports these features: Multiple password levels Alterable code length Operation and error indications Low battery capacity alarm Error lock Dual power supplies MCU-AN- 500056-E-10 Page 4

Chapter 2 Demo Platform 2 Demo Platform 2.1 Platform The electronic safe system consists of a main board which is combined with a 12-key board, an electronic valve and a battery case for 4 5# batteries. Figure 2-1: Front of Electronic Safe Demo MCU-AN- 500056-E-10 Page 5

Chapter 3 Features 3 Features 3.1 Multiple Password Level The password has three levels of code: main code, user code and emergency code. They are ranked by priority from high to low. Each code is used independently. 3.2 Alterable Code Length The code length is compatible from 6 to 12 bits. 3.3 Operation Indication and Error Alarm In this system, a buzzer is used to indicate the operations or errors. When different keys are pressed or error occurs, the buzzer sounds differently to indicate the corresponding status. (1) 100ms on at 1KHZ means key press. (2) 1s on at 500HZ means correct operation. (3) 4 times of 100ms on at 250HZ and 50ms off means incorrect operation. (4) 100ms on at 1KHZ and 50ms off in every 5 minutes means being in 15-minute-lock. 3.4 Low Battery Capacity Alarm A LED is used to indicate the battery capacity. (1) Normal LED keeps on. (2) Low LED flashes at the frequency of 500HZ continually. 3.5 Error Lock The Safe will lock automatically for 30 seconds when enter an incorrect password 5 times or less, while when an incorrect password is entered for more than 5 times, the Safe will be locked for 15 minutes. 3.6 Dual Power Supply Source When low battery capacity occurs, the power supply will shift to a backup battery package automatically. User can open the Safe to replace the main batteries first. MCU-AN- 500056-E-10 Page 6

Chapter 4 Functions 4 Functions The Safe keeps sleeping until being waked up by pressing * or PU1, Figure4-1 shows the back of the demo. PU1 and PU2 can be found on the back. In wake-up mode, an interval of longer than 5 seconds between two key-presses will switch the Safe to sleep mode. The main functions of this electronic Safe will be introduced as follow. PU2 PU1 Figure 4-1: Back of Electronic Safe Demo MCU-AN- 500056-E-10 Page 7

4.1 How to open the Safe Electrionic Safe Demo V1.0 Chapter 4 Functions The Safe have three levels of password. When the Safe is powered on, user can enter a password according to the format below to open it. a. Press [*]. b. Enter [password]. c. Press [#]. Example: [*] 123456 [#]. 4.2 Main Code Operation Condition: The Safe has been opened by main code. 4.2.1 Set main code a. Press [*]. b. Enter [5][3]. c. Press [PU2]. d. Enter [main code] [#] twice. Example: [*] [5][3] [PU2] [543210] [#] [543210] [#]. 4.2.2 Modify main code a. Press [*]. b. Press [0]. c. Press [PU1]. d. Enter [old main code] [#]. e. Enter [new main code] [#] twice. Example: [*] [0] [PU1] [012345] [#] [543210] [#] [543210] [#]. 4.3 User Code Operation Condition: The Safe has been opened by main code or User code 4.3.1 Set user code a. Press [PU1]. b. Enter [user code][#] twice. Example: [PU1] [543210] [#] [543210] [#]. 4.3.2 Modify user code a. Press [*]. b. Press [1]. c. Press [PU1]. d. Enter [old user code] [#]. e. Enter [new user code] [#] twice. Example: [*] [1] [PU1] [012345] [#] [543210] [#] [543210] [#]. MCU-AN- 500056-E-10 Page 8

4.4 Emergency Code Electrionic Safe Demo V1.0 Chapter 4 Functions Condition: The Safe has been opened by main code or Emergency code. 4.4.1 Set emergency code a. Press [*]. b. Enter [5][2]. c. Press [PU2]. d. Enter [emergency code][#] twice. Example: [*] [5][2] [012345] [#] [012345] [#]. 4.4.2 Modify emergency code a. Press [*]. b. Press [8]. c. Press [PU1]. d. Enter [old emergency code] [#]. e. Enter [new emergency code] [#] twice. Example: [*] [8] [PU1] [012345] [#] [543210] [#] [543210] [#]. 4.4.3 Cancel emergency code a. Press [*]. b. Press [8]. c. Press [PU2]. d. Enter [1234567890] [#]. Example: [*] [8] [PU2] [1234567890] [#]. MCU-AN- 500056-E-10 Page 9

Chapter 5 Hardware 5 Hardware 5.1 System Block The whole system consists of 7 blocks: -MCU -Key input -Electronic valve driver -Power interface -EEPROM -Battery capacity monitoring and alarm -Buzzer A system block diagram is shown in Figure5-1. Keyboard LED alarm Battery capacity monitor MB95F214K EEPROM Valve Figure 5-1: System Block Diagram In this demo, many functions share the same pin and completed perfectly. Please refer to Figure 5-2 for details (see next page). MCU-AN- 500056-E-10 Page 10

Chapter 5 Hardware Figure 5-2: Electronic Safe MCU-AN- 500056-E-10 Page 11

Chapter 5 Hardware 5.2 Modules MCU The MCU is MB95F214K, an 8 pins IC with 16K bytes FLASH, 496 bytes RAM and 5 general I/Os. Figure 5-3: MCU Table 5-1: Pin Function Number Pin Direction Function 4 RSTX/PF2 OUTPUT Electronic valve drive 5 P04/INT04/AN04/HCLK1/EC0 INPUT Key input, E2 SDA pin 6 P05/AN05/TO00/HCLK2 INPUT Battery capacity monitoring,e2 SCL pin 7 P06/INT06/TO01 OUTPUT Buzzer output 8 P12/EC0/DBG OUTPUT Battery capacity monitoring enable, LED Power interface The demo has two power supplies. When the LED flashes to indicate low battery capacity, a backup battery package will work. User can open the Safe to replace the 5# batteries. D1 and D2 are used to prevent the counter current. Figure 5-4: Power Interface MCU-AN- 500056-E-10 Page 12

Chapter 5 Hardware Key input The key scan is implemented via only one AD channel. When MCU is sleeping, the pin acts as a general I/O to monitor the high-to-low eagle from key input that will produce an interrupt to wake the MCU up. After being waked up, the pin will be set to analog input for scanning keys. Figure 5-5: Key Input EEPROM The EEPROM shares pins with the key input and battery capacity monitoring. When the EEPROM is enabled, the pins act as I/O, otherwise they act as analog input. The EEPROM is used to store the passwords. For an unused Safe, the default passwords are 123456. Figure 5-6: EEPROM MCU-AN- 500056-E-10 Page 13

Chapter 5 Hardware Battery capacity monitoring and alarm This part has two functions. One is to control the LED, and another is to monitor the battery capacity. DPEN controls the whole circuit. When DPEN is set as 1, the circuit work, otherwise the circuit is disabled to save power. DEPWR is used to detect the battery capacity. Figure 5-7: Battery Capacity Monitoring and Alarm MCU-AN- 500056-E-10 Page 14

Chapter 6 Firmware 6 Firmware 6.1 Flow Chart of Main Function Here, the flow chart of main function is given for reference. Start Initialize MCU Load E2 N First power-on? Y Initialize password a write into E2 Sleep Waked up by key interrupt Valid input? Y N Operations Error alarm Check battery capacity Figure 6-1: Main Function MCU-AN- 500056-E-10 Page 15

Chapter 6 Firmware When routine starts, initialize the MCU first, then get the information of the Safe: is it a new Safe? If it is, a default password will be set and written into the external EEPROM; otherwise the password will be loaded from EEPROM. Then the Safe enters into sleep mode to save power till a key interrupt comes. In wake-up mode, if password was input, the safe will check the validity. If the input is valid, execute according operation, or Error alarm. Checking the battery capacity is the last function that will be executed every time. In the end, the Safe enters sleep mode. 6.2 Firmware Project A table was given to explain the function of the main files below. safe01.c battery.c beep.c CMD.c EEPRM24xx.c led.c key.c MCUinit.c globe.c interrupt.c header.c startup.asm vector.c mb95200.asm Files Figure 6-2 is a project opened by SOFTUNE. Table 6-1: Functions Function Initialize MCU and do main loop Monitor battery capacity Buzzer Switch internal modes Write or read EEROM Led functions Sample AD for key input Initialize MCU base timer subroutines start files, just load for use vector configuration file memory define, just load for use Initialization and main loop Figure 6-2: Firmware Project MCU-AN- 500056-E-10 Page 16

Chapter 7 More Information 7 More Information For more information on FUJITSU MB95200 products, please visit following website: English version: http://www.fujitsu.com/cn/fsp/services/mcu/mb95/application_notes.html Simplified Chinese Version: http://www.fujitsu.com/cn/fss/services/mcu/mb95/application_notes.html MCU-AN- 500056-E-10 Page 17

Chapter 8 Appendix 8 Appendix 8.1 Tables Table 5-1: Pin Function... 12 Table 6-1: Functions... 16 8.2 Figures Figure 2-1: Front of Electronic Safe Demo... 5 Figure 4-1: Back of Electronic Safe Demo... 7 Figure 5-1: System Block Diagram... 10 Figure 5-2: Electronic Safe... 11 Figure 5-3: MCU... 12 Figure 5-4: Power Interface... 12 Figure 5-5: Key Input... 13 Figure 5-6: EEPROM... 13 Figure 5-7: Battery Capacity Monitoring and Alarm... 14 Figure 6-1: Main Function... 15 Figure 6-2: Firmware Project... 16 MCU-AN- 500056-E-10 Page 18