SW
for STM8S
When you send e-mail for SW request, please remember to specify:
SW requested (ref.cod.)
Your name
Your city
Your country
See e-mail example below.
+ The example explains how to configure TIM1 and TIM4 to generate two time bases.
+ TIM1 Interrupt 100uS that drive PC4 and PC5 (see below)
+ TIM4 Interrupt 1mS that blink LED every 500mS.
+ All the SW works under Interrupt.
+ Here there are the explanations
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8-Discovery-TIM1&TIM4
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ Click here to go to the explanations.
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8-Test-STLinkV2
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+
Internal 16MHz rc
+ EEPROM test at
address 0x40A5 using
declaration @near unsigned char
EVal4000 @0x4000;
+ Read Byte
+ Complement Byte
+ Write Complement
Byte
+ Test if Write is
OK
+ LCD show the
EEPROM test
+ SysTick TIM4
approximately 4mS on
LED4
author: Enrico
M.
version: STM
Library V1.1.0
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8S-ex1
in
the body of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ Internal 16MHz rc
+ EEPROM test at
address 0x40A5
+ Read Byte
+ Complement Byte
+ Write Complement
Byte
+ Test if Write is
OK
+ LCD show the
EEPROM test
+ SysTick TIM4
approximately 4mS on LED4
author: Enrico
M.
version: STM
Library V1.1.0
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8S-ex2
in
the body of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ Internal 16MHz rc
+ ADC read PE6 -
AIN9 connected to
Potentiometer
+ Include a Bubble
Short using for
stabilize the ADC result
+ LCD show the ADC
value of the
Potentiometer
+ SysTick TIM4 1mS
+ KEY button (uder
Interupt) to On/Off
LCD light
+ Auto OFF LCD
light
author: Enrico
M.
version: STM
Library V1.1.0
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8S-ex3
in
the body of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ Tested everything with
STM8S208 to 16MHz
+ DELAY
are obviously related to the frequency of micro (16Mhz)
+ Hitachi HD44780 interface
+ 8 characters "built" in CGRAM
author: Giorgio R.
version: STM
Library V1.1.0
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8S-ex4
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ Tested on STM8S Discovery
+ Touch Sensing Library ver.2.3.0
+ Click here to go to the explanations.
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8-Discovery-Touch-Sensitivity
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ TIM4 1mS tested on STM8S Discovery
+
Tested with Cosmic C Compiler, the tree of the project is:
+ Here there are the explanations
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8-Discovery-TIM4
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.
+ In
this tutorial, we will be debouncing the swith using the timer and interrupt.
+
Tested with Cosmic C Compiler, the tree of the project is:
+ Here there are the explanations
ATTENTION: This is a
free example but it is
protected by a password, please send me an e-mail and:
in the
subject (oggetto)
write:
STM8-Discovery-TIM4-Input_with_Debounce
in the body
of e-mail write:
your Name - City - Country
and I will send you
the password to open it.
Click here
to
send e-mail.