Sign In
Upload
Manuals
Brands
ST Manuals
I/O Systems
ST7 Series
ST ST7 Series Manuals
Manuals and User Guides for ST ST7 Series. We have
2
ST ST7 Series manuals available for free PDF download: User Manual, Getting Started
ST ST7 Series User Manual (317 pages)
8-BIT MCU FAMILY
Brand:
ST
| Category:
I/O Systems
| Size: 1 MB
Table of Contents
Table of Contents
3
1 Introduction
12
Who Is this Book Written for
12
About the Authors
12
How Is this Book Organized
12
Why a Microcontroller
13
Electronic Circuitry
15
Choice of Microcontroller Model
17
Choice of Development Tools
17
2 How Does a Typical Microcontroller Work
19
The Central Processing Unit
20
How the Cpu and Its Peripherals Make up a System
21
Cpu
21
Memory
21
Input-Outputs
23
Interrupt Controller
24
Bus
25
Clock Generator
25
Reset Generator
25
Core
25
Arithmetic and Logic Unit (ALU)
25
Program Counter
26
Instruction Decoder
26
Stack Pointer
26
Peripherals
27
Parallel Input-Outputs
27
Analog to Digital Converter
28
Programmable Timer
28
Serial Peripheral Interface
28
Watchdog Timer
28
The Interrupt Mechanism and How to Use It
29
Interrupt Handling
29
Hardware Mechanism
31
Hardware Sources of Interrupt
31
Global Interrupt Enable Bit
32
Software Interrupt Instruction
32
Saving the State of the Interrupted Program
32
Interrupt Vectorization
32
Interrupt Service Routine
34
Interrupt Return Instruction
34
Software Precautions Related to Interrupt Service Routines
34
Saving the y Register
34
Managing the Stack
35
Resetting the Hardware Interrupt Request Flags
35
Making an Interrupt Service Routine Interruptible
35
Data Desynchronization and Atomicity
36
Conclusion: the Benefits of Interrupts
38
An Application Using Interrupts: a Multitasking Kernel
39
Pre-Emptive Multitasking
39
Cooperative Multitasking
41
Multitasking Kernels
42
Advantages of Programming with a Multitasking Kernel
42
The Task Declaration and Allocation
42
Task Sleeping and Waking-Up
42
Multitasking Kernel Overhead
43
3 Programming a Microcontroller
45
Assembly Language
45
When to Use Assembly Language
45
Development Process in Assembly Language
46
Assembly Language
47
Assembler
48
Linker
49
The Project Builder/Make Utility
51
EPROM Burners
52
Simulators
53
In-Circuit Emulators
54
C Language
55
Why Use C
55
Tools Used with C Language
57
Debugging in C
58
Development Chain Summary
60
Application Builders
61
Fuzzy-Logic Compilers
61
4 Architecture of the St7 Core
62
Position of the St7 Within the St Mcu Family
62
St7 Core
63
Addressing Space
65
Internal Registers
65
Accumulator (A)
65
Condition Code Register (CC)
65
Index Registers (X and Y)
67
Program Counter (PC)
68
Stack Pointer (SP)
68
Instruction Set and Addressing Modes
70
A Word about Mnemonic Language
70
Addressing Modes
72
Instruction Set
73
Coding of the Instructions and the Address
74
Prefix Byte
74
Opcode Byte
75
The Addressing Modes in Detail
77
Advantages of the St7 Instruction Set and Addressing Modes
82
5 Peripherals
84
Clock Generator
84
ST72251 Miscellaneous Register
84
ST72311 Miscellaneous Register
85
Interrupt Processing
86
Interrupt Sources and Interrupt Vectors
86
Interrupts Sources for the ST72251
87
Interrupt Sources for the ST72311
88
Interrupt Vectorization
89
Global Interrupt Enable Bit
90
TRAP Instruction
91
Interrupt Mechanism
91
Saving the Interrupted Program State
91
Interrupt Service Routine
91
Restoring the Interrupted Program State: the IRET Instruction
92
Nesting the Interrupt Services
92
Parallel Input-Output Ports
94
ST72251 I/O Ports
94
ST72311 I/O Ports
96
Watchdog Timer
99
Aim of the Watchdog
99
Watchdog Description
100
Using the Watchdog to Protect an Application
103
16-Bit Timer
103
Timer Clock
104
Free Running Counter
105
Reading the Free Running Counter
105
Resetting the Free Running Counter
106
The TOF Flag
107
Input Capture Operation
108
Output Compare Operation
110
One-Pulse Mode
113
Pulse-Width Modulation Mode
115
Analog to Digital Converter
117
Description
117
Using the Analog to Digital Converter
118
The Problem of the Converter's Accuracy
119
Using the ADC to Convert Positive and Negative Voltages; Increasing Its Resolution
120
Measuring Negative and Positive Voltages
120
Increasing the Resolution
121
Application Examples
124
Serial Peripheral Interface
125
Serial Communication Interface
128
Bit Rate Generator
128
Send and Receive Mechanism
129
Status Register
132
Control Register 2
132
Using the Wake-Up Feature in a Multiprocessor System
133
Handling the Interrupts
133
6 Stmicroelectronics Programming Tools
135
Assembler
135
An Overview of the Assembler Function
135
Instruction Coding
137
Declaring Variables
138
Declaring Constants
140
Constant Data
140
Symbol Definition
141
Relocation Commands
142
What Is Relocation
142
Segment Definition
143
Using the Segment Directive in the Source File
145
Segment Allocation
146
Initialization of Variables at Power-On
148
Referencing Symbols and Labels between Modules
151
Conditional Assembly
154
Macros
156
Replaceable Parameters
157
Local Symbols
158
Conditional Statements in Macros
160
Some Miscellaneous Features
162
EQU and CEQU Pseudo-Ops
162
DEFINE Pseudo-Op
162
Numbering Syntax Directives
163
Object and Listing Files
163
Object Files
164
Listing Files
164
Linker and Ascii-Hex Converter
165
The Linking Process
165
Hex File Translator
167
The Back-Annotation Pass of the Assembler
168
Installing Winedit and the Software Tools
168
Winedit Text Editor
168
Installing Winedit
168
Configuring Winedit
169
Installing the Stmicroelectronics Software Tools
169
Building a Demonstration Program
170
Purpose of the Demonstration Program
170
Inventory of the Program Files
170
Description of the Program Files
171
The PROJECT.WPJ
171
File
171
The Main Source File, MAIN.ASM and the Timer Source File, TIMER500.ASM
173
The REG72251.ASM File and the REGISTER.INC File
176
The MAP72251.ASM File
178
The CATERPIL.BAT File
179
Using Winedit to Change and Compile the Files
180
7 Debugger and Prom Programmer Tutorial for St72251
183
Stmicroelectronics Hardware Tools
183
EPROM Programming Boards
183
Starter Kits
184
Development Kits
184
Emulators
184
Eprom Programmer Boards
184
EPROM Programmer Installation
185
Using the EPROMER Software
185
Emulator and Debugger
189
Introducing the Emulator and the Debugger
189
Installing the Emulator and the Debugger
189
Using the Debugger
193
Loading the Application
193
Running the Application
195
Watching the Registers and Variables
195
Using Inspect and Watch
197
Using Breakpoints
199
Watching the Contents of the Stack
200
Watching the Execution Trace
201
More Features to Come Later
202
Purpose of the Tutorial
202
Schematic Drawing of the Printed Circuit Board
204
Developing the Program
204
Peripherals Used to Implement the Solution
204
The Algorithm of each Task
205
A Simple Multitasking Kernel for the ST7
206
Routine
206
The Yield Routine
208
The Source Code of the Application
211
Main File (Multitsk.asm)
212
ADC Source File(Acana.asm)
216
Kernel Source File (Littlk.asm)
217
Running the Application
219
Summary Remarks
219
8 Language and the C Compiler
221
C Language Extensions for Microcontrollers
221
Description and Installation of the Hicross Tool Chain
222
Using the C Compiler
226
Memory Allocation
226
Read-Only Constants
227
EEPROM Non-Volatile Storage
228
Page Zero Variables
229
Far and Near Pointers
229
Initialization of Variables and Constant Variables
230
Inputs and Outputs
230
First Method: Using Macros
231
Second Method: Defining Variables
231
Interrupt Handling
232
Limitations Put on the Full Implementation of C Language
232
Using the Assembler
233
Using In-Line Assembler Statements Within a C Source Text
233
Single-Statement Assembler Block
233
Multiple-Statement Assembler Block
234
Using the Hiware Assembler
235
Using the Linker
235
Using the Eprom Burner
237
Project Directory Structure
239
Config Directory
239
Object Directory
241
Sources Directory
241
Hints on C Writing Style for the St7
242
Accessing Individual Bits in Registers
242
Setting Configuration Registers
245
Using Macros to Define External Devices
245
Optimizing Resource Usage
246
Define a Function When a Group of Statements Is Repeated Several Times
247
Use Shifts Instead of Multiplication and Division
247
Limit the Size of Variables to the very Minimum
248
Conclusion
248
9 Carrier-Current System for Domestic Remote Control
249
Carrier Current Control and the X-10 Standard
250
Transmitter
255
Instructions for Use
255
Description of the Electronic Circuit
255
Description of the Software
259
The Main Program
259
Timer a Capture Interrupt Service Routine
262
The Timer B Overflow Interrupt Service Routine
269
Receiver
272
Instructions for Use
272
Electronic Circuitry
272
Software
276
Interrupt Functions
276
Main Program
279
Conclusion
285
10 Second Application: a Sailing Computer
286
Theory of the Computation
288
Interfacing the Measurement Devices
291
Frequency-Type Devices: Speedometer and Wind Gauge
291
Interfacing the Speedometer
291
Interfacing the Wind Gauge
291
Using a Common Timer for both Speed Measurement Devices
292
Interfacing the Weather Vane
293
Interfacing the Display
294
Display Circuit
295
Push-Button Circuit
298
LED Circuit
299
Interfacing the Optional Personal Computer
299
Program Architecture
300
Reading and Conversion of the Speeds
300
Refreshing of the Display
302
Polling the Push-Buttons
304
Reading and Filtering the Wind Direction
305
The Periodic Interrupt Service Routine
306
Computation of the Results
307
Handling of the Serial Interface
309
Initialization of the Peripherals and the Parameters
310
Memory Allocation and Compile and Link Options
312
Conclusion
314
11 Some Last Remarks
315
Advertisement
ST ST7 Series Getting Started (14 pages)
USB LOW-SPEED EVALUATION BOARD
Brand:
ST
| Category:
Motherboard
| Size: 0 MB
Table of Contents
Introduction
3
Table of Contents
4
1 Getting Started
5
System Requirements
5
Package Contents
5
Software Installation
5
Hardware Installation
6
Power Supply
6
Jumper Settings
6
Device Selection
7
2 Running the Usb Low Speed Evaluation Board
8
Introduction
8
Hid Demonstrator
9
Usb Enumeration
9
Communication with the Evaluation Board
10
Controlling the Evaluation Board from a Host PC
10
Displaying the Evaluation Board State
10
Remote Wake up Function
10
Adding Circuitry on the Wire-Wrap Area
11
Proposal for Sdip42/Dip20 Adaptor
13
Advertisement
Related Products
ST STM32F103x6
ST STM32F103x8
ST STM32F103xB
ST STEVAL-FSM01M1
ST ST7540
ST ST7MDTU3-EMU2B
ST ST72F62
ST ST72F61
ST ST72F63B
ST ST7LIT15BY0
ST Categories
Motherboard
Computer Hardware
Microcontrollers
Control Unit
Controller
More ST Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL