ST AN1526 Application note

AN1526

APPLICATION NOTE

ST7FLITE0 QUICK REFERENCE NOTE

by Microcontroller Division Applications

INTRODUCTION

The ST7FLITE0 extends the lower end of the ST7 range, designed to fit applications with state-of-the-art features in a very small package.

ST7FLITE0 8-bit MCUs have many cost-saving features and they come with low-cost tools, providing a complete package to reduce both design and final application costs to the absolute minimum.

This application note highlights some small but very important aspects of the ST7FLITE0 that users should not overlook when reading the datasheet.

Sections 2 and 3 contain helpful pointers and a table to help you start working with ST7FLITE0 and its related tools.

Table 1. ST7Lite0 Features

Program memory

1.5 Kbytes Flash (single voltage)

RAM

128 bytes

 

 

Data EEPROM

ST7FLITE05: no Data EEPROM

ST7FLITE09: 128 bytes Data EEPROM

 

 

 

Package

SO16 (.150) or DIP16

 

 

Number of I/O pins

13 (including 6 high current pins)

 

 

Vdd range

2.4V - 5.5V

Temperature range

-40°C to +85°C

 

 

IDDmax in RUN mode

5mA

 

 

LVD

3 levels (Standard)

 

Internal RC (1MHz) +/- 1%

Clock sources

PLLx4 (2.4V<Vdd<3.3V)

 

PLLx8 (3.3V<Vdd<5.5V)

A/D

8 bits with fixed gain - Op-Amp

5 channels

 

 

 

Timers

Autoreload Timer: 1 12-bit PWM channel, Output Compare function

Lite Timer: Watchdog, Real Time Clock, Input Capture functions

 

 

 

Communication peripheral

SPI

 

 

Special features

Read-out protection, In-Circuit Programmming (ICP), In Application Programming

(IAP)

 

 

 

AN1526/0503

1/26

Table of Contents

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1 ST7FLITE0 KEY ADVANTAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1 LOW-COST 8-BIT MICROCONTROLLER SOLUTION . . . . . . . . . . . . . . . . . . . . 3

1.2 AREA OPTIMIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3 HIGH ACCURACY INTERNAL 1MHZ RC OSCILLATOR . . . . . . . . . . . . . . . . . . 4

1.4 8-BIT A/D CONVERTER WITH INPUT VOLTAGE AMPLIFIER (X8) . . . . . . . . . 4

1.5 TRUE E2PROM DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.6 SAFE PROTECTION AGAINST PIRACY ON DATA E2PROM AND FLASH . . . 5

1.7IN-CIRCUIT PROGRAMMING AND IN-APPLICATION PROGRAMMING CAPABILITIES 6

2 ST7LITE0 DEVELOPMENT TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1 SOFTWARE TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.1 ST7 Visual Debug IDE - Reference: STVD7 . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.2 STVD7 Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.3 C Compiler toolchains from Cosmic and Metrowerks . . . . . . . . . . . . . . . . . 7 2.1.4 ST7 Visual Programmer - Reference: STVP7 . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 HARDWARE TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2.1 In-Circuit Debugging Kit - Reference: ST7FLITE0-INDART . . . . . . . . . . . . 8 2.2.2 ST Emulator - Reference: ST7MDT10-EMU3 . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.3 ST Programming tool - Reference: ST7MDT10-EPB . . . . . . . . . . . . . . . . . 9 2.2.4 ST Graphic Design and Debug - Reference: STREALIZER-II . . . . . . . . . . . 9

3 START TODAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 ST7FLITE0 8-BIT MCU - EASY REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2/26

ST AN1526 Application note

ST7FLITE0 QUICK REFERENCE NOTE

1 ST7FLITE0 KEY ADVANTAGES

1.1 LOW-COST 8-BIT MICROCONTROLLER SOLUTION

The ST7FLITE0 is a small low-cost microcontroller, embedding many analog functions. It therefore allows you to save board area and the cost of external components. There is no need for:

-external ceramic resonator for accurate oscillators (see 3.2)

-external E2data (see 3.4)

-external reset circuitry

-external LVD circuitry

-PCB rework for SW update

-large PCB

1.2 AREA OPTIMIZATION

ST7FLITE0 gives you the choice of two small 16-pin packages. You can take advantage of this to save area on your PCB.

SO16: 6x9.9mm

DIP16:10.92x19.18mm

 

 

 

 

 

 

ST7FLITE0 actual-size footprint of 16-Pin SO Package - Typical: 6mm wide, 9.9mm long

3/26

ST7FLITE0 QUICK REFERENCE NOTE

1.3 HIGH ACCURACY INTERNAL 1MHZ RC OSCILLATOR

The ST7Flite0 contains an internal RC oscillator with an accuracy of 1% for a given device, temperature and voltage. It must be calibrated to obtain the frequency required in the application. This is done by software writing a calibration value in the RCCR (RC Control Register).

Whenever the ST7FLITE0 microcontroller is reset, the RCCR returns to its default value (FFh), i.e. each time the device is reset, the calibration value must be loaded in the RCCR. Predefined calibration values are stored in E2PROM for 3.0 and 5V VDD supply voltages at 25°C, as shown in the following table.

RCCR

Conditions

ST7FLITE09

ST7FLITE05

Address

Address

 

 

 

 

 

 

 

VDD =5V

1000h and

FFDEh

RCCR0

TA =25°C

FFDEh

 

 

fRC =1MHz

 

 

 

VDD =3V

1001h and

FFDFh

RCCR1

TA =25°C

FFDFh

 

fRC =700kHz

 

 

 

 

If the voltage or temperature conditions change in the application, the frequency may need to be recalibrated.

Refer to AN1324 “Calibrating The RC Oscillator of the ST7FLITE0 MCU using the Mains

for information on how to calibrate the RC frequency using an external reference signal.

Decoupling capacitor for stable oscillator

Vdd and Gnd levels impact the stability of the 1% internal RC of the ST7FLITE0. To reach the most stable oscillation, use decoupling capacitors between Vdd and Gnd pins, at values recommended in the datasheet.

RCCR calibration locations can be Write Protected

The STVP or InDART tools allow you to prevent unintentional write access to the RCCR calibration locations.

1.4 8-BIT A/D CONVERTER WITH INPUT VOLTAGE AMPLIFIER (X8)

The 8-bit A/D converter allows up to 5 channels with multiplexed inputs.

You can take advantage of its internal fixed-gain amplifier (x8) for zooming on low voltage inputs. For Vdd=5V, the ADC can therefore convert from 0V to 250mV. In this case the ADC ideal resolution is 2.4mV, equivalent to a 11-bit resolution with input range from 0V to Vdd.

4/26

ST7FLITE0 QUICK REFERENCE NOTE

1.5 TRUE E2PROM DATA

The ST7FLITE09 contains an Electrically Erasable Programmable Read-Only Memory which can be used as a non volatile back-up for storing data. It allows up to 300K Write/Erase cycles at 25°C.

Main Features

-Up to 32 Bytes programmed in the same cycle

-mono-voltage EEPROM (charge pump)

-Chained erase and programming cycles

-Internal control of the global programming cycle duration

-WAIT mode management

-Read-out protection against piracy

Useful Tips:

ST7FLITE05: Emulate Data E2PROM with program area

 

For devices with no Data E2PROM, you can emulate Data EEPROM

 

with the XFlash Memory.

 

For more information, refer to:

 

AN1477: Emulated Data EEPROM with XFlash memory

 

 

1.6 SAFE PROTECTION AGAINST PIRACY ON DATA E2PROM AND FLASH

Data stored in the E2PROM memory, as well as the program memory, are protected against read-out piracy. This is managed by the option bit “Read-out protection”. Removing this option by erasing the option byte will cause the whole memory to be erased first.

Flash program memory can also be protected against re-write operation by option bit “Flash Write protection”. When this option is selected, the program memory can never be erased or programmed again.

5/26

ST7FLITE0 QUICK REFERENCE NOTE

1.7 IN-CIRCUIT PROGRAMMING AND IN-APPLICATION PROGRAMMING CAPABILITIES

In addition to using a programming tool, the two following modes allow you to program your ST7LITE0 without removing it from your PCB.

ICP: In-Circuit-Programming: The ICP is the ability to program the Flash memory (FLASH sectors 0 and 1, option byte row and data EEPROM) of a microcontroller using ICC (In-Circuit Communication) protocol while the device is already plugged-in to the application, but application is not running.

IAP: In-Application-Programming: The IAP is the ability to re-program the FLASH memory (FLASH sector 1 and data EEPROM) of a microcontroller while the device is already pluggedin to the application and the application is running. As sector 0 contains the software driver to be able to re-program, it is write protected, therefore not reprogrammable.

In ICP minimum configuration, only 3 wires are needed (ICCCLK, ICCDATA, RESET). The user may also use it as a basis to develop its own debugging tool.

Programming time:

ICP allows 1kbytes to be programmed/erased in 160ms.

Typical measurements: 1.5k Flash programming time: 315ms

For more information, refer to the Programming Manuals:

. ST7 Flash Programming Reference Manual

. ST7 ICC Protocol Reference Manual

Useful Tips:

Sector 0 size configurable by Option Byte

 

As sector 0 is not re-programmable in IAP programming mode, you

 

may take advantage of configuring its size to optimize Program

 

Memory.

 

By Option Byte, sector 0 size can be set at 0.5 Kbytes, 1 Kbytes, or 1.5

 

Kbytes.

 

 

6/26

ST7FLITE0 QUICK REFERENCE NOTE

2 ST7LITE0 DEVELOPMENT TOOLS

Table 2 shows a summary of available tools for each function.

Table 2. Available Tools

 

 

 

DEBUG

GRAPHIC

 

 

SIMULATE

EMULATE

&

DESIGN &

PROGRAM

 

 

 

PROGRAM

DEBUG

 

 

 

 

 

 

 

SOFTWARE

STVD7

STVD7

STVD7 (included in

ST-REALIZERII

STVP7

 

 

Simulator

 

ST7FLITE0-INDART

 

 

 

 

 

package)

 

 

 

 

 

 

 

 

HARDWARE

no need

ST7MDT10-EMU3

ST7FLITE0-INDART

no need

ST7MDT10-EPB

 

 

 

 

 

 

 

Note: Third-party C-compiler tool chains can be used with STVD7 interface.

2.1 SOFTWARE TOOLS

2.1.1 ST7 Visual Debug IDE - Reference: STVD7

Visual interface for C or Assembler coding, compile, download and debug with ST7 Emulators or ST7FLITE0-INDART.

Web: http://mcu.st.com ST7

2.1.2 STVD7 Simulator

Stand-alone tool which allows to write code, compile, and simulate an ST7FLITE0 with your PC your ST7FLITE0.

Web: http://mcu.st.com ST7

2.1.3 C Compiler toolchains from Cosmic and Metrowerks

-Free evaluation version limited to 1K

-Low-cost lite C compiler limited to 8K

This compilers can be embedded in STVD7 IDE interface, or used through dedicated graphical interfaces.

Web: Cosmic Software Inc.: www.cosmic-software.com

Metrowerks: www.metrowerks.com

2.1.4 ST7 Visual Programmer - Reference: STVP7

Visual Interface allowing to program Flash, Data E2PROM, and option bytes. This is the software part of the whole programming tool package. See 4.2.3 for more details.

7/26

ST7FLITE0 QUICK REFERENCE NOTE

2.2 HARDWARE TOOLS

2.2.1 In-Circuit Debugging Kit - Reference: ST7FLITE0-INDART

ST7FLITE0-INDART includes a full-featured experiment board, an in-circuit programming utility, and all tools required to develop custom embedded applications, at low cost. 100% of electrical characteristics are guaranteed by use of a standard chip, not bondout chip.

ST7FLITE0-INDART contains STVD7 graphical interface, C compiler and assembler.

Debugging capabilities: Real-time emulation, breakpoints, step capabilities, read/write memory and registers.

Programming capabilities: Blank-check, Program, Read, Verify Flash, E2PROM memory and Option Bytes.

Notes:

1.It can be ordered from ST, or directly from Softec. Softec reference: inDART-ST7FLITE0

2.No power supply is delivered with this kit. A typical 5V may be used.

Web: http://www.softecmicro.com/indart-st7flite0.html

e-mail: info@softecmicro.com

2.2.2 ST Emulator - Reference: ST7MDT10-EMU3

Advanced development tool including:

-Real-time emulator (Advanced breakpoints management (through Bus Event Machine), 256K real-time trace recording, read/write on the fly through Watch and Memory windows, Performance analysis)

-STVD7 User Interface

-Set of probes for Lite family packages.

-Parallel interface cable to PC

-Power Supply

Note: the ST Emulator cannot program parts. Therefore, a separate device programmer is required (as ST7 Programming tool (see 4.2.3))

Web: http://mcu.st.com ST7

8/26

Loading...
+ 18 hidden pages