AnsweredAssumed Answered

Clock x ports doubts

Question asked by marcelo on Nov 19, 2014
Latest reply on Mar 10, 2015 by Ian Legg

i´m new in STM8s105 microcontroller and cosmic c compiler.

i wrote a small program:

i set the clock with internall clock with prescaler 8:

CLK_CKDIVR= 0b00011000;

it means that my uc will operate at 2 MHz, right?

i set the port D3 as output pin, push pull fast:


in the main, i wrote this code:


          for (;;) {}

in my mind, if i set the port, it will in high level for 500ns, turn off for 500ms and so on... but in the scope i see times of 1us.

what i do wrong?

thanks a o lot!