Created
August 20, 2018 08:09
-
-
Save Ryanhu1015/d3012694c184900414d88d1f122c0f60 to your computer and use it in GitHub Desktop.
embedded rookie
This file contains 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
#include <stdio.h> | |
#include <SN8F5701.H> | |
void Timer0_Init(void); | |
void main(){ | |
//initial function write down here, like the one "setup" function in Arduino | |
Timer0_Init(); | |
// | |
while(1){ | |
//just like the "loop" function in Arduino | |
} | |
} | |
void Timer0_Init(){ | |
TH0=0x97; | |
TL0=0xD5; | |
//...still lots of setting below | |
//some setting here about timer0 interrupt | |
} | |
void Timer0_ISR(void) interrupt ISRTimer0{ | |
//PMW functionm, and other thing | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment