lloydi12345
Member level 4
I'm having hard time on simulating the letters properly on Proteus 7.7 SP2. Some LEDs are missed. I don't know if it's on the version of my software or just the codes or hardware. Here's a screenshot of my problem on displaying letter B:
here's the code:
Thanks in advance for your help.
here's the code:
Code:
const unsigned short letters[16] = {
0xFF, 0x01, 0xEE, 0xEE, 0xEE, 0x01, 0xFF, 0xFF, //A
0xFF, 0x00, 0x76, 0x76, 0x76, 0x89, 0xFF, 0xFF //B
};
unsigned short column, num, repeat, count;
void main() {
LATA = 0;
LATB = 0;
LATC = 0;
TRISA = 0;
TRISD = 0;
TRISC = 0;
CMCON = 0x07;
column = 1;
while(1) {
for (num=0;num<2;num++){
for (repeat=0; repeat<20; repeat++){
column = 1;
for (count = num*8;count < (num*8+8);count++){
portd = letters[count];
portc = column;
delay_ms(10);
column = column<<1;
}
}
}
}
}
Thanks in advance for your help.