Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* MAIN.C file
- *
- * Copyright (c) 2002-2005 STMicroelectronics
- */
- #include "st72334n2.h"
- void delay(int x)
- {
- int i = 0;
- while(i < x)
- {
- i++;
- }
- }
- main()
- {
- MCCSR |= 0b00001010;
- MCCSR &= ~0b00000100;
- PDDDR |= 0b11111110;
- PDOR |= 0b11111110;
- PADDR |= 0b00001101;
- PAOR |= 0b00001101;
- #asm
- RIM
- #endasm
- while(1)
- {
- PADR |= 0b00001000;
- PDDR |= 0b01111110; //ustawiamy 0
- PDDR &= 0b01111110;
- PDDR |= 0b00110000; //ustawiamy 1
- PDDR &= 0b00110000;
- PDDR |= 0b11011010; //ustawiamy 2
- PDDR &= 0b11011010;
- PDDR |= 0b11111000; //ustawiamy 3
- PDDR &= 0b11111000;
- PDDR |= 0b10110100; //ustawiamy 4
- PDDR &= 0b10110100;
- PDDR |= 0b11101100; //ustawiamy 5
- PDDR &= 0b11101100;
- PDDR |= 0b11101110; //ustawiamy 6
- PDDR &= 0b11101110;
- PDDR |= 0b00111000; //ustawiamy 7
- PDDR &= 0b00111000;
- PDDR |= 0b11111110; //ustawiamy 8
- PDDR &= 0b11111110;
- PDDR |= 0b11111100; //ustawiamy 9
- PDDR &= 0b11111100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement