Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <REGX52.H>
- unsigned char key, key1;
- unsigned char znak[] = {0xFE,0xFD,0xFB,0xF7};
- void analiza (unsigned char x, unsigned char y)
- {
- if(x != y) P2 = x;
- }
- void main(void)
- {
- while(1)
- {
- for(int i=0; i<4; i++)
- {
- P0 = znak[i]; // 1111 1110
- key1 = znak[i];
- key = P0; // odczyt
- analiza(key,key1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment