STM8 is an 8-bit microcontroller developed by STMicroelectronics for industrial applications and consumer electronics.
Each MCU has its own advantages and disadvantages. Compared with other 8-bit MCUs, the biggest features of STM8 8-bit MCU are:
Kernel:
o Maximum fcpu frequency, up to 24MHz, 0 wait memory access when fcpu≤16MHz
o Advanced STM8 core, based on Harvard architecture with 3-stage pipeline
o Extended instruction set
o Up to 20 MIPS @ 24 MHz
Clock, reset and power management:
o 2.95V to 5.5V operating voltage
o Flexible clock control, 4 main clock sources
o Clock security system with clock monitoring
Power Management:
o Low power modes (wait, active stop, stop)
o Peripheral clocks can be shut down individually
o Always-on low-power power-on and power-down reset
· Communication Interface:
o High-speed 1Mbit/s CAN 2.0B interface
o UART with synchronous clock output — LIN Master Mode
o UART is compatible with LIN2.1 protocol, master/slave mode and automatic resynchronization
o SPI interface up to 10Mbit/s
I2C interface up to 400Kbit/s
I/O Ports:
o GPIO pins with high current sink output
o Very robust GPIO design, with strong tolerance to backflow current
Development Support:
o Single Wire Interface Module (SWIM) and Debug Module (DM) for easy in-circuit programming and non-intrusive debugging
Cost-effectiveness:
o Compared with many current 8-bit MCUs, the price-performance ratio of STM8 is relatively high.
There are so many advantages. Although I don’t understand many of them, I will learn them slowly. First, establish a development platform:
I use IAR FOR STM8, which seems pretty good. The compiler is very efficient.
IAR download is also very simple, you can directly download the full version and the code-restricted version on the official website.
Start by creating a new project:
1. Create a workplace first. Select File>New>Workplace
2.(Create a new project, select Project>Create New Project. If you are using IAR FOR STM8, there is no need to change the default. Save and enter the Project name. The following is displayed in the workplace window
The default configuration is Debug
3. Before adding files to the project, save the Workplace and enter the name of the saved file.
The extension of Workplace is eww.
4. Add files to the project, first File>New>File, or you can directly use the shortcut keys to create a new file. Then save it.
When saving, you can create a new C folder to distinguish other files in the project, making it easier to find and call them again.
Just add the files to the project and you can start.
Right click the project name > ADD > ADD FILES to add files.
First, add the header file and configure the registers for easy calling when writing the program.
Note: Remember to set the path so that IAR can find your header files.
Open the project Option settings, add your own path in C/++compiler --PreProcessor
such as
$PROJ_DIR$H // add the H subdirectory under the directory where the project file is located
test program:
#include
void main()
{
while(1);
}
Using ST-LINK, set it up before downloading
download
No errors, ready to go...
Previous article:How to modify the STM8S library using IAR (I)
Next article:STM8L Study Notes - Unique Device ID (19)
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Gold - Sand - Wafers - Artwork - Qorvo Semiconductor
- Programmable sensor-specific detection MCU CS88F313
- [National Technology N32G457 Review] 4. PWM and breathing light test
- 【GD32L233C-START Review】 Extra 1 Solution to download problems
- How to make a jumper between the pads of two different plug-ins in PCB?
- "Core" ecosystem, "Assist" security, "Connect" the future. Registration for the 2021 STM32 China Summit and Fan Carnival is now open!
- Critical issues with naked code
- Please tell me the role of these two resistors in the circuit
- Is the naked-eye 3D large screen also made of light-emitting diodes (LED)? What is the principle?
- Comparison of TI's tms320 series DSP