Posted on March 23, 2013 at 18:04
I'm trying to compare an input string, and using the COSMIC C environment. I've had no luck with their supplied strcmp function, so I gave up and wrote my own...
But still wondering what is wrong...
...
Posted on January 13, 2013 at 18:58
I wanted to see how fast the gpio pins can be 'pulsed', so I created the following piece of code:
/* Switch to 16Mhz Crystal Osc clock */
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO, CLK_SOURCE_HSE...
Posted on July 07, 2012 at 20:24I found something very funny/weird when using TIM1 to measure the frequency of a signal: Set TIM2 and TIM1 to use the same prescaler (e.g. 8). TIM2 is configured to generate PWM with period 10000, in this case resulti...
Posted on June 13, 2012 at 21:02The original post was too long to process during our migration. Please click on the attachment to read the original post.
Posted on February 20, 2012 at 12:46I was trying to get the ADC working on an STM8S discovery, but left and right alignment setting of the ADC gives different results. In the file stm8s_adc1.c of the standard firmware library there is:/* Left alignm...
Posted on December 16, 2013 at 11:30I did a basic RPM counter a while back, using the STM8S105 demo board. Maybe you can use the code: https://sites.google.com/site/klaasdc/stm8s-projects/rpm-counter-1
Posted on February 08, 2013 at 15:45I once had problems with I2C on the 105c6 because these pins have no internal pull up function. Maybe you have the same problem? There was more here: https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8SDiscov...
Posted on February 06, 2013 at 15:20Apologies if this a stupid remark, but it is not clear to me why the int cast is only done after the subtraction. To me, the result cannot be negative because it is an unsigned value, so it is wrapped, and then yo...
Posted on February 01, 2013 at 13:00Maybe ''unsigned int'' is uint8_t internally. You can check this in the types.h files. What if you try specifying uint16_t directly?