Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

probleme with mikroc

Status
Not open for further replies.

RISCIT

Junior Member level 1
Junior Member level 1
Joined
Dec 30, 2011
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,441
hello guy,


i have a problem with simulation in proteus,

I have designed a little circuit to print some letters on a dot matrix display but it does not want to work anyway. I have tried many modification of my code without success, i have used a code who should be able to work where i ve seen some demo but i dont know why it not working.

All the dot stay on even if i modify the sequency of value, sometimes i display me random lighting dot

I use mikroc and proteus thanks!

here s my code
Code:
// Test

const unsigned short lettre[16] = {  0xFF, 0x01, 0xEE, 0xEE, 0xEE, 0x01, 0xFF, 0xFF,   //A
                                     0xFF, 0x00, 0x76, 0x76, 0x76, 0x89, 0xFF, 0xFF   //B
};



unsigned short repeat;
unsigned short num;
unsigned short count;
unsigned short colon;

void main(){

 TRISC=0;
 TRISD=0;
 PORTC=0;
 PORTD=0;

while(1){


for (num = 0; num < 2; num++){

      for(repeat = 0; repeat < 100; repeat++){
          colon = 1;
          for(count= num*8; count < (num*8 + 9); count++){
          PORTD = Lettre[count];
          PORTC = colon;
          delay_ms(1);
          colon = colon << 1;
          
          }
          }
          }
}



}
 

Attachments

  • schema.png
    schema.png
    27.1 KB · Views: 109

Hi, just a thought, but can you confirm that the LED matrix works in steps with some simple code that sets a column to Vout high and a row to Vout low and check the single correct LED comes on. In my PIC work from a few years back I always fell over with the default to analogue inputs on one of the ports, so check that out as well (although I would expect that to result in LED's OFF!).


Once this works, try another single column and row combination in software, then delve into your proper display software (in this lengthen the delay to try and see what is happening).
 

Attachments

  • Matrix.rar
    42.5 KB · Views: 72
  • Matrix rev1.rar
    82.8 KB · Views: 79
  • matrix.png
    matrix.png
    24.9 KB · Views: 115
Last edited:
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
What if I want to display two letters like "AB" only those two without scrolling them.

Thanks
 

As previous post, is your array/loop correct?

for(count= num*8; count < (num*8 + 9); count++)

when num is zero this is for count= 0 while less than 9, so 0 to 8, hence 9 loops...
but not sure why that would cause the symptoms you see?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top