file Standard bliniking program not working?

  • kyson's Avatar Offline school
  • New Member
  • New Member
    • Posts: 3
    • Thank you received: 3
  • arrow_drop_downMore arrow_drop_upLess
kyson Posted 3 weeks 4 days ago
#30342
Hello, everyone!
I am trying to get a standard linking led program running on my STM8S103F3P6 development board but I am not sure what I am doing wrong. I connected a LED to PIN D3, this is my code:
#include <stm8s. h>
void
delay_ ms (uint16. _t ms) ;
void
delay_ _ms(uint16 _t ms) {
while
(ms- -) {
uint16_ t i;
for
(i = 0:i< ms; i++){
nop () ;
}
}
}
main()
{
GPI0D- >DDR |=0x03;
//PD3 as Output
GPI0D- >CR1 |=0x03:
//PD3 as Push Pull
while
GPI0D- >0DR|=(1<<3) :
//turn PD3 on
de1ay_ ms (1000):
GPI0D->0DR&=' ~ (1<<3) ;
//turn PD3 off
delay_ ms (1000) :
}
}

Please Log in or Create an account to join the conversation.

  • jasonjohnsons's Avatar Offline
  • New Member
  • New Member
    • Posts: 3
    • Thank you received: 0
  • arrow_drop_downMore arrow_drop_upLess
jasonjohnsons Posted 4 days 23 hours ago
Last edit: 4 days 23 hours ago by jasonjohnsons. info_outline
#30385
I remember I wrote an article about blinking program and how to use it at home. Will take a look for you to read more . I remember that I did deep research.

Please Log in or Create an account to join the conversation.

Moderators: Moderator
menu
close
Menu
person_outline
arrow_back
You are here: Home Forum Advanced Topics DIY, Mods and Tweaks Standard bliniking program not working?