| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
DEVELOPMENT TOOL Release July 1998 Ref: DOC-ST-REALIZER
Top Searches for this datasheetST-Realizer DEVELOPMENT TOOL Release July 1998 Ref: DOC-ST-REALIZER-SW LIFE SUPPORT DEVICES SYSTEMS MUST EXPRESSLY AUTHORIZED. STMicroelectronics PRODUCTS AUTHORIZED CRITICAL COMPONENTS LIFE SUPPORT DEVICES SYSTEMS WITHOUT EXPRESS WRITTEN APPROVAL STMicroelectronics. used herein: Life support devices systems those which intended surgical implant into body, support sustain life, whose failure perform, when properly used accordance with instructions provided with product, reasonably expected result significant injury user. critical component component life support device system whose failure perform reasonably expected cause failure life support device system, affect safety effectiveness. TABLE CONTENTS INTRODUCTION USER GUIDE REFERENCE INFORMATION EXAMPLE APPLICATIONS INDEX Page 4/171 INTRODUCTION COST-OPTIMISED MICROCONTROLLERS STMicroelectronics offers comprehensive range cores, ranging from entry level sophisticated high performance 32-bit RISC devices. Each core available wide range salestypes, featuring different combinations standard application-specific peripherals: family: mid-range 8-bit embedded control family: application-specific mid-range 8-bit industry standard core. family: 8/16-bit core with register file based architecture real-time tasks. ST10 family: full 16-bit fast core critical real-time applications. ST20 family: high-end 32-bit high performance RISC modular core. growing number applications require high performance digital processing costs severely constrained consumer market. Even most cost sensitive industries increasingly adopting MCUs achieve lowest system costs while benefiting from significant product enhancements. This market segment well addressed families STMicroelectronics microcontrollers: entry-level ST62 microcontrollers, mid-range industry-standard microcontrollers. 5/171 INTRODUCTION ST62 FAMILY OVERVIEW ST62 family aimed mid-range embedded control applications subject dual constraints high noise immunity overall system cost. ST62 family application development tools, including low-cost evaluation Starter Kits, STRealizer graphics-based application development tool, which powerful easy use, clear accurate product documentation, application-aware product support. ST62 family offers optimal system cost wide range consumer, automotive industrial applications because: extensive family available ST62 devices based common core surrounded comprehensive range peripherals, allowing select ONLY those features which strictly required application. ST62 family much appreciated legendary noise immunity. This vitally important most control situations, ensures lowest possible system cost reducing requirements external protection bare minimum. STMicroelectronics's wealth application know-how ensures that each peripheral application-oriented, thus achieving optimum integration functionality. STMicroelectronics's commitment Service ensures expert application aware technical support which draws consolidated know-how wide range application sectors, ranging from appliances industrial, from intelligent battery charging body, from motor control user interfaces. ST62 family devices available One-Time-Programmable versions giving greatest possible code flexibility allowing last minute programming modules, that added even after assembly maximum flexibility convenience. ST62 family used numerous large corporate customers application fields ranging from appliances automotive, during which time acquired legendary reputation excellent noise immunity reliability. 6/171 INTRODUCTION ST62 CORE ARCHITECTURE industry standard 8-bit parallel accumulator architecture features internal registers, popular byte efficient-instruction three pairs flags. Core ST62xx devices independent Memory configuration. such, acts independent central processor, communicating with on-chip I/O, Memory Peripherals internal address, data control busses. Peripheral resources handled using tailored interrupt structures dedicated external registers.The core linked on-chip peripherals serial data indirectly, interrupt purposes, through control registers. Figure ST62 Architectural Block Diagram PROGRAM MEMORY (OTP/EPROM/ROM) Configurable PORTs Multifunctional TIMER EEPROM ADDRESS DATA Auto-Reload TIMER CONVERTER WATCHDOG UART POWER SUPPLY SUPERVISOR DRIVER OSCILLATOR STACK LEVEL STACK LEVEL STACK LEVEL STACK LEVEL STACK LEVEL STACK LEVEL 8-BIT CORE 7/171 INTRODUCTION ST62 ON-CHIP PERIPHERALS Flexible Multifunctional circuitry offers range programmable input output modes, with programmable pull-ups, analog multiplexing automatic switching between alternate peripheral resource functions general purpose I/O. Data, Data Direction, Option Pull-up registers allow each precisely configured according application's requirements. High current outputs available direct driving external loads such LEDs TRIACs. Multifunctional Timer/Counters available 8-bitTimer/Counters feature prescaler, external clock input control logic input capture output compare. auto-reload version also available. addition standard timing real time clock tasks, timer peripherals used waveform generation analysis. Digital Watchdog Digital Watchdog circuit consists 6-bit reloadable downcounter equipped with input clock prescaler, capable generating system reset allowed count down zero. watchdog used conjunction with your program detect occurrence software error external interference, thus restart MCU. Analog Digital Converter (ADC) analog inputs multiplexed 8-bit successive approximation monotonic analog digital converter peripheral. analog input voltage must within supply voltage range, which used analog reference. Serial Peripheral Interface (SPI) optimized synchronous serial interface with programmable transmission modes master/slave capabilities supporting wide range industry standard specifications. performs serial data exchange with low-cost external memory serially-controlled peripherals. also used implement asynchronous serial communications, such simple RS232 links, with limited processor overhead. Universal Asynchronous Receiver/Transmitter dedicated UART peripheral available asynchronous serial communications with minimum software processor overhead. Driver driver peripheral comprises control logic, programmable prescaler, dedicated RAM, well dedicated segment common output pins. EEPROM EEPROM data memory available non-volatile storage. EEPROM features byte parallel programming modes minimise programming time power consumption, which especially useful battery-powered applications. EEPROM memory reprogrammed great number times while retaining data integrity. 8/171 INTRODUCTION Table ST62 Product Range Device ST6200 ST6201 ST6203 ST6208 ST6209 ST6210 ST6215 ST6218 ST6220 ST6225 ST6228 ST6230 ST6232 ST6240B ST6242B ST6246B ST6252 ST6253 ST6255 ST6260 ST6262 ST6263 ST6265 ST6280B ST6285B Program Memory EEPROM Inputs 4x8-Bit 4x8-Bit 4x8-Bit 8x8-Bit 16x8-Bit 7x8-Bit 8x8-Bit 16x8-Bit 12x8-Bit 16x8-Bit 21x8-Bit 12x8-Bit 6x8-Bit 8x8-Bit 4x8-bit 7x8-bit 13x8-bit 7x8-Bit 4x8-Bit 7x8-Bit 13x8-Bit 12x8-Bit 8x8-Bit Timer Timers 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x16-Bit 1x8-Bit 1x16-Bit 2x8-Bit 2x8-Bit 2x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit 1x8-Bit Serial I/Os (High Interface Current) UART UART UART UART UART UART (10) Package DIP16/SO16 DIP16/SO16 DIP16/SO16 DIP20/SO20 DIP20/SO20 DIP20/SO20 DIP28/SO28 DIP20/SO20 DIP20/SO20 DIP28/SO28 DIP28/SO28 DIP28/SO28 SDIP42/QFP52 QFP80 QFP64 SDIP56 DIP16/SO16 DIP20/SO20 DIP28/SO28 DIP20/SO20 DIP16/SO16 DIP20/SO20 DIP28/SO28 QFP100 QFP80 Abbreviations Notes: Analog Digital Converter UART Universal Asynchronous Receiver/Transmitter Serial Peripheral Interface Watchdog products included Company CD-ROM (CDDATASH***) 9/171 INTRODUCTION ST62 DEVELOPMENT SUPPORT Full Hardware Software Development Support full range development tools available, including Starter Kits, In-Circuit Emulators, OTP/EPROM programming boards Gang programmers each device. Software development tools include Windows Assembly Language development suite, well graphical development tool known ST-Realizer Fuzzy Logic development tool known fuzzyTECHTMST6 Explorer Edition. Hardware Development Tools Table ST62 Hardware Development Tools DEVICE GANG PROGRAMMER ST62E0X-GP/DIP16 ST62E0X-GP/SO16 ST62E10-GP/DIP20 ST62E10-GP/SO20 ST62E10-GP/DIP20 ST62E10-GP/SO20 ST62E15-GP/DIP28 ST62E15-GP/SO28 ST62E15-GP/DIP28 ST62E15-GP/SO28 ST62E30-GP/DIP28 ST62E30-GP/SO28 ST62E32-GP/DIP42 ST62E40-GPQFP ST62E42-GP/QFP ST62E60-GP/DIP ST62E65-GP/DIP ST62E80-GP/QFP ST62E85-GP/QFP EPROM PROGRAMMER ST62E2X-EPB ST62E2XC-EPB ST62E2XC-EPB ST62E2XC-EPB ST62E2XC-EPB ST62E3X-EPB ST62E3X-EPB ST62E4XB-EPB ST62E4XB-EPB ST62E4XB-EPB ST62E6XB-EPB ST62E6XB-EPB ST62E6XB-EPB ST62E8X-EPB ST62E8X-EPB STARTER KIT* ST622XC-KIT ST622XC-KIT ST622XC-KIT ST622XC-KIT ST622XC-KIT ST62E3X-KIT ST62E3X-KIT ST624XB-KIT ST624XB-KIT ST624XB-KIT ST626X-KIT ST626X-KIT ST626X-KIT EMULATOR ST626X-EMU2 ST626X-EMU2 ST623X-EMU2 ST626X-EMU2 ST623X-EMU2 ST623X-EMU2 ST623X-EMU2 ST6240B-EMU2 ST6242B-EMU2 ST624XB-EMU2 ST626X-EMU2 ST626X-EMU2 ST626X-EMU2 ST6280-EMU2 ST6285-EMU2 ST6200C/01C/03C ST6208C/09C/10C/20C ST6218C ST6215C/25C ST6228C ST6230B ST6232B ST6240B ST6242B ST6246B ST6252C/62C ST6253C/60C/63C ST6255C/65C ST6280B ST6285B *Support packages only 10/171 INTRODUCTION Software Development Tools full range development software tooling available family Microcontrollers. This currently comprises three principal product groups: available products listed below, together with relevant upgrade versions. Table ST62 Software Development Tools Device Salestype ST-Realizer ST62 ST6-FUZZY/PC ST6-SW/PC ST6-SWC/PC Description Graphical Schematic based Development Fuzzy Logic Compiler Macro-assembler, Linker simulator Compiler Note: These software suites supplied standard issue with Emulator. 11/171 INTRODUCTION FAMILY INTRODUCTION Industry-Standard microcontroller family offers wide range solutions industrial, automotive (CAN), computer peripherals (USB) consumer applications. been used many years high volume dedicated applications such monitors radios. Based industry-standard 8-bit architecture, extended STMicroelectronics better accommodate high level language programming, designed target small medium sized applications with requirements excellent system price/performance, short application development cycle outstanding quality reliability. powerful onchip peripherals functionality core range different versions package sizes allow user select device that best matches needs application. Figure Multipurpose Microcontrollers Package Size ST72121 ST72311 ST7237x ST72331 E2PROM ST72101 ST7221x ST72272 Functionality FAMILY OVERVIEW range pin-through packages available (28, 64-pin) with broad on-chip resources giving designers considerable choice when selecting components determining overall hardware cost. devices available wide range program data memory sizes. program memory available high volume production. devices customer's program code mask programmed STMicroelectronics during device manufacture. (One Time Programmable) versions particularly adapted small medium production volumes, well products using different firmware versions with code that frequently updated. devices programmable customer using STMicroelectronics thirdparty EPROM programmers. EPROM versions used during development prototyping program memory erased programmed often required. 12/171 INTRODUCTION Available on-chip peripherals include 16-bit Timer, Watchdog timer, converter, converter, asynchronous communications interface, SPI, I2C, interfaces. On-chip EEPROM available some devices. Figure Integrated Microcontroller Solutions Package Size ST72511 ST72531 E2PROM ST72671 ST72251 Functionality 13/171 INTRODUCTION CORE ARCHITECTURE industry-standard 8-bit accumulator-based architecture features internal registers including 16-bit program counter. instruction instructions with addressing modes offering unsigned multiply, true manipulation, various bit/byte transfer modes powerful branching logic. Peripheral resources handled dedicated interrupts registers. Figure Registers ACCUMULATOR INDEX REGISTER INDEX REGISTER STACK POINTER PROGRAM COUNTER CONDITION CODE REGISTER 14/171 INTRODUCTION ON-CHIP PERIPHERALS Parallel Ports bidirectional parallel lines generally grouped ports lines each. number lines depends specific device pinout. lines shared between other on-chip peripherals (alternate functions) general purpose function defined application. Data input output data registers (one each port). Data Direction Option registers allow each line individually configured application's requirements. 16-Bit Timer 16-bit timer used wide range standard timing tasks. 16-bit free running counter with programmable prescaler. Each timer have input capture output compare pins with associated registers. This allows applications measure pulse intervals generate pulse waveforms. Timer overflow other events flagged status register with optional interrupt generation. Watchdog Timer watchdog timer consists 7-bit reloadable downcounter that triggers device reset reaches predefined value. During normal operation, application reloads counter regular intervals prevent reset occurring. this means, application hangs, condition automatically cleared resetting MCU. "software watchdog" enabled software. "hardware watchdog" permanently enabled hardware. Analog Digital Converter peripheral multiplexes analog input channels. converts analog input 8-bit value using monotonic successive approximation. analog input voltage must within supply voltage range, which used analog reference. Digital Analog Converter Digital Analog converter generates 10-bit pulse width modulated signals with software programmable duty cycle. These signals with external filtering, used replace potentiometers analog voltage control sources. channel available some devices. Asynchronous Serial Communications Serial Communications Interface (SCI) offers flexible means full-duplex data exchange with external equipment requiring industry standard asynchronous serial data format. very wide range baud rates available using dual baud rate generator systems both receive transmit channels. Transmitter receiver circuits independent operate different baud rates. Serial Peripheral Interface peripheral synchronous serial interface Master Slave device communications. Single master multimaster mode systems supported communication with external peripherals other microprocessors. Dedicated registers interrupts allow full software control user defined protocols. 15/171 INTRODUCTION Interface standard serial intended primarily peripherals such monitors, keyboards, joysticks, multimedia devices, scanners, etc. allows such devices connected removed without rebooting installing drivers. peripheral implements speed function interface. Data transfer performed DMA. peripheral integrated 3.3V voltage regulator transceiver. Suspend Resume operations supported. Interface synchronous serial connecting multiple devices using data line clock line. interface operates multimaster slave mode supports speeds KHz. events (Bus busy, slave address recognised) error conditions automatically flagged peripheral registers interrupts optionally generated. interface supports 10-bit addressing. Interface Controller Area Network (CAN) protocol becoming more more widely accepted Europe throughout world. enables creation networks inside vehicle industrial system with high tolerance error noisy environments. Controller area network peripheral conforms Specification active 2.0B passive. interface three 10-bit transmit/ receive buffers 12-bit message acceptance filters. Baud rates programmable Mbit/sec. 16/171 INTRODUCTION Table PRODUCT FINDER Device OTP/ 8-bit Serial Serial I/Os EEPROM Watch- 16-bit Additional EPROM/ Comm. Comm. (High Package Timers Features Inputs (Sync) (Async) Current) 1024 1024 I2C+SPI I2C+SPI SDIP32/ SO28 SDIP32/ SO28 SDIP42/ TQFP44 Voltage SDIP42/ Detector TQFP44 SDIP32/ SO28 SDIP32/ SO28 SDIP42/ TQFP44 SDIP42/ TQFP44 SDIP56/ TQFP64 SDIP56/ TQFP64 TQFP64 SDIP42/ TQFP44 SDIP42/ TQFP44 SDIP56/ Voltage TQFP64 Detector SDIP56/ TQFP64 TQFP64 SDIP32/ SO34 SDIP32/ SO34 SDIP42/ TQFP44 SDIP56/ TQFP64 SDIP32/ SO28 SDIP32/ SO28 Voltage Detector ST72101G1 BASIC ADC+EEPROM ADC+PWM ST72101G2 ST72121J2 ST72121J4 ST72213G1 ST72212G2 ST72311J2 ST72311J4 ST72311N2 ST72311N4 ST72311N6* ST72331J2 ST72331J4 ST72331N2 ST72331N4 ST72331N6* ST72272K2 ST72272K4 ST72372J4 ST72371N4 ST72251G1 ST72251G2 with outputs 17/171 INTRODUCTION Device ST72512N2* ST72511R4* ST72511R6 ST72532N2 8-bit OTP/ Serial Serial I/Os Watch- 16-bit EEPROM Additional EPROM/ Comm. Comm. (High Package Timers Features Inputs (Sync) (Async) Current) 1024 1024 1024 SDIP56/ TQFP64 TQFP64 TQFP64 SDIP56/ TQFP64 TQFP64 TQFP64 SDIP56/ TQFP64 peripheral SDIP56/ with TQFP64 outputs peripheral ST72531R4* ST72531R6 ST72671N4* ST72671N6* available. Contact sales office data availability. Abbreviations: PWM= WDG= Analog Digital Converter Digital Analog Converter Pulse Width Modulation Serial Peripheral Interface Watchdog Controller Area Network Multimaster Serial Communications Interface Universal Serial Packages: DIP= QFP= Dual Line Small Outline Quad Flat Pack Shrink Thin 18/171 INTRODUCTION DEVELOPMENT SUPPORT Full Hardware Software Development Support full range development tools available, including In-Circuit Emulators, OTP/EPROM programming boards Gang programmers each device. Software development tools include Assembly Language Language programming suites, well proprietary Windows Debugger third party Debugger. Software Development Tools full range development software tools available family Microcontrollers. This currently comprises four principal product groups: Assembly Language suite: "SOFTWARE TOOLS Family" proprietary Debugger: "WGDB7 Windows Debugger Family" third party C-Language suite: "HIWARE TOOLCHAIN Family" third party Debugger: "HIWARE SOURCE DEBUGGER Family" available products listed below, together with relevant upgrade versions. Sales Type Product Name Description Macro -Assembler, Linker, Library ArSoftware Tools Family chiver Executable File Formatter Family MCUs WGDB7 Windows Debugger Windows based Debugger Family Family MCUs HIWARE Toolchain Family Windows based Language Toolchain program development ST7-SWCHIW/PC Upgrade: ST7-SWCHIW/PC-UP ST7-SWDHIW/PC Upgrade: ST7-SWDHIW/PC-UP HIWARE Source Debugger Windows based Debugger suite Family These software suites supplied standard issue with Emulator. 19/171 INTRODUCTION Table Family Development Tools Overview ST72101G1 ST72101G2 ST72121J2 ST72121J4 ST72213G1 ST72212G2 ST72311J2 ST72311J4 ST72311N2 ST72311N4 ST72311N6 ST72331J2 ST72331J4 ST72331N2 ST72331N4 ST72331N6 ST72272K2 ST72272K4 ST72372J4 ST72371N4 ST72251G1 ST72251G2 ST72512N2 ST72512N2 ST72511R6 ST72532N2 ST72531R4 ST72531R6 ST72671N4 ST72671N6 Dev. BASIC ST7MDT1-DVP ST7MDT2-DVP ST7MDT1-EMU2 ST7MDT2-EMU2 ST7MDT1-DVP ST7MDT1-EMU2 SDIP32, SO28 SDIP32, SO28 SDIP42, TQFP44 SDIP56, TQFP64 EMULATOR Emulator Probes ST7MDT2-DVP ST7MDT2-EMU2 SDIP42, TQFP44 SDIP56, TQFP64 SDIP56, TQFP64 ST7MDT3-EMU2 EEPROM ST7MDT2-DVP ST7MDT2-EMU2 SDIP42, TQFP44 SDIP56, TQFP64 SDIP56, TQFP64 ST7MDT3-EMU2 ST7MDT4-EMU2 SDIP32, SDIP42, SO34, SDIP56, TQFP64 ST7MDT1-DVP ST7MDT1-EMU2 SDIP32, SO28 ST7MDT3-EMU2 TQFP64, SDIP56 ST7MDT4-EMU2 SDIP32, SO34, SDIP42, SDIP56, TQFP64 Contact Sales Office, 20/171 INTRODUCTION Family Programming Tools Overview ST72101G1 ST72101G2 ST72121J2 ST72121J4 ST72213G1 ST72212G2 ST72311J2 ST72311J4 ST72311N2 ST72311N4 ST72311N6 ST72331J2 ST72331J4 ST72331N2 ST72331N4 ST72331N6 ST72272K2 ST72272K4 ST72372J4 ST72371N4 ST72251G1 ST72251G2 ST72512N2 ST72512N2 ST72511R6 ST72532N2 ST72531R4 ST72531R6 ST72671N4 ST72671N6 EPROM ST72T101G1 ST72T101G2 ST72T121J2S ST72T121J4S STARTER BASIC ST72E251G2D0 ST72E311J4D0S ST7MDT1-KIT ST7MDT2-KIT ST7MDT1-DVP ST7MDT2-DVP ST7MDT1-EPB ST7MDT2-EPB ST72E251G2D0 ST72E311J4D0S ST72E311N4D0 ST72E531R6D0 ST72E331J4D0S ST72E331N4D0 ST72E531R6G0 ST72E272K4D0 ST72E671J4D0 ST72E671N4D0 ST72E251G2D0 ST72E531R6G0 ST72E671N6D0 ST72T213G1 ST7MDT1-KIT ST72T212G2 ST72T311J2S ST72T311J4S ST7MDT2-KIT ST72T311N2S ST72T311N4S ST72T311N6 EEPROM ST72T331J2S ST72T331J4S ST7MDT2-KIT ST72T331N2S ST72T331N4S ST72T331N6 ST72T272K2 ST72T272K4 ST7MDT4-KIT ST72T371J4 ST72T371N4 ST72T251G1 ST7MDT1-KIT ST72T251G2 ST72T511R4 ST72T511R6 ST72T531R4 ST72T531R6 ST72T671N4 ST7MDT4-KIT ST72T671N6 ST7MDT1-DVP ST7MDT1-EPB ST7MDT2-DVP ST7MDT2-EPB ST7MDT3-EPB ST7MDT2-DVP ST7MDT2-EPB ST7MDT3-EPB ST7MDT4-EPB ST7MDT1-DVP ST7MDT1-EPB ST7MDT3-EPB ST7MDT4-EPB Contact Sales Office, ST7MDT2-EPB Used optional character. sales types without final refer devices without safe reset (LVD) option. Gang Programmers, Please Contact Third Parties. 21/171 INTRODUCTION 22/171 Part User Guide 23/171 24/171 Part Contents INTRODUCTION INSTALLING ST-REALIZER Hardware Requirements Software requirements Installing ST-Realizer TUTORIAL Setting Your Project 3.1.1 Creating Project File 3.1.2 Creating Scheme 3.1.3 Choosing Target Microcontroller Designing Application 3.3.1 State Machine 3.3.2 Internal Input Output Condition 3.3.3 External Input Conditions 3.3.4 External Output Actions 3.3.5 Connecting Hardware Ports 3.3.6 Well Done! Analysing Generating Program Code 3.4.1 Setting Compile Options 3.4.2 Executing Analysis Compile 3.4.3 Viewing analyze Compile Report 3.4.4 You've Done Simulating Fine Tuning Your Application 3.5.1 Creating Simulation Environment File 3.5.2 Connecting Adjusters 3.5.3 Connecting Probes 3.5.4 Running Simulation it's Down You! Drawing Software Schemes CREATING OPENING PROJECTS Creating project 4.1.1 Opening existing project CREATING, OPENING, SAVING EXPORTING SCHEMES Creating Scheme Opening Scheme Saving Schemes Exporting Schemes CHOOSING ST62 TARGET Choosing Target Device DRAWING SCHEMES Inserting Symbols Selecting Symbols Wires Wiring Symbols 7.3.1 Using Automatic Wiring Copying Part Scheme 25/171 Part Contents Using Tables 7.5.1 Changing Format Table Data 7.5.2 Editing Table Data 7.5.3 Importing Files Into Tables Connecting Hardware Ports Changing Symbol Attribute Data Attaching Labels Symbols Wires Defining Additional Symbol Wire Characteristics 7.10 Deleting Symbols Wires 7.11 Viewing Symbol Information 7.12 Flipping Rotating Symbols 7.13 Redrawing Scheme PRINTING VIEWING FILES SCHEMES Changing View Your Scheme 8.1.1 Zooming 8.1.2 Viewing Hidden Attributes Printing Schemes, Files Reports 8.2.1 Printing ST-Realizer Files 8.2.2 Setting Printer 8.2.3 Choosing Printer Font Viewing Editing Project Files CUSTOMISING ST-REALIZER Automatically Saving Your Work Changing Screen Preferences Changing Your Page Layout Customizing Toolbars 9.4.1 Adding Deleting Toolbar Buttons 9.4.2 Placing Separators Between Toolbar Buttons 9.4.3 Changing Order Toolbar Buttons 9.4.4 Restoring Default Toolbar 9.4.5 Available Toolbar Buttons CREATING COMPOSITE SYMBOLS 10.1 Inserting Subscheme 10.2 Going Into Subscheme 10.3 Placing Input Output Ports 10.4 Drawing Composite Symbol 10.5 Going Back Root Scheme 10.6 Reusing Subschemes ANALYSING YOUR SCHEMES GENERATING PROGRAM CODE 11.1 Changing Compile Options 11.2 Analyze: Optimisations 11.3 Changing Hardware Settings 11.4 Your Scheme Includes Your Symbol. 26/171 Part Contents 11.5 Disabling 11.6 Executing Analysis Compile 11.7 Viewing analyze Compile Report 11.8 Viewing Tracing Generated Messages SIMULATING YOUR APPLICATION 12.1 Working with Simulation Environment Files 12.1.1 Creating .SEF File 12.1.2 Opening Existing .SEF File 12.1.3 Saving .SEF File 12.2 Setting, Adjusting Viewing Input Values 12.2.1 Setting Fixed Input Variable Values 12.2.2 Setting Variable Input Values 12.2.3 Setting Sine Wave Input Signals 12.2.4 Setting Square Wave Input Signals 12.3 Monitoring Signals 12.3.1 Viewing Variable Values Numerically 12.3.2 Viewing Variable Values Graphically 12.3.3 Viewing State Machine States 12.4 Listing Adjusters Probes 12.5 Running Simulation 12.5.1 Setting Options 12.5.2 Running Simulation 12.6 Recording Reusing Adjuster Probe Values 12.6.1 Recording Adjuster Probe Values 12.6.2 Reusing Adjuster Values CREATING YOUR SYMBOL 13.1 Running Symbol Editor 13.2 Creating Symbol 13.3 Opening Existing Symbol 13.4 Adding Symbol Shape 13.5 Adding Pins Your Symbol 13.6 Resizing Your Symbol 13.7 Assigning Attributes Your Symbol 13.8 Adding Your Symbol Library 13.9 Linking Your Symbol Macros 13.9.1 Linking Macros Symbol 27/171 Introduction INTRODUCTION ST-Realizer Windows CASE tool that enables develop high-quality applications ST62 families microcontrollers. Using ST-Realizer, design your application drawing symbols wiring them together. Each symbol represents process, such adding values, linked ST62 assembly code macro. wires represent flow data, linked variables constants. attach attributes symbols wires, order attach extra characteristics them. example, attaching attribute type UINT wire defines value capacity that unsigned integer 65536). When using ST-Realizer, design your application schemes. scheme like scheme which place symbols draw wires. Each application designed scheme. Schemes include subschemes, which contain further symbols wires displayed main scheme symbol, thus saving space main scheme making easy reuse processes. relationship between scheme subscheme same that directory subdirectory. Once have designed your application using ST-Realizer, analyze compile using ST-Analyzer. ST-Analyzer performs following tasks: analyzes your scheme creating netlist, creating cross references, analysing generating final code. Providing fatal errors encountered, ST-Realizer generates non-compiled ST62 macro-assembler language (.asm) file from scheme. Generates compiled binary ST62 executable file. When analyze process been successfully completed, report file generated. This report file gives information about designation pins, list variables used type memory space required application. Once have compiled your application, ST-Simulator simulate behaviour, generate view input signals, monitor signals that generated your application, fine-tune necessary. design simulation environments same that design schemes, except design held what called simulation environment files. provide with greater flexibility, create edit your symbols using ST-Symbol Editor. create symbol drawing shape, placing pins that represent variables that input output from process defining, then linking macro represents. 28/171 Introduction files definitions that pertain application stored project files. following diagram shows ST-Realizer application development process. Application Idea Project FIle ST-Realizer Draw schemes ST-Analyzer Compile code generate report ST-Simulator Test debug code Load code into microcontroller 29/171 Installing ST-Realizer INSTALLING ST-REALIZER This section lists hardware software requirements ST-Realizer describes install Hardware Requirements must install ST-Realizer computer with following characteristics: Minimum requirements Processor: Intel 80386 RAM: Disk memory: Monitor: Grey scale Mouse Preferred requirements Processor: Intel Pentium-100 RAM: Disk memory: Monitor: Super-VGA, Mouse Software requirements ST-Realizer runs under MS-Windows MS-Windows Installing ST-Realizer disk into your floppy disk drive B:). Under Windows, browse contents your floppy disk drive locate file setup.exe. Double-click setup.exe start installation process. setup program asks which directory want install ST-Realizer. default C:\Realizer. Either accept default enter installation directory. installation process creates following directories directories: \Realizer, which contains system executables DLLs, \Realizer\beverage, which contains example scheme beverage.sch \Realizer\charge, which contains example scheme charge.sch \Realizer\lib, which contains main symbol library \Realizer\targethw, which contains definition files various ST6xxx devices. 30/171 Tutorial TUTORIAL following tutorial designed help fully understand both principles behind creating applications using ST-Realizer create applications using ST-Realizer. this tutorial you're going create your microcontroller application. application manages battery charger. application starts charging battery when start button activated, charges battery high charge depending current state charge battery timer. application stand-alone mode using ST6265 microcontroller. also driven ST622X, ST624X, ST626X Starter Kits. NOTE: step-by-step instructions this tutorial describe operate ST-Realizer using default toolbar setup. while doing this tutorial, cannot find button that shown instruction, refer "Available Toolbar Buttons" page find which menu commands correspond that button. Setting Your Project this part tutorial will: Create project file battery charger application. Create scheme which you'll draw application. Define microcontroller which application will loaded. 3.1.1 Creating Project File Each application design stored project. Each project directory. ST-Realizer stores files that comprise application project directory. When create project specify holding directory. ST-Realizer then creates project.ini file, that contains project-specific path settings, project's scheme names compiler settings. Once you've defined your project, you'll able open scheme start designing your application. File menu, click project. project dialog opens: 31/171 Tutorial You'll enter path that you'll create your project Enter C:\Realizer\Tutorial, then click 3.1.2 Creating Scheme have created your project, must create open scheme. scheme sheet which design your applications: File menu, click New. new, blank scheme opens. 3.1.3 Choosing Target Microcontroller next step choose microcontroller which application will loaded. This application going loaded ST6265: Options menu, click Select hardware. Select target hardware dialog opens: Double-click st6265.dll device icon. Then click 32/171 Tutorial Designing Application charger application, microcontroller will require following inputs outputs: analog inputs: Imax, which maximum current. Icharge, which charging current. Vcharge, which voltage output battery cell connection. digital input that connected start button. digital outputs switch between charge HIGH charge currents. digital outputs three LEDs indicate charger status. overall management charger carried state machine. This tests predefined conditions, performs action when pre-defined condition met. charger application will have following state/action definitions: State HIGH READY Action Starts charging battery high charge switches high charge LED. Starts charging battery charge switches charge LED. Switches flashing indicating that charge finished. Drawing Software Schemes this part tutorial, going learn: place symbols. edit symbols. design applications using ST-Realizer. What principal symbols when them. connect pins. application made four principal schemes: State Machine, which heart charger application. analyzes signals that input microcontroller, defines which signals going output external input conditions, that conditions that transmitted application from external sources, such battery voltage. external output actions, that actions that output from application, such switching LED. 33/171 Tutorial internal input output condition, that charge time. following paragraphs show design these schemes. 3.3.1 State Machine Each time condition changes, result signal received from microcontroller input pin, state machine selects appropriate state. state defines signals that sent microcontroller output pins. When define state machine, first symbol you'll place initial state. charger application, initial state Ready. place initial state, Ready: Click main library dialog opens. initial state symbol named stateinit. Scroll down list until reach stateinit, then double-click select "place" button. square appears next cursor, indicating size position stateinit symbol. Move cursor where want place symbol, then click. recommended that place symbol towards left your scheme. Edit value dialog opens. Type Ready field, then click You've just placed your first symbol, initial state: READY. should look like this: doesn't, select symbol clicking next then delete pressing Delete button your keyboard, redo steps above. 34/171 Tutorial find that symbol small, want zoom click then select area around your symbol. make mistake, longer your symbol, click whole scheme, then reuse zoom your symbol. Next going place first condition, which Start, which activated when start button pressed. Conditions signalled sending value place condition Start: main library dialog scroll down list until reach condition, then double-click Move cursor where want place symbol, then click. Place symbol right stateinit symbol, shown diagram below. Edit value dialog opens. Type Start field, then click Your scheme should look like this: doesn't, select incorrect symbol clicking next then delete pressing Delete button your keyboard, redo steps above. going wire initial state start condition together. This forms logical link between symbols. symbols have pins which connect wires. wire stateinit condition symbols together: Select wiring mode clicking that wiring mode. cursor changes crosshair indicating 35/171 Tutorial Place cursor next right arrow right stateinit symbol. This output pin. crosshair snaps onto when comes into snapping distance. indicates point which crosshair snapped, showin following diagram: Click when crosshair snapped pin. ST-Realizer draws wire that follows cursor. Move cursor line left condition symbol. This input pin. Click when crosshair snapped onto condition symbol's pin. places where clicked connected wire. Click right mouse button press finish wiring. Your scheme should look like this: doesn't, select wire Choosing select mode clicking Clicking wire. Then delete wire pressing Delete button your keyboard, redo steps above. 36/171 Tutorial going design rest state machine. final state machine will look like this: following paragraphs explain each symbol there they drawn. When start button pressed, start condition met. When start condition status High set, meaning that battery high charge high level status switched switches. moment, only concerned with setting status High when start condition met. this, must place state symbol, High, shown above diagram: Place symbol: state from main menu, enter High value. Note that this symbol rotated anti-clockwise from initial position. this, select symbol clicking next then click three times. need move symbol, select then drag-and-drop where want place Wire High state Start condition. battery charger must change state that charges battery charge switches level status LED) when either following conditions met: charge current becomes high. When battery voltage exceeds volts. design this will need condition symbols (CurrentTooHigh Voltage >1.50V) that tested parallel, state symbol (Low) that reached when either these conditions shown State Machine diagram: 37/171 Tutorial When symbol already exists scheme, copy rather than selecting from library. Since going place condition symbol, copy from Start condition symbol: Click just next Start condition symbol select Click Click where want place copy (below Start condition, below High state symbol, shown State Machine diagram). Edit value box, type CurrentTooHigh, name condition, then click Note that state machine diagram, CurrentTooHigh condition symbol horizontally flipped. this, select CurrentTooHigh condition symbol click original position. then drag back second condition symbol, select select CurrentTooHigh condition symbol, click copy place symbol just below CurrentTooHigh symbol, then enter value Voltage>1.5V. flip state symbol, select select copy High state symbol using Place below Ready stateinit symbol left Voltage>1.5V condition symbol, enter value Low, shown State Machine diagram. Click three times rotate required position. next step wire High state symbol, condition symbols symbol. Look state machine diagram these wired together. your scheme, make sure wiring mode selected clicking wire symbols. NOTE: Auto wiring Auto reroute selected default. These options create corners reroute wires across shortest path automatically. these options cause wires connect themselves another that which want, deacti- 38/171 Tutorial vate them: Options menu, click Auto wiring. Click Auto wiring Auto reroute check boxes. When these empty, Auto wiring Auto reroute deselected. final stage state machine activates Ready state when either following conditions met: charge current becomes high. When charging time expired. this, going connect wire state symbol output pin, that connected parallel condition symbols: CurrentTooHigh ChargingTimeExpired. Look state machine diagram this done. Since CurrentTooHigh already exists copy both symbol name: Select CurrentTooHigh condition symbol. Click Click where want place copy. rotate direction want. Create ChargingTimeExpired condition symbol copying existing condition symbol, then wire state symbol output pin, CurrentTooHigh ChargingTimeExpired condition symbols Ready stateinit symbol input pin. You've just drawn state machine. going draw other three schemes that make charger application: external input conditions, that conditions that transmitted application from external sources, such battery voltage. external output actions, that actions that output from application, such switching LED. internal input output condition, that charge time. Since should used placing, editing wiring symbols, descriptions these schemes going explain what symbols will place, with what values symbols there. They will include details place, edit wire symbols that there. 39/171 Tutorial 3.3.2 Internal Input Output Condition internal input output condition charge time. When application enters state, charge time minutes allowed. When this charge time exceeded, condition ChargingTimeExpired triggered application into Ready state. scheme charge time condition follows: Draw above diagram your charger scheme, with help following tables that describe symbols you'll place, what they values entered with them. Symbol Name Symbol: stateout Values Name=Low Description This state output symbol. extracts state from state machine. When state reached, process following this symbol executed. connection between state machine state stateout symbol made using name both cases. Symbol Name Symbol: timf Values Comment=Low current charging timer Name=Charge time Time=0:00:30:00 Description This fixed timer, that generates pulse each rising edge input. TIME value format: dd:hh:mm:ss:xxx, where milliseconds. timer placed here thus fixed period minutes. 40/171 Tutorial Symbol Name Symbol: Values None Description This multi type bitwise inverter. This inverts output timer order able ChargingTImeExpired condition (conditions indicated setting value Symbol Name Symbol: statein Values Name=ChargingTimeExpired Description This state input symbol, that connects condition symbol state machine. When charging time expired, condition ChargingTimeExpired state machine, which activates Ready state. connection between ChargingTimeExpired condition state machine statein symbol made using name ChargingTimeExpired both cases. 3.3.3 External Input Conditions external input conditions are: start button been activated. measured battery voltage. measured charge current. maximum charge current. 41/171 Tutorial These indicated input pins microcontroller. Each time input signal changes processed, appropriate condition signalled state machine changing condition value processing designed follows: Draw above diagram your charger scheme, with help following tables that describe symbols you'll place, what they values entered with them. Symbol Name Symbol: digin Values Comment=Start charge sequence Name=Start Description This digital input symbol. NAME value (Start) connects hardware port (see "Connecting Hardware Ports" page 47). detects activation Start button. comment value used report file (see "Analysing Generating Program Code" page 49). 42/171 Tutorial Symbol Name Symbol: edge Values None Description This rising edge detector. rising edge input pulse loop generated output, indicating that signal received from digital input symbol. Symbol Name Symbol: Values There three instances this symbol: Comment=As shown diagram Name=Voltage, Current MaxCurrent Type=UBYTE Description This analog digital converter input symbol. NAME value connects hardware port (see "Connecting Hardware Ports" page 47). TYPE value used define variable type (UBYTE, SBYTE, UINT, SINT LONG). three instances have Type UBYTE, which unsigned byte. comment value used report file (see "Analysing Generating Program Code" page 49). Symbol Name Symbol: sub2 Values None Description This input subtractor, with type inheritance. IN2. subtracts Current from Voltage. details type inheritance, "Type Inheritance" page 126). Symbol Name Symbol: constw Values Value=76 Description This word constant value symbol, that inputs value 43/171 Tutorial Symbol Name Symbol: comp Values None Description This multi purpose comparator. returns three values that depend three inputs. when greater than B=A=C when equal when smaller than There instances this symbol: first indicates Voltage>1.5V condition, when this condition met, outputting This condition when: battery voltage charging current less than Symbol Name Symbol: statein Values Three instances: Name=Start Name=Voltage>1.5V Name=CurrentTooHigh Description These state input symbols, that connect condition symbols state machine that have same name. Start statein symbol, when pulse received from rising edge detector, signals Start condition outputting value state machine. Voltage>1.5V CurrentTooHigh statein symbols signal these conditions state machine outputting value 3.3.4 External Output Actions external output actions generate output signals relating current state state machine. output signals are: Switch High Charge battery high charge. Switch Charge battery charge. Switch flashing Ready LED. 44/171 Tutorial These output microcontroller output pins. processing designed follows: Draw above diagram your charger scheme, with help following tables that describe symbols you'll place, what they values entered with them. Symbol Name Symbol: stateout Values Three instances: Name=High Name=Low Name=Ready Description These state output symbols. When state machine activates these three states, processing that follows symbols performed. These symbols connected appropriate state symbols their names. 45/171 Tutorial Symbol Name Symbol: Values None. Description This multi type bitwise inverter. Both instances invert output state machine These values output output pins named High Low. Symbol Name Symbol: oscf Values Comment=Flash Ready Name=Oscillator Time=0.5 Description This fixed time oscillator, that generates Ready flash signal. TIME value defines number clock ticks delay, which this case frequency calculated follows: f(Hz) 1/(2*time). Symbol Name Symbol: and2 Values None Description This two-input bitwise function, with type inheritance (see "Type Inheritance" page 126). This performs logical values output oscillator frequency Ready stateout, outputs signal that sent Ready LED. 46/171 Tutorial Symbol Name Symbol: digout Values Five instances: Comment=Switch High charge Name=LEDHigh Comment=High charge Name=High Comment= Switch charge Name=LEDLow Comment=Low charge Name=Low Comment=Switch Ready Name=LEDReady Description These digital output symbols. name value used connecting this symbol microcontroller output ports (see "Connecting Hardware Ports" page 47). Comment value used report file. 3.3.5 Connecting Hardware Ports last thing have when create application connect application inputs outputs ST62 microcontroller input output hardware ports, pins. connect application ST62 microcontroller double-click application, then choose want connect from list. You're going connect Start input: Double-click Start digin symbol. 47/171 Tutorial Hardware connections dialog opens listing available pins type connection want make: going connect Start PA.0, Input, with pullup. Available list, double-click entry PA0, Input, with pullup. Click Close. connect rest input output symbols same way, according following table: Connect this symbol: Voltage Current MaxCurrent LEDHigh High LEDLow LEDReady this pin: PA.1, analog input PA.2, analog input PA.3, analog input PB.0, Push-pull output PB.1, Push-pull output PB.2, Push-pull output PB.3, Push-pull output PB.4, Push-pull output 48/171 Tutorial 3.3.6 Well Done! have completed battery charger scheme. have learned: place symbols. edit symbols. design ST-Realizer applications. What principal symbols when them. connect pins. some reason, manage draw entire battery charger application, find finished version directory: C:\Realizer\Charge. next part this tutorial going show analyze generate code charger application. Analysing Generating Program Code this part tutorial going learn analyze schemes draw generate program code them. finished version battery charger application found directory C:\Realizer\Charge didn't draw entire application last part tutorial. When execute analysis compile, ST-Realizer analyzes your scheme creating netlist, creating cross references, analysing generating final code. During these phases connectivity between symbols, assignment variable types checked before generating source code. Providing fatal errors encountered, ST-Realizer generates non-compiled ST62 macro-assembler language (.asm) file from scheme, which then compiles. When analyze process been successfully completed, report file generated. This report file gives information about designation pins, list variables used type memory space required application. 49/171 Tutorial 3.4.1 Setting Compile Options Before analyze compile schemes using ST-Realizer, following compilation options: want generate source code. want invoke assembler. want generate final code. want include project data (this useful version control). frequency base clock timer symbols. default this 0.01 seconds milliseconds). compile options: analyze menu, click Options. analyze options dialog opens: default setting generate, run, executable code that embedded device. could, however, select deselect options clicking appropriate check boxes. When check checked, option selected. could also change frequency base clock timer symbols, overtype Timer tick field with value. Since using defaults, click without changing anything. 50/171 Tutorial 3.4.2 Executing Analysis Compile Make sure that your charger scheme open visible ST-Realizer window. analyze menu, click Once analyze compile have been completed analyze Status displayed: 3.4.3 Viewing analyze Compile Report Once have analyzed your scheme compiled your program code, view report generated ST-Realizer during analysis compilation process. This report provides with useful information such input output connections made, gives overview much memory used application. report: analyze menu, click Report. 3.4.4 You've Done You've just created your first application, which ready loaded into ST6265 microcontroller! Easy, isn't next, final part this tutorial going describe simulate fine-tune your application. 51/171 Tutorial Simulating Fine Tuning Your Application this part tutorial, going learn simulate your application fine tune using ST-Realizer. Once have designed analyzed your application, ST-Simulator simulate behaviour, generate view input signals, monitor signals that generated your application, fine-tune necessary. this part tutorial, you're going Create simulation environment file, which defines environment which you'll simulate your application. adjusters your simulation environment file, which enable generate view signals that input your application. probes your simulation environment file, which enable view signals that generated your application. simulation. Since heart charger application state machine, going check that each input condition required effect state machine, that state machine takes appropriate actions. 3.5.1 Creating Simulation Environment File first step simulating your application create simulation file. Simulation files based schemes, created ST-Simulator. create charger simulation environment file: Make sure that charger application open visible ST-Realizer main window. Simulator menu, click ST-Simulator window opens. File menu, click New. Select scheme dialog opens, letting select scheme which want 52/171 Tutorial create simulation environment. File name: list, double-click charger.sch then click simulation environment dialog displays where type name .sef environment file. Type name .sef file. You've created simulation environment file charger application. 3.5.2 Connecting Adjusters going connect adjusters your scheme, that adjust view values input application. This enables experiment with fine-tune your application. ST-Realizer lets four types adjusters: Numeric Adjusters, which display adjust variable values numerically, binary, decimal, hexadecimal octal format. Sine Wave Adjusters, which generate analogic sine wave signals. adjust wave depth frequency. Square Wave Adjusters, which generate analogic square wave signals. adjust wave depth duty cycle. duty cycle percentage period time that signal value. Time Table Adjusters, which adjust value variable specified time intervals. first adjuster going connect binary numeric adjuster, that will simulate effect activating start button (that sending value rising edge detector): 53/171 Tutorial ST-Simulator, zoom Start digin symbol rising edge detector symbol using Select wire between Start digin symbol rising edge detector symbol clicking Click Click where want Numeric Adjuster appear (for example, just above Start digin symbol. result should look something like this: Note that binary numeric adjuster placed automatically, since wire defined being binary wire attached digin signal (which binary). going adjuster that will simulate battery voltage that read input application. value voltage going this, will need place analogic numeric adjuster between Voltage analog digital converter symbol sub2 symbol: Click view whole page, then zoom Voltage analog digital converter subtract sub2 symbol (these just below Start digin symbol) using 54/171 Tutorial Click wire between these symbols select Click Click where want Numeric Adjuster appear. enter voltage value (9), double-click current value numeric adjuster enter Change value dialog box. result should look something like this: placing last numeric adjusters: just after Current analog digital converter, with value just after MaxCurrent analog digital converter, with value 100. 55/171 Tutorial result should look like this: 3.5.3 Connecting Probes going connect probes your scheme that view values that generated application. ST-Realizer includes four types probe: Numeric Probes, which view value wire (that variable) Binary, Decimal, Hexadecimal Octal number bases. Oscilloscope Probes, which view value wire graph. State Machine Probes, which view states state machine. Timer probes, which display timer counter values. first probe going connect timer probe, which will display value Charge time timer symbol: 56/171 Tutorial ST-Simulator, zoom area surrounding charge time timer symbol. Select symbol clicking next Click Click where want Timer Probe appear (for example, just above Charge time timer symbol. result should look something like this: place rest probes described below. display current state state machine: Probe type: State machine probe Connected stateinit symbol state machine. How: Select stateinit symbol then click NOTE: only place state machine probes stateinit symbols. display signal generated Ready oscillator. Probe type: Oscillator probe Connected fixed time oscillator. Select symbol then click How: want define variable display range display time meaning that Y-axis graph displayed oscillator probe will start 100, X-axis will start 57/171 Tutorial Double click Oscillator probe once placed. field Y-axis box, enter 100. after field Time box, enter 0:00:00:0500. Click view values output output pins: Probe type: Numeric probe Connected Each wires leading directly digital output symbol. How: Select each wire then click resulting simulation file should look something like this: some reason, manage draw entire battery charger simulation environment file, find finished version directory: C:\Realizer\Charge. have placed your adjusters probes, simulate your application, adjust values input view values generated 58/171 Tutorial 3.5.4 Running Simulation ready simulation, reacts when change values input Click simulation. see, oscillator starts generating signal, apart from that nothing happens since application Ready mode waiting start button activated. simulate activation start button, click numeric adjuster placed after start digin symbol. This changes value would happen start button pressed. adjusting input values clicking buttons analogic numeric adjusters. buttons decrease increase values respectively, buttons decrease increase values respectively. When want stop running simulation, click Note that before rerunning simulation, initialise menu, click Initialise. it's Down You! Well done, you've completed tutorial. tutorial learned three major steps involved creating your application using ST-Realizer: draw application. analyze your scheme compile your application code. simulate your application. Furthermore, learned what most ST-Realizer symbols where place them. ready start developing your bug-free applications ST62 families microcontrollers using ST-Realizer. want look more example applications, refer part "Example Applications". 59/171 Creating Opening Projects CREATING OPENING PROJECTS Each application design stored project. Each project directory. ST-Realizer stores schemes possible subschemes that comprise application project directory. When create project specify holding directory. ST-Realizer then creates project.ini file, that contains project-specific path settings, project's scheme names compiler settings, directory does already exist. project.ini file ASCII text format. view edit contents choosing Edit from File menu, then selecting file. Once you've defined project open scheme start designing your application. Creating project File menu, click project. project dialog opens: Type path where want store schemes application, then click 60/171 Creating Opening Projects 4.1.1 Opening existing project File menu, click Open project. Open project dialog opens: Double-click name directory that contains project Directories box. Double-click project.ini file want open then click 61/171 Creating, Opening, Saving Exporting Schemes CREATING, OPENING, SAVING EXPORTING SCHEMES Once have created opened project which want work, must create open scheme. scheme sheet which design your applications. When have finished working scheme, must save your work. export schemes Windows metafile (.WMF) format, that import them into drawing word processing packages. This section describes create scheme, open existing scheme, save your work. Creating Scheme Click scheme dialog opens. Type name scheme want create File name: field, then click new, blank scheme opens. Opening Scheme 1Click Open scheme dialog opens. Double-click name directory that contains scheme Directories box. Double-click .sch file want open File name: list then click 62/171 Creating, Opening, Saving Exporting Schemes Saving Schemes save scheme that currently active, click save schemes that open, File menu click Save all. save scheme under name: File menu, click Save Save scheme dialog box, double-click name directory which want save scheme. Type name scheme File name: field, then click NOTE: also ST-Realizer save your work automatically specified interval. "Automatically Saving Your Work" page further details. Exporting Schemes export schemes Windows metafile (.WMF) format: File menu, click Export. Export file dialog opens. Directories: box, double-click directory which want place exported scheme file. File name: field, type name file want create. Click Windows metafile created containing snap-shot your scheme. 63/171 Choosing ST62 Target CHOOSING ST62 TARGET Once have created project scheme, next step define ST62 device type that application will loaded into. This attaches hardware configuration ST62 device (such pinout memory capacity) open scheme. This hardware data used check that application suitable recipient ST62 device. list ST62 family devices peripherals which ST-Realizer generate applications found Introduction section, beginning book (ST62 Product Range, Product Range). Note users: ST-Realizer does support paging, except static pages. Because this, size limited Kbytes size bytes. EEPROM pages supported. Max. Max. values determine maximum size ST-Realizer application. pins determine number input output symbols that used ST-Realizer application. EEPROM values determine much EEPROM used symbols from MAINPER.LIB symbol library. This symbol library contains symbols that EEPROM space store their values. 64/171 Choosing ST62 Target Choosing Target Device Options menu, click Select hardware. Select target hardware dialog opens: Double-click appropriate device icon. Then click 65/171 Drawing Schemes DRAWING SCHEMES following paragraphs explain perform principal tasks involved drawing schemes. These are: Inserting symbols. Selecting symbols wires. Wiring symbols. Copying symbols. Importing editing table data. Connecting input output symbols hardware ports. Changing symbol attribute data. Attaching labels symbols wires. Defining additional symbol wire characteristics. Deleting symbols wires. Viewing symbol information. Flipping rotating symbols. Redrawing scheme. Inserting Symbols insert symbols into your scheme ways: insert instance symbol that already exists your scheme, make copy symbol. insert symbol that does already exist your scheme, must select from library. make copy symbol that already exists your scheme: Either: Object menu, click Local symbol. Select symbol want copy. Click Click where want place copy. 66/171 Drawing Schemes Open symbol dialog box, double-click symbol want place. copy placed where clicked. Where necessary, prompted enter data relating symbol. insert symbol that does already exist your scheme: library containing symbol want place already open: open last library opened main library have already opened library, click open another library, Object menu, click Library symbol. Select library symbol dialog opens. File name list, double-click name library storing symbol want place. view online list standard ST-Realizer symbols running Symbol overview from ST-Realizer program group. Choose symbol want insert from drop-down list library dialog box. view details about symbol, click symbol then click Info. Click Click where want place symbol. selected symbol placed where clicked. Selecting Symbols Wires with drawing package, before modify item group items must first select them. select items Select item clicking Select multiple items dragging cursor across them. Select multiple items pressing SHIFT clicking them. select dragging: cursor selection mode (the cursor arrow when selection mode), click activate selection mode. Click corner area want select. Keeping mouse button depressed, move cursor diagonally across area want select until whole area surrounded selection rectangle. 67/171 Drawing Schemes Release mouse button. Each selected item surrounded box. modify selected items. select SHIFT-clicking: Press SHIFT button, keeping SHIFT button depressed, click items want select. Each item select surrounded box, indicating that selected. Wiring Symbols Each symbol least input output which connect wires. Wiring symbols together creates data flow between them. default, input pin(s) left symbol output pin(s) right. wire symbols together: Select wiring mode clicking wiring mode. cursor changes crosshair indicating that Place cursor where want wire start. crosshair snaps onto when comes into snapping distance. indicates point which crosshair snapped. Click when crosshair snapped where want wire start. ST-Realizer draws wire that follows cursor. want define your wire corners, click twice where want each corner Move cursor point where want wire end. Click when crosshair snapped onto appropriate point. places where clicked connected wire. Click right mouse button press finish wiring. 68/171 Drawing Schemes 7.3.1 Using Automatic Wiring Automatic wiring simplifies task wiring symbols together Automatically choosing shortest path between symbols connected (Auto wiring), creating corners where required. Automatically rerouting wires when symbol moved (Auto rerouting). Both these options enabled default. want disable reenable either both them: Options menu, click Auto wiring. Auto wire dialog opens. Choose whether want changes make apply entire project currently open scheme clicking appropriate button. enable/disable automatic wiring click Auto wire check box. When checked, automatic wiring enabled. enable/disable automatic rerouting click Auto reroute check box. checked, automatic rerouting enabled. Click When Copying Part Scheme method described below copies labels, values other settings that included selected part scheme. Note that also copy symbols without their attached settings following instructions given "Inserting Symbols" page copy part scheme: Select item items want copy. Click ghost containing copied items attached your cursor. Click where want place copied items. 69/171 Drawing Schemes Using Tables enable assign output values specified input values, ST-Realizer includes types table, index tables lookup tables. Lookup tables convert input values output values matching their values table. example, lookup table contains line: Input Output will output value when value input. Index tables convert input values output values matching line number table appropriate output value. example, index table contains following data: will output value when value input. first line table defines default output value. This value that output input value range defined table. Tables store values Binary, Decimal, Hexadecimal Octal formats. Once have placed table, either import data from ASCII text file enter data directly into table. following diagram shows format ASCII files: ASCII File Contents: ,14h ,30h ,100h Table Values ST-Realizer stores table data ASCII text files that have extension .TAB. Index Lookup table symbols named indextable lookuptable stored main library. 70/171 Drawing Schemes 7.5.1 Changing Format Table Data Double-click just next table. Table editor dialog opens. Select format want from drop-down list bottom left corner Table editor dialog box. Click 7.5.2 Editing Table Data Double-click just next table. Table editor dialog opens. Double-click cell whose value want change. insert row, click where want insert then press Insert button your keyboard. Click 7.5.3 Importing Files Into Tables Double-click just next table. Table editor dialog opens. Click Import button. Import file dialog opens. Directories box, double-click directory holding file want import. list below File name: field, double-click file want import. Click 71/171 Drawing Schemes Connecting Hardware Ports input output symbols scheme, such digin (digital input), digout (digital output), (analog digital converter), must connected hardware ports target ST62 microcontroller. connect input output symbol ST62 microcontroller port: Double-click symbol want connect. IHardware connections dialog opens listing available pins type connection want make, shown following example: Available list, double-click want connect symbol doubleclicked. Click Close. NOTE: connections define scheme listed project.ini file. reuse connections different projects copying pasting them from project.ini files using File, Edit command. 72/171 Drawing Schemes Changing Symbol Attribute Data elements data that changed symbols depends type symbol. following table lists data elements that changed each symbol type: Object Input Output symbol Constant symbol Subscheme and/or table symbol Changeable data element connected hardware port. value. associated file name. change symbol attribute data: Select symbol attribute want change. Click dialog opens displaying associated data. Overtype data want change then click Attaching Labels Symbols Wires attach labels symbols wires indicate details about them. attach label symbol wire: Select symbol wire which want attach label. Click Edit value dialog opens: Type label click Position cursor symbol wire want attach label click when cursor snapped 73/171 Drawing Schemes Defining Additional Symbol Wire Characteristics attach additional characteristics symbols wires attaching attributes them. example, attaching attribute type UINT wire defines value capacity that unsigned integer 65536). available attribute types listed "Attribute Types" page 128. assign attribute: Object menu, click Attribute. Create attribute dialog opens: field, enter attribute tag. Value field, enter value. attribute value remark that does into Value field, click Multiline check box. want value hidden, click appropriate check Visibility box. When boxes checked, tags values visible. Hidden tags values made visible choosing Display|Invisible attributes. change attribute color, click Color field choose color. change attribute size, edit value Size field. 74/171 Drawing Schemes change vertical horizontal alignment attribute, select alignment type Ver. alignment Hor. alignment drop-down lists. Click when have finished defining attribute. attribute attached your cursor ghost box. Position attribute over symbol which want attach Note that point effect, that symbol line which attached, appears spot symbol. Click attach attribute line symbol containing point effect. 7.10 Deleting Symbols Wires 1Select item(s) want delete. Edit menu, click Clear. item deleted. NOTE: Undo undo last action that carried out. click Undo more than once, undoes action that carried before last undone action. 7.11 Viewing Symbol Information Select symbol about which want view information. Click information opens. When have finished viewing symbol information, click 7.12 Flipping Rotating Symbols flip symbols horizontal axis. also rotate symbols anti-clockwise. flip symbols: Select symbol want flip. Click symbol flipped. rotate symbols: Select symbol want rotate. Click selected symbol rotated Repeat step until symbol oriented want 75/171 Drawing Schemes 7.13 Redrawing Scheme Sometimes when editing scheme, parts deleted moved items remain displayed, even they longer there. order true state your scheme, should Redraw command: Display menu, click Redraw. 76/171 Printing Viewing Files Schemes PRINTING VIEWING FILES SCHEMES This section describes perform tasks that common three ST-Realizer file types: schemes, simulation environment files symbols. These tasks are: Changing view window contents. Printing schemes, files reports. Viewing editing project files. Changing View Your Scheme ST-Realizer lets zoom schemes, view hide invisible attributes such pins, names, numbers specified colors, customise your schemes displayed printed. 8.1.1 Zooming Zooming magnifies scheme 200%. Zooming reduces scheme 50%. also define zoom centre scheme zoom selected part scheme. following table describes perform these tasks: this: Zoom your scheme Click Zoom from your scheme Click Redefine view centre your scheme Zoom selected area scheme View whole scheme: Click this: Click then click where want centre scheme. Click then select area want zoom 77/171 Printing Viewing Files Schemes 8.1.2 Viewing Hidden Attributes When shapes pins that make symbol created, attributes them define additional characteristics. These attributes visible default when design application, since they only refer parts symbol itself. ST-Realizer enables view hidden attributes: Display menu, click Invisible attributes. When Invisible attributes command checked, invisible attributes visible. Printing Schemes, Files Reports ST-Realizer lets print ST-Realizer files. Note that specify page setup scheme that prints correctly following instructions given "Changing Your Page Layout" page also printer choose fonts that file text printed 8.2.1 Printing ST-Realizer Files File menu, point Print. ST-Realizer, choose appropriate option: this: Click Scheme. Click Schemes. Click Report. currently active scheme schemes sub-schemes currently open project analyzer report currently active project (see "Analysing Generating Program Code" page selected .sch, .sef .ini file Print this: Click File, then select file want print. Click start printing process. 8.2.2 Setting Printer File menu, click Printer setup. standard Windows Print Setup dialog opens. Refer your Windows documentation further information. Click when have finished setting your printer. 78/171 Printing Viewing Files Schemes 8.2.3 Choosing Printer Font File menu, click printer font. standard Windows Font dialog opens, letting choose font type size. NOTE: best results, True-Type fonts that come standard with Windows environment. Viewing Editing Project Files ST-Realizer includes standard edit commands: Undo, Copy, Cut, Paste Clear. these edit ST-Realizer project files. following table describes these commands: this: Undo your last action Copy text objects clipboard Delete text objects move them clipboard Paste text objects from clipboard file this: Edit menu, click Undo. Select text objects want copy, then Edit menu, click Copy. Select text objects want move clipboard, then Edit menu, click Cut. Place cursor where want text objects appear, then Edit menu, click Paste. 79/171 Customising ST-Realizer CUSTOMISING ST-REALIZER number ST-Realizer features customised suit your working. These include: Automatic work saving Screen preferences layout pages which draw schemes Toolbars following paragraphs describe customise these features. Automatically Saving Your Work With auto save, ST-Realizer save your work regular, pre-defined intervals. auto save: Options menu, click Auto save. Auto save options dialog opens. Auto save options dialog box, check Auto save check clicking interval which ST-Realizer will save your work displayed Auto save time field. want change this, overtype displayed value. Click Changing Screen Preferences change following screen preferences: Attribute size, color alignment. Ghostbox, wires, junctions selection colors. Grid frequency snapping distance. change these: Options menu, click Preferences. 80/171 Customising ST-Realizer Preferences dialog opens: Select want settings apply whole current project, currently open scheme clicking appropriate button. change attribute size, color alignment, select appropriate option from Attribute box. change color ghostbox, wires, junctions selection paper click appropriate field Colors select color from displayed palette. change Grid frequency snapping distance overtype appropriate values Grid box. turn snap grid click Snapping check box. When checked snap grid enabled. Click when have finished. 81/171 Customising ST-Realizer Changing Your Page Layout change size, orientation margins your scheme page. These characteristics visible screen when print scheme. change page layout: Options, click Page layout. Page layout options dialog opens: Select whether want settings apply whole current project currently open scheme, clicking appropriate button. change paper size, select size from Size drop-down list. change paper orientation, select appropriate option Orientation box. change margins, overtype numbers appropriate fields Margins box. Click when have finished. 82/171 Customising ST-Realizer Customizing Toolbars Toolbar buttons provide with quick access frequently-used commands. Most STRealizer commands have their own, pre-defined buttons. list buttons their corresponding menu commands "Available Toolbar Buttons" page change ST-Realizer toolbars Adding deleting toolbar buttons. Placing separators between toolbar buttons. Changing order toolbar buttons. Restoring default toolbar. Note that changes make toolbar implemented until open scheme. following paragraphs describe perform these tasks. 9.4.1 Adding Deleting Toolbar Buttons Options menu, click Configure toolbar. Configure toolbar dialog opens. Available buttons lists toolbar buttons that available currently being used. Active buttons lists toolbar buttons that currently being used. button toolbar: Active buttons box, click button left which want button. Available buttons box, click name button want add, then click delete button from toolbar, click name Active buttons box, then click Click 83/171 Customising ST-Realizer 9.4.2 Placing Separators Between Toolbar Buttons place separators between toolbar buttons, that group buttons like. example, could group edit functions: Cut, Copy Paste buttons. Placing separator widens space between buttons. place separator: Options menu, click Configure toolbar. Configure toolbar dialog opens. Active buttons box, click button left which want place separator. Click Separator button, then click 9.4.3 Changing Order Toolbar Buttons Options menu, click Configure toolbar. Configure toolbar dialog opens. Active buttons box, click button want move. Click move button place left, Down move button place right. Repeat step until button required position. Click when have finished ordering buttons. 9.4.4 Restoring Default Toolbar Options menu, click Configure toolbar. Configure toolbar dialog opens. Click Default. Click 84/171 Customising ST-Realizer 9.4.5 Available Toolbar Buttons following table list, each ST-Realizer applications, available toolbar buttons commands which they correspond. Toolbar buttons available applications: Button Command File File Open File Save Edit Edit Copy Edit Paste Action Change Action Information Button Command Action Rotate Action Copy Display Zoom Display Zoom Display Zoom Window Display Zoom Center Help Contents 85/171 Customising ST-Realizer Toolbar buttons available ST-Realizer: Button Command analyze Simulate Select Wire Group analyze results Previous message Button Command Next message Action Mirror Label Symbol Object Library Symbol Toolbar buttons available ST-Simulator: Button Command Initialize Stop Start Adjuster Numeric Adjuster Sine Wave Button Command Adjuster Square Wave Adjuster Time Table Probe Numeric Probe Oscilloscope Probe State Machine Toolbar buttons available ST-Symbol Editor: Button Command Symbol Symbol Open Symbol Save Button Command Select Draw Group Object Object Rectangle 86/171 Creating Composite Symbols CREATING COMPOSITE SYMBOLS ST-Realizer enables existing symbols create composite symbol. Composite symbols useful cases: When page designing starts running space. When you've designed part scheme that want reuse. design composite symbols subschemes. subscheme scheme that attached main root scheme. relationship between scheme subscheme same that directory subdirectory. Designing subscheme different from designing ordinary scheme, with exception: subscheme connections root scheme subscheme symbol. subscheme symbols named sssi_o, where indicates number inputs need your symbol number outputs. example, sss2_1 subscheme with inputs output. When want subscheme, must therefore first think about connections: what inputs does subscheme need deliver output. When know this, choose correct subscheme symbol from main library. After you've placed subscheme symbol, into subscheme double-clicking symbol start designing should start connecting subscheme ports: these transmit data between root scheme subscheme. Once you've placed ports insert existing symbols into subscheme, wire ports symbols together. Note that ST-Realizer online help system includes tutorial which leads through steps creating example composite symbol. this click create symbol icon ST-Realizer icon group. 10.1 Inserting Subscheme main library already open, open clicking subscheme symbols named sssi_o, where indicates number inputs need your symbol number outputs. example, sss2_1 subscheme with inputs output. Double-click subscheme symbol want use, then click where want appear scheme. Edit value dialog opens. Enter name want give your subscheme Scheme field, then click 87/171 Creating Composite Symbols 10.2 Going Into Subscheme into subscheme, double-click symbol your scheme. NOTE: first time enter subscheme, will warned that file with name subscheme does exist, asked want create Choose Yes. Next will warned that subscheme does contain port each inputs outputs. Click make sure create them! 10.3 Placing Input Output Ports first step creating composite symbol place input output ports: main library already open, open clicking Double-click portin place input port, portout place output port. Click where want port appear subscheme. Note that input ports normally left, output ports right, symbol. Edit value dialog opens. Type name port. NOTE: reuse composite symbols, port names must match ports composite symbol. Click Repeat steps until have placed named ports subscheme. 10.4 Drawing Composite Symbol Once have placed subscheme symbol connected ports, draw composite symbol same that draw main scheme. "Drawing Schemes" page full details perform tasks involved drawing schemes. 10.5 Going Back Root Scheme back root scheme time: Action menu, click Leave. 10.6 Reusing Subschemes reuse your subscheme other schemes projects. Note that ports used inside your subscheme must always match pins subscheme symbol. When want subscheme different projects, place separate directory, example \REALIZER\SUBSCHS. this way, build your library subscheme symbols. 88/171 AnalySing Your Schemes Generating Program Code ANALYSING YOUR SCHEMES GENERATING PROGRAM CODE analyze process analyzes currently open scheme generates ST62 code. errors encountered during analysis code generation, online information provided help locate error take corrective action. When execute analysis compile, ST-Analyzer analyzes scheme creating netlist, creating cross references, analysing generating final code. During these phases, connections between symbols, assignments variable types checked before generating source code. Providing fatal errors encountered, ST-Realizer generates non-compiled macro-assembler language (.asm) file from scheme. ST-Analyzer then generates binary code. This process runs STMicroelectronics assembler. Depending whether included (see "Disabling ROS" page 93), file with extension *.hex respectively generated. *.hex file directly loaded into while must link *.obj file with another program. When analyze process been successfully completed, report file generated. This report file gives information about designation pins, list variables used type memory space required application. messages generated during analysis compile, view them trace them back their origin. NOTE: scheme analysing compiling includes symbol that created yourself, must include macro macros linked symbol before analysing scheme. Your Scheme Includes Your Symbol." page further details. ST-Realizer includes following ST-specific characteristics, which configure when analyze compile your code: Watchdog management. This automatically provided devices that include hardware watchdog (see corresponding Databook further information watchdog function). disactivate watchdog using with software watchdog configuration. Memory mapping. start addresses chosen ROM, EEPROM. Oscillator frequency. internal timer period tick. 89/171 AnalySing Your Schemes Generating Program Code 11.1 Changing Compile Options Before analyze compile schemes using ST-Realizer, following compilation options: Whether want generate source code. Whether want invoke assembler. Whether want generate final code. Whether want include project data (this useful version control). Whether want generate code that uses constant sampling time (you must choose this option your scheme includes mathematical symbols: integral differential). choose this option, each loop Realizer Operating System waits specified time before executing main loop. frequency base clock timer symbols. default this 0.01 seconds milliseconds). generate executable code that embedded device, must default settings. Each device needs assembler target compiler make final executable. These standard elements ST-Realizer system. 90/171 AnalySing Your Schemes Generating Program Code change compile options: analyze menu, click Options. analyze options dialog opens: Click option check boxes select deselect options want. When checked, option selected. want change frequency base clock timer symbols, overtype Timer tick field with value. want fixed sampling time, click Fixed looptime box, enter looptime want Looptime field. Click 91/171 AnalySing Your Schemes Generating Program Code 11.2 Analyze: Optimisations This function active implemented Realizer Professional which obtained from Actum Solutions. 11.3 Changing Hardware Settings Before compile your scheme, customise your program will operate when loaded into define: oscillator frequency. start ROM. start RAM. start EEPROM included your target ST). Whether Watchdog implemented. these parameters: analyze menu, click Hardware settings. Hardware settings dialog opens: update hardware parameters, overtype current value. 92/171 AnalySing Your Schemes Generating Program Code target device software watchdog configuration, activate/disactivate watchdog clicking Watchdog check box. Watchdog activated when checked. Click 11.4 Your Scheme Includes Your Symbol. scheme analysing compiling includes symbol that created yourself, must include macro macros linked symbol before analysing scheme. details create your symbols "Creating Your Symbol" page 112. include macros linked user-defined symbols: analyze menu, click Hardware settings. Hardware settings dialog opens. Include files field, enter name full path macro files linked your symbols. include more than macro file, separate each path file name with semicolon (;). Click 11.5 Disabling Realizer Operating System (ROS) made macros pieces code that perform background tasks that must added ST-Realizer application complete ready load into device. disable inclusion standard macros, generate your code perform tasks (these described below). disable ROS: analyze menu, click Hardware settings. Hardware settings dialog opens. Click Complete check box. disabled when check empty (unchecked). Click disable ROS, must external program perform following functions: Call following subroutines that created ST-Realizer: PortInit, which initialises ports according ST-Realizer application. RamInit, which initialises allocated ST-Realizer application. 93/171 AnalySing Your Schemes Generating Program Code RealInit, which initialises ST-Realizer application. RealMain, which executes ST-Realizer application. PortInit, RamInit RealInit must executed once RealMain subroutine must executed continuously. Perform interrupt management. Fill input variables that used ST-Realizer application copy output variables ST-Realizer application data registers ports. input variables are: Apxd This variables generated result conversion. These variables already allocated with size byte. Their names defined with following format: Apxd, where port name number 0.7. RTICK This one-byte timer tick variable. This must filled with number ticks during last execution RealMain subroutine. output variables are: BUDRx These byte each. Their contents must copied data registers appropriate port. Their names defined with following format: BUDRx where port name 11.6 Executing Analysis Compile When execute analysis compile, ST-Realizer performs following tasks: Creates netlist schemes project. Creates cross references between schemes project. analyzes logical functionality schemes consistency. Generates code. Transfers code assembler chosen target hardware. This assembler generates final executable code that transferred into target Scans file generates report file. 94/171 AnalySing Your Schemes Generating Program Code analyze compile scheme: Make sure that scheme want analyze active. analyze menu, click analysing process starts. Once analyze compile have been completed, analyze Status displayed: 11.7 Viewing analyze Compile Report analyze menu, click Report. analyze compile report displayed screen. 11.8 Viewing Tracing Generated Messages messages generated when your scheme analyzed code generated, view messages trace them back their origins: Click Analysis results dialog opens. Double-click displayed message view origin. 95/171 Simulating Your Application SIMULATING YOUR APPLICATION Once have designed analyzed your application, ST-Simulator simulate behaviour, generate view input signals, monitor signals that generated your application, fine-tune necessary. principal tasks involved simulating application are: Creating simulation environment file, which defines environment which you'll simulate your application. Adding adjusters your simulation environment file, which enable generate view signals that input your application. Adding probes your simulation environment file, which enable view signals that generated your application. Running simulation. also record values generated adjusters read probes while simulation being run. ST-Realizer records this information files. This information useful viewing exact adjuster probe values given time during simulation. This section explains perform these tasks. 12.1 Working with Simulation Environment Files Each scheme want simulate must have simulation environment (.SEF) file before simulated. Simulation environment files copies their parent schemes with adjusters probes added where required. save reuse simulation environment files other type file. 12.1.1 Creating .SEF File ST-Simulator clicking Simulation|Go have already done Click simulation dialog opens. Double-click name directory that contains scheme Directories box. Double-click .sch file which want create simulation environment file File name: list then click Directories list, double-click name directory which want create .SEF file. File name: field, type name .SEF file, then click 96/171 Simulating Your Application simulation environment file created based chosen scheme. adjusters probes your simulation environment. 12.1.2 Opening Existing .SEF File ST-Simulator clicking Simulation|Go have already done Click Open simulation environment dialog opens: Double-click name directory that contains .SEF file Directories box. Double-click .SEF file want open list beneath File name: box, then click chosen .SEF file displayed ST-Simulator window. 12.1.3 Saving .SEF File should save modifications made .SEF file regular intervals once have finished working file. also make duplicate existing .SEF file. save .SEF file: File menu, click Save. make duplicate existing .SEF file: File menu, click Save Save simulation environment dialog opens. Double-click name directory which want create duplicate file Directories box. Type file name File name: then click 97/171 Simulating Your Application 12.2 Setting, Adjusting Viewing Input Values When simulate application, set, adjust view values input application. This enables experiment with fine-tune your application. able set, adjust view input values types, connect adjusters appropriate wires your scheme. ST-Realizer lets four types adjusters: Numeric Adjusters, which display adjust variable values numerically, binary, decimal, hexadecimal octal format. Time Table Adjusters, which adjust value variable specified time intervals. Sine Wave Adjusters, which generate define analogic sine wave signals. They adjust wave depth frequency. Square Wave Adjusters, which generate define analogic square wave signals. They adjust wave depth duty cycle. duty cycle percentage period which signal value. following paragraphs describe attach adjusters wires appropriate input values. NOTE: only attach adjuster each wire. 12.2.1 Setting Fixed Input Variable Values fixed analogic binary input variable values, must attach Numeric Adjuster appropriate input wire. Numeric Adjusters value input wire which attached, well change number base which value displayed. attach Numeric Adjuster wire: Select wire which want connect Numeric Adjuster clicking Click Click where want Numeric Adjuster appear. adjuster placed your scheme connected wire selected. 98/171 Simulating Your Application value input wire: wire input analogic, change value either: Clicking displayed value Numeric Adjuster icon entering value Change value dialog box. Clicking <<,<,>,or buttons Numeric Adjuster: This button: Does this: Decreases input value fast step increment value (see below). Decreases input value step increment (see below). Increases input value step increment. Increases input value fast step increment value. wire input binary, change value clicking displayed value Numeric Adjuster icon. value toggles between change Numeric Adjuster options: change number base which input values displayed set, step fast step increment values, whether <,>,<< buttons visible: Select Numeric Adjuster whose options want change. Action menu, click Change. 99/171 Simulating Your Application Change numeric adjuster dialog opens: this: Change current value attached wire Change increment value buttons Change increment value buttons Change number base which value displayed Hide display buttons. this: Enter value Value field. Enter value Step field. Enter value Step fast field. Select appropriate button Presentation box. Click Extended check box. When this checked, buttons displayed. Click 100/171 Simulating Your Application 12.2.2 Setting Variable Input Values variable analogic binary input values, must attach Time Table Adjuster appropriate input wire. Time Table Adjuster lets input value that changes specified time periods. Once have placed Time Table Adjuster, either import data from ASCII text file enter data directly into Time Table Adjuster. following diagram shows format Time Table Adjuster-compatible ASCII files: This ASCII File: ,100 75000 ,150 600000 Provides these table values when imported: store decimal, binary, hexadecimal octal information Time Table Adjusters. attach Time Table Adjuster wire: Select wire which want connect adjuster clicking Click Click where want adjuster appear. adjuster placed your scheme connected wire selected. values input wire: Double-click Time Table Adjuster icon your scheme. Change time table adjuster dialog opens. this: Change time value change. Change value that will specified time. Insert value time. Import values from existing file. this: Double-click entry want change, then edit value Change value dialog box. Double-click entry want change, then edit value Change value dialog Press Insert your keyboard, then enter time value. Click Import, choose file want import. Click Note that smallest time interval between entries table 0.001 seconds. 101/171 Simulating Your Application 12.2.3 Setting Sine Wave Input Signals sine wave input signals, must attach Sine Wave Adjuster appropriate input wire. Sine Wave Adjusters signal amplitude frequency that input wire. Note that only attach Sine Wave Adjusters wires with analogic input. attach Sine Wave Adjuster wire: Select wire which want connect adjuster clicking Click Click where want adjuster appear. adjuster placed your scheme connected wire selected. signal amplitude frequency: Double-click Sine Wave Adjuster icon your scheme. Change sine wave adjuster dialog opens: bottom range wave amplitude, edit value Bottom field. range wave amplitude, edit value field. wave frequency, edit value Frequency field. Click 102/171 Simulating Your Application 12.2.4 Setting Square Wave Input Signals square wave input signal, must attach Square Wave Adjuster appropriate input wire. Square Wave Adjusters signal amplitude, duty cycle frequency. attach Square Wave Adjuster wire: Select wire which want connect adjuster clicking Click Click where want adjuster appear. adjuster placed your scheme connected wire selected. signal amplitude, duty cycle frequency: Double-click Sine Wave Adjuster icon your scheme. Change square wave adjuster dialog opens: bottom range wave amplitude, edit value Bottom field. range wave amplitude, edit value field. wave frequency, edit value Frequency field. duty cycle, that percentage time that signal value, edit value Duty cycle field. Click 103/171 Simulating Your Application 12.3 Monitoring Signals When simulate application, monitor signals generates using probes. This enables experiment with fine-tune your application. connect probes wire symbol whose signals states want monitor. ST-Realizer lets connect four types probe: Numeric Probes, which view value wire symbol Binary, Decimal, Hexadecimal Octal number bases. Timer probes, that display timer counter values. Oscilloscope Probes, which view value wire symbol graph. State Machine Probes, that view value initial state symbol state machine. following paragraphs describe probes. 12.3.1 Viewing Variable Values Numerically view variable values numeric form, must attach Numeric Probe Timer Probe appropriate wire symbol. Numeric Probes Timer Probes view value wire (that variable), timer counter Binary, Decimal, Hexadecimal Octal number bases. attach Numeric Probe: Select wire which want connect probe clicking Click Click where want probe appear. probe placed your scheme connected wire selected. attach Timer Probe: Select timer symbol which want connect probe clicking Click Click where want probe appear. probe placed your scheme connected wire selected. select displayed number base: Double-click probe icon your scheme. 104/171 Simulating Your Application Change numeric probe dialog opens: Select appropriate button Presentation box. Click 12.3.2 Viewing Variable Values Graphically view variable values graphic form, must attach Oscilloscope Probe appropriate wire. Oscilloscope Probes view value wire symbol graph. also adjust bottom levels Y-axis displayed graph, time scale within which value displayed. attach Oscilloscope Probe: Select wire symbol which want connect probe clicking Click Click where want probe appear. probe placed your scheme connected wire symbol selected. change Y-axis, time scale, time mode displayed graph: Double-click Oscilloscope Probe icon your scheme. 105/171 Simulating Your Application Change oscilloscope probe dialog opens: this: Change time which variable display starts. Change time which variable display ends. Change value displayed area. Change bottom value displayed area. display area filled once only. display start when rising edge, falling edge specified value detected probe. display area filled continuously overwritten each time full. this: Enter time Begin field. Enter time after: field. Enter value field. Enter bottom value Bottom field. Click Single scan button. Click Trigger button, then enter trigger value Value field select trigger edge type Trigger box. Click Wrap around button. Click 106/171 Simulating Your Application 12.3.3 Viewing State Machine States view states state machine attaching State Machine Probe initial state machine symbol. choose either current state only current state number previous states. attach State Machine Probe state machine: Select initial state symbol which want connect probe clicking Click Click where want probe appear. probe placed your scheme connected state machine selected. enable/disable state history list length: Double-click State Machine Probe icon your scheme. Change state machine probe dialog opens: enable disable state history list, click Enabled check box. When checked, history list enabled. change length history list, enter length Size history list field. Click 107/171 Simulating Your Application 12.4 Listing Adjusters Probes list adjusters probes currently open simulation environment file, select adjuster probe double-clicking entry. list adjusters probes currently open simulation environment file, Object menu, click List. 12.5 Running Simulation When your simulation, adjusters placed generate input values, your application performs processing, where appropriate, results displayed probes placed. While simulation running, simulation time displayed status bottom screen. stop simulation time clicking symbols wires. 12.5.1 Setting Options Before your simulation, should consider which options want set. options are: Whether want simulation continuously, number loops, time period. When continuous simulation chosen, stop application when want. Periodic adjusters such square wave adjusters sine wave adjusters particularly adapted this mode. When number loops chosen, execute loop time. Note that this case loop time time needed execute macro-instructions tick which time base used ST-Realizer. Whether want your PC's clock microcontroller clock simulation. Note that PC's clock, sampling time execution loop. corresponding absolute time recalculated using PC's clock. This mode much faster since number sampled points lower, however lower sampling frequency causes loss precision. these options: File menu, click Mode. that view values 108/171 Simulating Your Application Simulation mode dialog opens: this: simulation continuously simulation number loops simulation time period microcontroller clock simulation your clock simulation this: Click Continuous button. Click Limited loops button, then enter amount loops want executed simulation Number loops field. Click Limited time button, then enter period which want simulation Running time field. Click target time button (see Note below). Click host time button (see Note below). Click NOTE: choose microcontroller clock simulation, simulation time controlled device, scaling effect takes place simulation process. This means that, instance, need seconds represent, say, msec simulated application environment. This most accurate simulating device. choose your clock simulation, time seconds will take seconds. This mode less accurate than target time mode. 109/171 Simulating Your Application 12.5.2 Running Simulation have already your simulation, want initialise original state: Click your simulation: Click stop running your simulation: Click 12.6 Recording Reusing Adjuster Probe Values record values generated adjusters read probes while simulation being run. ST-Realizer records this information files. This information useful viewing exact adjuster probe values given time during simulation. view file information opening file word processor application. format files follows: These adjuster probe names. ,100 ,Ready,0 ,100 ,High,0 ,100 ,Low,1 ,100 ,3000 ,Low,0 ,100 ,2999 ,Low,0 ,100 ,2998 ,Low,0 ,100 ,2997 ,Low,0 These adjuster probe values that were read each time value changed. also reuse recorded adjuster values subsequent simulations order recreate identical conditions. 110/171 Simulating Your Application 12.6.1 Recording Adjuster Probe Values Before running simulation whose values want record, menu click Open. file dialog opens. Directories box, double-click directory which want create file already open. Type name file want create File name box. Click your simulation. file will recorded while your simulation running. Once have finished recording simulation information, close file clicking Close menu. 12.6.2 Reusing Adjuster Values Once have recorded file, reuse recorded adjuster values subsequent simulations: Before running simulation, Stimuli menu, click Open. file dialog opens. Directories box, double-click directory holding file want use. list beneath File name box, double-click file want use. Click your simulation. adjuster values recorded file input your simulation while running. Note that also manually change adjuster values. Once have finished simulation, close file clicking Close Stimuli menu. 111/171 Creating Your Symbol CREATING YOUR SYMBOL create your symbol ways: creating composite symbol from existing symbols. creating your symbol that's linked your macro. This section describes create your symbol that's linked your macro. Refer "Creating Composite Symbols" page details create composite symbol. create edit your symbols using ST-Symbol Editor. Creating symbol involves following tasks: Creating symbol shape. Placing pins that represent variables that input output from your symbol. Linking your symbol macro(s) represents. Once you've finished creating your symbol, SCH2LIB converter create customised library containing symbols that used project, including symbols that created yourself. Note that ST-Realizer online help system includes tutorial which leads through steps creating example symbol macros. this click create symbol ST-Realizer program group. 13.1 Running Symbol Editor ST-Symbol Editor from ST-Realizer window: Make sure have scheme loaded ST-Realizer window. Edit menu, click Symbol. ST-Symbol Editor window opens. create symbol edit existing symbol following instructions given below. 13.2 Creating Symbol Click symbol dialog opens. Type name symbol want create symbol field, then click empty working environment opens, which start create your symbol. 112/171 Creating Your Symbol 13.3 Opening Existing Symbol Click Open symbol dialog opens. list symbols, double-click name symbol want edit, then click edit your symbol. 13.4 Adding Symbol Shape shape symbol represents, does effect, process that behind NOTE: Symbol shapes should cross square ST-Symbol Editor window (this represents physical limits symbol). Once have drawn symbol shape, cannot change color. should therefore check what color shape will modify necessary: Options menu, click Preferences. current shape color shown Shape color box. want change click Shape color box, then click color want color palette. Click draw ellipse: Click Click where want centre ellipse Move cursor direction. You'll notice that ellipse shape appears that based relationship between where clicked current cursor position. Click when ellipse size shape want ellipse drawn. 113/171 Creating Your Symbol draw rectangle: Click Click where want left corner rectangle Move cursor downwards right. Click when rectangle size shape want rectangle drawn. draw lines: Click Click where want line start. Click where want line end. continue drawing connected lines placing cursor where want next line then clicking. Right-click when want stop drawing connected lines. NOTE: When draw cursor automatically snaps invisible grid. want change spacing between gridlines, Options menu, click Preferences, then enter distance want between grid lines Grid field. 114/171 Creating Your Symbol 13.5 Adding Pins Your Symbol pins place your symbol represent variables that input output from symbol defining. place pin: Object menu, click Pin. Create dialog opens: number automatically generated displayed Number field. This importance calling convention assembly macros. number sets sequence parameters. Label field, enter label pin. This corresponds variable name. Input/output field, select type want place: this type pin: Normal input pin. Normal output pin. There only output net. Input with clock capabilities. Passive output pin. There more than passive output net. Input Output Clock input Passive output Choose this: 115/171 Creating Your Symbol Type field, select capacity want place: transmitting this value range: 255. -128 127. 65535. -32768 32767. -2147483648 2147483647. Unsigned byte Signed byte Unsigned Signed Long type Choose this: Ifyou want change color, click Color box, then choose color from palette. Click rectangle appears, representing position pin. Note that starts left side symbol boundary. want start another side symbol boundary, click click this button moves anti-clockwise next boundary. Each time Move cursor point your symbol which want connect pin, then click place pin. 116/171 Creating Your Symbol 13.6 Resizing Your Symbol While drawing your symbol, resize items (such arcs, attributes pins) that make together: Click corner shape border (that square within which drew your symbol). Keeping right mouse button pressed, drag corner border resize your symbol. When border size shape want release mouse button. Click message asking want resize your symbol. NOTE: After resizing symbol must reposition pins drawing grid, avoid disconnecting them. 13.7 Assigning Attributes Your Symbol Attributes enable attach extra characteristics symbols. example, attaching attribute type DEVICE extends macro that linked with symbol with additional information. available attribute types listed "Attribute Types" page 128. assign attribute: Object menu, click Attribute. Create attribute dialog opens. field, enter attribute tag. Value field, enter value. attribute value remark does into Value field, click Multiline check want value hidden, click appropriate check Visibility box. When boxes checked, values visible. Hidden tags values made visible choosing Display|Invisible attributes. change attribute color, click Color field choose color. change attribute size, edit value Size field. want change vertical horizontal alignment, select alignment type from Ver. alignment Hor. alignment drop-down lists. Click when have finished defining attribute. Position cursor over part symbol which want attach attribute. Note that point effect, that item which attribute attached, appears spot symbol. Click attach attribute item containing point effect. 117/171 Creating Your Symbol 13.8 Adding Your Symbol Library SCH2LIB converter provided with ST-Realizer allows create customised library containing symbols that used project, including symbols that created yourself: ST-Realizer icon group, click ST-Sch2Lib converter icon. Open scheme dialog opens. Double-click name directory that contains scheme want convert Directories box. Double-click .sch file want convert. Convert library dialog opens. Double-click name directory which want create your library Directories box. Enter library name File name field. Click library created containing symbols that where used converted scheme. reuse th Other recent searchesXC6209LDO - XC6209LDO XC6209LDO Datasheet TMS320C672x - TMS320C672x TMS320C672x Datasheet ICS9158 - ICS9158 ICS9158 Datasheet ETSI300-339 - ETSI300-339 ETSI300-339 Datasheet CDDS-232-012 - CDDS-232-012 CDDS-232-012 Datasheet 2N4124 - 2N4124 2N4124 Datasheet
Privacy Policy | Disclaimer |