8051 Microcontroller in EDWinXP Visionics

Similar documents
CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

LOAD BALANCING 2X APPLICATIONSERVER XG SECURE CLIENT GATEWAYS THROUGH MICROSOFT NETWORK LOAD BALANCING

RSA Security Analytics Netflow Collection Configuration Guide

Review Employee Leave Balances

RSA Security Analytics Netflow Collection Configuration Guide

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Revenue/Expenses Balance by Fund

New Features in Primavera P6 Professional 15.1

Reviewing Employee History

AN3265 Application note

PCB Project (*.PrjPcb)

OrCAD Lite Products Reference

Approve or Reject Purchase Requistions, Contracts, and Purchase Orders

Changes for Release 3.0 from Release 2.1.1

Intel Device View. User Guide

ChipScope Pro Tutorial

Crystal Reporting 9.2 LSUNO & LSUSH

FxPro MT4 Backtest. A backtesting guide for MetaTrader 4. User Guide

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

Switch board datasheet EB

Remote Management System

Clearview Customer Web Access

COPYRIGHT & TRADEMARKS

SMS Database System Quick Start. [Version 1.0.3]

Resource Checking. Windows 95/98/NT Resource Checking Manual for PCI/ISA DAQ card. [For Windows 95/98/NT]

DME-N Network Driver Installation Guide for LS9

Handheld LPC Data Retrieval Software for Windows. Operation Manual

Intel WiDi Remote 1.0 Release Notes

CA Spectrum and CA Embedded Entitlements Manager

Temperature & Humidity SMS Alert Controller

DME-N Network Driver Installation Guide for M7CL/LS9/DSP5D

Vendor Performance Summary Report

Handheld LPC Utility Software for Windows. Operation Manual

AD9125-EBZ Quick Start Guide

Version 9 Client Workflow Interface (Dashboard) Quick Start

Using the Caché SQL Gateway

Complete PDF. User Guide

Bank Account Numbers for ACH Payments

VIRTUAL DESKTOP COMPANION SOFTWARE FOR MAC

WebSphere Business Monitor

User's Guide. Using RFDBManager. For 433 MHz / 2.4 GHz RF. Version

Oracle Sales Cloud Reporting and Analytics Overview. Release 13.2 Part Number E January 2014

Creating a System DSN for Crystal Reports to Access a Sentinel Server Database. Configuration Guide Version 1.0

Website TERMS OF USE AND CONDITIONS

BrightStor ARCserve Backup for Linux

COM Port Stress Test

4.0. Offline Folder Wizard. User Guide

ReadySHARE Printer. Easy to Set Up: Instructions. 350 East Plumeria Drive San Jose, CA USA

Getting Started with IntelleView POS Administrator Software

Module 1: Getting Started With Altium Designer

ICE MFT (SFTP SERVER) KEYBOARD-INTERACTIVE MODE REQUIREMENT

AN3252 Application note

Avigilon Control Center 5 System Integration Guide. Video and Event Viewer for Lenel OnGuard

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

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

LED board datasheet EB

Nexio Connectus Cluster Set Up with SQL Server Backend

Table of Contents. ARM Evaluation Board (AEB-1) Welcome Guide ARM DGI 0005D. Proprietary Notice

NETWRIX CHANGE NOTIFIER

Crestron VMK-WIN TouchPoint Virtual Mouse & Keyboard Software for Windows Installation Guide

Android Driver s App Update Version 1.89 Samsung Galaxy Tab 4

Lab 3: Introduction to Data Acquisition Cards

Quick Start Guide

TOPS Internet Backup Service User Guide

CITRIX SYSTEMS, INC. SOFTWARE LICENSE AGREEMENT

Oracle Agile Product Lifecycle Management for Process

NOTICE SOFTWARE END USER LICENSE AGREEMENT

Office Language Interface Pack for Farsi (Persian) Content

USB FM Radio-RD USB FM RADIO USER S GUIDE. 1. USB FM Radio Setup. One-time set-up enables configuration of presets and region specific FM band

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

How to Deploy Models using Statistica SVB Nodes

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

CA Nimsoft Service Desk

AGREEMENT AND TERMS OF USE

MDM Mass Configuration Tool User s Manual

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Design Better Products. SolidWorks What s New for PDMWorks Enterprise

Install MS SQL Server 2012 Express Edition

NetBak Replicator 4.0 User Manual Version 1.0

SUPPORT GUIDE FOR NOKIA PC SYNC

CaseWare Time. CaseWare Cloud Integration Guide. For Time 2015 and CaseWare Cloud

how to upgrade your IsatPhone

BrightStor ARCserve Backup for Windows

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

WebSphere Business Monitor

Flow Publisher v1.0 Getting Started Guide. Get started with WhatsUp Flow Publisher.

ALPHA TEST LICENSE AGREEMENT

USER MANUAL. RoomWizard Analytics Console

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

Lab 02 Working with Data Quality Services in SQL Server 2014

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

New Features in Primavera P6 EPPM 16.1

StarWind iscsi SAN Software: Configuring High Availability Storage for VMware vsphere and ESX Server

1 Changes in this release

Implicit Sync. Professional Edition Users Guide

INPEX CONTRACT MANAGEMENT SYSTEM

Canon USA, Inc. WEBVIEW LIVESCOPE SOFTWARE DEVELOPMENT KIT DEVELOPER LICENSE AGREEMENT

Customer Order Portal Created on 9/24/ :45 PM

VIRTUAL DESKTOP COMPANION SOFTWARE FOR WINDOWS

Transcription:

1

Norlinvest Ltd, BVI. Visionics is a trade name of Norlinvest Ltd. All Rights Reserved. No part of the 8051 Microcontroller in EDWinXP document can be reproduced in any form or by any means without the prior written permission of Visionics. 8051 Microcontroller in EDWinXP document is subjected to change without notice. Visionics will make changes in a manner that will not affect dependent systems. Unauthorized duplication, in whole or part, of this document by any means, mechanical or electronic, including translation into another language, except for brief excerpts in published reviews, is prohibited without the express written permission of Visionics. Visionics, EDWinXP, Docone, EDComX, SimWinXP and Mixed Mode Simulator and their respective logos are trademarks or registered trademarks of Visionics. Unauthorized duplication of this work may also be prohibited by local statute. Disclaimer: Information in this publication is subject to change without notice and does not represent a commitment on the part of Visionics. The information contained herein is the proprietary and confidential information of Visionics or its licensors, and is supplied subject to, and may be used only by Visionics s customer in accordance with, a written agreement between Visionics and its customer. Except as may be explicitly set forth in such agreement, Visionics does not make, and expressly disclaims, any representations or warranties as to the completeness, accuracy or usefulness of the information contained in this document. Visionics does not warrant that use of such information will not infringe any third party rights, nor does Visionics assume any liability for damages or costs of any kind that may result from use of such information. 2

Contents 8051 MICROCONTROLLER IN EDWINXP... 4 USING THE 8051 MICROCONTROLLER IN EDWINXP... 4 WRITING CODE FOR 8051 MICROCONTROLLER... 5 WRITING SOURCE CODE IN C LANGUAGE... 7 DEBUGGING THE CODE... 9 3

8051 Microcontroller in EDWinXP The 8051 microcontrollers in EDWinXP help the users to build real-time circuits. The 8051 can be interfaced with external devices like seven segment displays, interrupt generator, serial/pattern generator etc. Using the 8051 microcontroller in EDWinXP 1. Open EDWinXP Main from Start Programs EDWinXP Ver x.xx EDWinXP Main. 2. Open the Schematic Page (Mixed-Mode Simulator) by double clicking on the Page {MAIN PAGE} under Project Circuit [MAINHIER] Diagram Page {MAIN PAGE}. 3. Load 8051 microcontroller and Preprocess it. 4. The necessary timing for the controller is given by connecting a crystal across the pins XTAL1 and XTAL2. The timing can be provided manually by applying a clock of the desired frequency of the crystal to the pin XTAL1/XTAL2. This is done by selecting Tools Instruments Preset Logic Clock Generator 5. Connect nodes on XTAL1/XTAL2 6. Now by clicking on either of the two nodes XTAL1/XTAL2 the following window appears 4

7. Provide the desired frequency, Eg: if the crystal frequency is 6MHz, then the time period will be (1)/(6x10 6 ) i.e. 0.1667 x10 6 The clock fed to the XTAL pin is {L1us, H1us} as Repeatable Pattern 8. Click on Add Set Pattern Accept Writing code for 8051 microcontroller 1. Select Components from the Tool Menu. 2. Choose Component Properties (second Function tool) Change Simulation parameters (second option tool) and Click on the 8051 microcontroller. A new window pops up. 3. Click Setup tab, the code editor window pops up. Code can be written in this window. Code can be written either in C language or assembly language. 5

The tool bar in the code editor window is shown below Clear text Import from disk file Save Export to disk Build Start Debug Stop Debug Step over Step into in debug mode. - Clears the source code in the code editor window. - Displays the Open dialog box and allows loading a new text - Allows to save the source code. - Displays the Save dialog box and allow to save the source code. - Enables compilation of the source code. - Enters the Debug mode. - Terminates debug mode. - Generates an event to notify model to step over the currently debugged part of the code. - Enables to view the line by line execution of the source code 6

Writing source code in C language Basic structure for writing code in C language is #include<8051.h> void main () { } The code is written within the main () function. For better understanding, the case of 8051_Counter is taken. Load 8051_Counter and the steps mentioned till now in Writing code for 8051 microcontroller are executed. The code for 8051_Counter is as follows: 7

By compiling (using the Build button) the basic structure in the C Editor, the default structure in the Assembly Editor will be obtained. The code is written within the _main function. The location to write the code is shown in the figure below. The code in Assembly Editor is also compiled by using the Build button in the code editor Window. Compilation messages will be shown under the Line Message column. After successful compilation click the Save button and close the code editor window. Click Accept in the Component Parameter Setup window. After completing the schematic the circuit is Preprocessed and Analysis is Run. Debugging the code Place breakpoints to keep track of program execution. 8

Breakpoints can be placed by clicking on the gray space on left of the code statements. Note: To remove Breakpoints right click on them. Click on Start Debug button in the code editor window. This will turn on the debug mode. Close the Code Editor window and click Accept in Component Parameter Setup. Go to Schematic Editor and Run Analysis, the code editor window pops up. The program can be debugged using the Step Over (switching between breakpoints) and Step Into (step by step execution) buttons. By clicking on the required ports and registers the changes in them can be viewed during the process. After debugging the Stop debug button The Analysis continues till simulation time ends. is clicked to exit the Debug mode. 9