Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED dot matrix display problem on proteus

Status
Not open for further replies.

lloydi12345

Member
I'm having hard time on simulating the letters properly on Proteus 7.7 SP2. Some LEDs are missed. I'm using PIC18f4620 I don't know if it's on the version of my software or just the codes or hardware. Here are the codes:

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() {
    latd = 0;
    latc = 0;
    TRISD = 0;
    TRISC = 0;
    ADCON0 = 0X00;
    ADCON1 = 0X0F;
    ADCON2 = 0x09;
    CMCON = 0x07;
    

    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;
               column = column<<1;
               delay_ms(10);
               }
          }
        }
    }
}

The screenshot of my simulation is on the attachment.

**broken link removed**

regards,

lloyd
 

Attachments

  • SS.JPG
    SS.JPG
    215 KB · Views: 1,393
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top