Guest User

Untitled

a guest
Aug 20th, 2015
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <iostm8s103f3.h>
  2.  
  3. main( void )
  4. {
  5.   PD_DDR = 0x0f; //sets port to output mode
  6.   while(1){
  7.     PD_ODR_ODR3 = 1; //turns pin3 on
  8.    
  9.     //delay
  10.     int k = 0;
  11.     for(int i = 0; i < 1000000; i++){
  12.       k++;
  13.     }
  14.    
  15.     PD_ODR_ODR3 = 0; //turns pin3 off
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment