Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <targets\AT91SAM7.h>
- #include "pcf8833u8_lcd.h"
- void czas(int ms){
- volatile int a,b;
- for(a=0;a<=ms;a++){
- for(b=0;b<=3000;b++){
- __asm__("NOP");
- }}}
- char napis[80];
- void zegar() {
- while (1) {
- for (int j = 0 ; j < 24 ; j ++) {
- for (int i = 0 ; i < 60 ; i ++) {
- sprintf(napis, "%02d:%02d", j, i);
- czas(500);
- LCDPutStr(napis, 100, 80, LARGE, BLACK, WHITE);
- }
- }
- }
- }
- int main (){
- InitLCD();
- SetContrast(30);
- LCDClearScreen();
- //LCDPutStr("Mikolaj", 10, 20, LARGE, BLACK, WHITE);
- LCDPutStr("Mikolaj", 30, 20, MEDIUM, BLACK, WHITE);
- LCDPutStr("Marcinkowski", 50, 20, MEDIUM, BLACK, WHITE);
- LCDSetLine(80, 10, 80, 120, BLUE); // x0, y0, x1, y1
- //LCDSetRect(80, 10, 70, 120, 0, BLUE);
- //LCDSetCircle(100,66,10,GREEN);
- //LCDSetCircle(100,66,9,GREEN);
- zegar();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement