Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Prace na PHS v0.4.0 (20.05.2010) by Bystroushaak (bystrousak@kitakitsune.org)
- *
- * Poznamky;
- *
- */
- #include "displej.c"
- #include "own_functions.c"
- void printStartMessage(void){
- clrdsp();
- puts(" Vlna nahoru\nStart: 0 Stop: 3");
- }
- void printPauseMessage(void){
- clrdsp();
- puts("Provadim ...\nPauza: 3");
- }
- void waitForKey(char key){
- char oldch, ch;
- while ((ch = getchar()) != key){
- oldch = ch;
- }
- beep();
- }
- void main(void){
- int var = 0;
- byte i = 11;
- byte stat = 0;
- char counter = 0;
- init_interrupts();
- LCD_Init();
- ledBarInit();
- printStartMessage();
- waitForKey('0');
- //ledBarShow(var);
- //waitam();
- while (1){
- while (i--){
- if (!stat){
- var = setBitUInt(var, i - 1, 1);
- counter++;
- }else{
- var = setBitUInt(var, i - 1, 0);
- counter--;
- }
- if (counter == 0)
- continue;
- ledBarShow(var);
- waitam();
- }
- i = 11;
- stat = ~stat;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement