Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <REGX52.H>
- typedef unsigned char byte;
- byte xdata CRVENE _at_ 0x8000;
- byte xdata PLAVE _at_ 0x8003;
- unsigned char stanja[]={0xFE,0xFC,0xF8,0xF0};
- void main()
- {
- unsigned char var1;
- PLAVE=0x01;
- while(1)
- {
- SW12=~CRVENE&0x03;
- //SW3=~CRVENE&0x04;
- switch(SW12){
- case 0x00:
- PLAVE=stanja[0];
- break;
- case 0x01:
- PLAVE=stanja[1];
- break;
- case 0x02:
- PLAVE=stanja[2];
- break;
- case 0x03:
- PLAVE=stanja[3];
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement