STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

ADC input pin is driving a constant voltage of 2.9V

Using a resistor voltage divider (100k+47k) to break a range of 11V - 14V down to an ADC input range below 5V. For 11V i expect 3.5V, for 14V I expect it to be 4.5V.(see schematic)STM8s903 - ADC_IN_2 on PC4 (physical pin 14)IAR embedded workbench 3...

0693W00000Dlmz8QAB.png
Mnemocron by Associate III
  • 584 Views
  • 1 replies
  • 0 kudos

#error cpstm8 main.c:1(0+7) missing ;

include "stm8s.h"             #ifdef USE_FULL_ASSERT   /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: a...

MKUMA.31 by Associate
  • 818 Views
  • 1 replies
  • 0 kudos

STM8S TIM2 Interrupt not working

Hi, I'm trying to Implement an interrupt every 60 seconds, however something is missing. The TIM2 itself is working but can't seem to generate any interrupt. Any idea on what am i missing? The following is the code I am using. thanks //Required Hea...

SAlam.1 by Associate
  • 1508 Views
  • 3 replies
  • 0 kudos

Switch relay synchronously in 0 passage (50Hz)

i am trying to switch a relay via the stm8s001 processor synchronously in the 0 pass. how could I realize that.i have an imput signal of 50 Hz. I can also start the timer, but I don't know how to switch the relay on exactly in the 0 cycle.(i watch th...

Resolved! STM8AF Bootloader CAN write memory.

I'm trying to write a program to the microcontroller through the bootloader via the СAN interface.First I pass message ID 0x7f to activate bootloader. (ID=0x02, data=0x79)Then I transfer the file "E_W_ROUTINEs_128K_ver_2.0.s19" in binary form to addr...

MR.9 by Associate
  • 764 Views
  • 1 replies
  • 0 kudos

How to generate PWM with offset / delay?

I need to generate two signals as shown below.I need to be able to adjust A and B independently. Is there some way to use TIMER1's OC1 and OC2? I can't figure out how to make an offset in the output compares - everything seems to start at the main co...

0693W00000Dq2rmQAB.png
EAnde.3 by Associate II
  • 1695 Views
  • 4 replies
  • 0 kudos

How to SWITCH HSI to LSE for STM8L152C6 discovery board?

When I switch HSI to LSE using IAR, there is always an error that "Failed to get execution status: SWIM error [30004]: Comm timeout"There is switch function:void HSI_TO_LSE(void){   if(CLK_SCSR!=0x08)    // if LSE is not selected as the system clock ...

FCai.1 by Associate
  • 472 Views
  • 0 replies
  • 0 kudos

How to generate a sinusoidal PWM with variable frequency?

I'm trying to generate a sinusoidal PWM on STM8, but it's for an equipmetn that the user will change the frequency of the output sine wave while the PWM is running. I was able to generate a sinusoidal pwm easily for a fixed frequency, using a table I...