Created
August 5, 2019 06:08
-
-
Save takamame0205/30ed4ee69f7b974d0b3c8dd9ec2733c0 to your computer and use it in GitHub Desktop.
LED Blink for CH552G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CH552G test program */ | |
#include <8052.h> | |
#include <stdint.h> | |
void delay( void ); | |
void main( void ) { | |
while( 1 ) { | |
P1_1 = 0; | |
delay(); | |
P1_1 = 1; | |
delay(); | |
} | |
} | |
void delay( void ) { | |
uint16_t i; | |
for( i=0; i < 0xffff; i++ ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment