I write a program to display some number on 7seg dispaly by port 0. And i have a problem, if i want to do it with port for exmaple 2 i works great. By when i use port 0 it does not work. What i do wrong. Here is my code:
#include <REGX52.H>
char wyswietlacz[2]={0x06, 0x06};
void wyswietlanie(){
P0=0x30 ;
P2_0=0x01;
P2_1=0x00;
P2_0=0;
P2_1=0;
P0=0x30 ;
P2_0=0;
P2_1=1;
P2_0=0;
P2_1=0;
}
void main(void){
while(1){
wyswietlanie();
}
}