Serial port interface for microcontroller embedded into integrated power meter



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

EEM870 Embedded System and Experiment Lecture 1: SoC Design Overview

Microtronics technologies Mobile:

Chapter 13. PIC Family Microcontroller

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

Serial Communications

Atmel Norway XMEGA Introduction

ontroller LSI with Built-in High- Performance Graphic Functions for Automotive Applications

Microcontrollers in Practice

Project Plan. Project Plan. May Logging DC Wattmeter. Team Member: Advisor : Ailing Mei. Collin Christy. Andrew Kom. Client: Chongli Cai

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

PROGRAMMABLE ANALOG INTEGRATED CIRCUIT FOR USE IN REMOTELY OPERATED LABORATORIES

Lab Experiment 1: The LPC 2148 Education Board

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

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

System Design Issues in Embedded Processing

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

Display Message on Notice Board using GSM

2.0 Command and Data Handling Subsystem

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

Designing a System-on-Chip (SoC) with an ARM Cortex -M Processor

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

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

The Programming Interface

Definitions and Documents

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

7a. System-on-chip design and prototyping platforms

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

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

Lecture N -1- PHYS Microcontrollers

UM I 2 C-bus specification and user manual. Document information

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

Keywords ATM Terminal, Finger Print Recognition, Biometric Verification, PIN

Computer and Set of Robots

Am186ER/Am188ER AMD Continues 16-bit Innovation

All Programmable Logic. Hans-Joachim Gelke Institute of Embedded Systems. Zürcher Fachhochschule

Reconfigurable System-on-Chip Design

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

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

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

Pre-tested System-on-Chip Design. Accelerates PLD Development

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

A DIY Hardware Packet Sniffer

International Journal of Engineering Research & Management Technology

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

Scalar Network Analyzer

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Memory Basics. SRAM/DRAM Basics

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

DS1621 Digital Thermometer and Thermostat

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

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

Specification and Design of a Video Phone System

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

Lesson 7: SYSTEM-ON. SoC) AND USE OF VLSI CIRCUIT DESIGN TECHNOLOGY. Chapter-1L07: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

SSD1298. Advance Information. 240 RGB x 320 TFT LCD Controller Driver integrated Power Circuit, Gate and Source Driver with built-in RAM

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

POCKET SCOPE 2. The idea 2. Design criteria 3

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

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

Building Blocks for PRU Development

ADS9850 Signal Generator Module

Android Controlled Based Interface

MX PIC24F Educational Module User Manual

Networking Remote-Controlled Moving Image Monitoring System

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

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Single channel data transceiver module WIZ2-434

Testing of Digital System-on- Chip (SoC)

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

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

ADVANCED FIRE ALARMING SYSTEM THROUGH MOBILE PHONE

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Software User Guide UG-461

KEYWORDS: Cellphone, Braille language, Visually impaired people(vip), Microcontroller, Decoder, Latches, DC motors.

AN736. An I 2 C TM Network Protocol for Environmental Monitoring THE I 2 C BUS SPECIFICATION INTRODUCTION

DS1621 Digital Thermometer and Thermostat

Security & Chip Card ICs SLE 44R35S / Mifare

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

Design Considerations in Adding USB Communications to Embedded Applications

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

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

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

AC : PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Network connectivity controllers

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

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

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

DS1307ZN. 64 x 8 Serial Real-Time Clock

Transcription:

Serial port interface for microcontroller embedded into integrated power meter Mr. Borisav Jovanović, Prof. dr. Predrag Petković, Prof. dr. Milunka Damnjanović, Faculty of Electronic Engineering Nis, Serbia Niš, September 2007-1 -

INTRODUCTION Modern power meters relays on single chip devices referred to as integrated power meter (IPM). Proposed three-phase IPM integrates all primary functional blocks required to implement solid-state energy meter. The chip performs the precision computations necessary to measure: active, reactive energy in four quadrants for all three-phases, instantaneous frequency for each phase, RMS currents and voltages, active, reactive and apparent power and power factor. Niš, September 2007-2 -

INTRODUCTION Fig.1 Architecture of the Integrated Power-Meter IPM is a mixed signal circuit consisting of analog and digital signal processing blocks (Fig.1). The analog part of IPM contains Sigma-Delta AD converters for current and voltage channels, Band-Gap voltage reference and PLL circuits. The digital part is composed of digital filters, digital signal processing block (DSP) and microcontroller unit together with integrated peripherals. Niš, September 2007-3 -

THE MICROCONTROLLER UNIT OVERVIEW MCU operates at 4.194 MHz. Instruction set is compatible with 8052 microcontrollers. One-byte instructions are performed in a single cycle. Processing throughput of more than 4 MIPS. Fig.2 Microcontroller unit memory map Memory areas: program memory, implemented as internal 8kB SRAM block; external data memory, 2 kb SRAM memory block which also resides on chip; internal data memory shared between Special Function Register and 256B RAM Niš, September 2007-4 -

THE MICROCONTROLLER UNIT OVERVIEW The MCU peripherals: three 8-bit wide digital in-out ports two programmable UART modules serial port interface (SPI) for communication with external EEPROM memories LCD driver circuits capable to support up to 168 pixels LCD real-time clock In AMIS CMOS 0.35μm technology we don t have available on-chip non-volatile memory blocks. Therefore, external EEPROM devices had to be used together with the Integrated Power Meter In the special programming mode, the IPM has ability to receive MCU program through special UART input pin and store it into external EEPROM memory through SPI pins. After resetting MCU, in the initialization mode, program memory (internal 8kB SRAM block) is automatically loaded from external EEPROM memory through SPI pins. Niš, September 2007-5 -

SERIAL PORT INTERFACE The interface between MCU and EEPROM is designed as an I2C-like serial port interface.the hardware module dedicated for this purpose is named MASTER SPI. The communication between MCU and the external EEPROM requires data transfer during chip initialization, programming and normal operation mode. Fig.3 MASTER SPI interface Only two pins are required: SDA for data and SCL for clock. The serial clock frequency is 100 khz. Internal communication with MCU employs two 8-bit Special Function Registers: EEDATA and EECTRL that are embedded into MASTER SPI block. Niš, September 2007-6 -

SERIAL PORT INTERFACE Bit position Name 7 Error Illegal command received 6 Busy Serial Data Bus is busy Description 5 Rx_ack Acknowledge received from EEPROM 4 Tx_ack Acknowledge transmitted to EEPROM Table 1. EECTRL register content 3:0 Cmd(3: 0) 0 No operation 2 Receive a byte from EEPROM and send ACK 3 Transmit a byte to EEPROM 5 Issue a STOP sequence 6 Receive a byte from EEPROM and do not send ACK 9 Issue a START sequence Niš, September 2007-7 -

SERIAL PORT INTERFACE Fig. 4 EECTRL(3:0)=1001 Issue a START sequence Fig.5 EECTRL(3:0)=0101 Issue a STOP sequence Writing data into four least significant bits of EECTRL register commences the MASTER SPI actions. Niš, September 2007-8 -

MCU PROGRAMMING AND INITIALIZATION The main blocks are: MASTER SPI; UART; Finite State Machine (FSM) 8192-byte SRAM memory block 13-bit COUNTER that defines the address for SRAM Fig. 6 The part of chip dedicated for EEPROM programming and chip initialization Niš, September 2007-9 -

MCU PROGRAMMING AND INITIALIZATION s t a r t w ri t dev. address e high mem. addr. low mem. addr. data byte 1 data byte 32 101 0 xxx 0AAA a a a a a 2 1 0 c c c c c k k k k k Fig. 7 The structure of one data package sent to the EEPROM during programming mode a c k s t o p During programming mode all data received from UART block are serially transmitted in form of 32-byte data packages through SDA pin to the EEPROM device. The 32-byte package begins with start bit, followed by device address byte, high memory address byte, low memory address byte, 32 data bytes and ends by stop bit. Bytes are separated by acknowledge bit received from EEPROM Niš, September 2007-10 -

MCU PROGRAMMING AND INITIALIZATION Fig.8 Data package during SRAM initialization mode Chip initialization begins after MCU reset. The FSM starts the communication with a dummy write operation (one with no data bytes) to load the EEPROM address counter. The LSB in the second device address byte signifies read operation. After receiveing 8192 bytes from EEPROM, FSM terminates the read operation. Niš, September 2007-11 -

SIMULATION AND SYNTHESIS The serial port interface as well as the whole digital part of a chip was described in VHDL. Behavioral model in VHDL is created for I2C EEPROM 24LC64 which is after used in test-benches for SPI verification. Digital synthesis was performed by Cadence tool named BuildGates. Logical verification is carried out in NCsim digital circuit simulator The used standard cell technology is AMIS CMOS 0.35μm. Digital block Area (gates) MASTER SPI 554.73 FSM 465.29 UART 291.25 COUNTER 68.98 8192 SRAM 50096.00 Table 2. Area of digital blocks Niš, September 2007-12 -

SIMULATION AND SYNTHESIS Fig. 9 EEPROM read operation Niš, September 2007-13 -

CONCLUSION MASTER SPI dedicated for communication with external EEPROM device has I2C-like interface that operates at 100kHz. External EEPROM is used for chip programming, SRAM program memory initialization and also for storing the important measurement results gathered during chip normal operating mode. MASTER SPI can be programmed by 8052 microcontroller through only two 8-bit Special Function Registers EEDATA and EECTRL MASTER SPI as well as the whole digital part of a IPM system-on-chip is coded in VHDL. The code was verified by simulations and synthesized by Cadence tools. AMI Semiconductor CMOS 0.35μm standard cell technology was used for chip implementation. Niš, September 2007-14 -