+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Newbie level 2
    Points: 858, Level: 6

    Join Date
    Mar 2008
    Posts
    2
    Helped
    0 / 0
    Points
    858
    Level
    6

    8x8 led matrix

    Hi guys.. i'm planning on displaying words through two 8x8 LED Matrix using 8051 microcontroller and C programming. i would like to make the words to move as well.
    My problem is for the coding part, what type of statement that i should use in writing the code? or do anyone has the related sample C language code that can share with me?
    Thanks..

    •   Alt7th March 2008, 08:33

      advertising

        
       

  2. #2
    Advanced Member level 1
    Points: 4,132, Level: 15

    Join Date
    May 2006
    Posts
    414
    Helped
    26 / 26
    Points
    4,132
    Level
    15

    8051 led matrix

    are using kiel ?



    •   Alt7th March 2008, 22:50

      advertising

        
       

  3. #3
    Newbie level 2
    Points: 858, Level: 6

    Join Date
    Mar 2008
    Posts
    2
    Helped
    0 / 0
    Points
    858
    Level
    6

    led matrix 8051

    you mean keil microvision? i'm using keil microvision 3..



    •   Alt14th March 2008, 07:12

      advertising

        
       

  4. #4
    Full Member level 4
    Points: 3,327, Level: 13
    Achievements:
    7 years registered

    Join Date
    Apr 2006
    Posts
    233
    Helped
    31 / 31
    Points
    3,327
    Level
    13

    led matrix display controlled by 8051

    You will need to create font lookup tables for all the characters you wish to display. You then use the ASCII code representing each letter of words you wish to display as a lookup in the font table. The best is to break your code into sections such as getting fonts, sending to display, and the scrolling part which is the easiest ... simply move the index into your string to the next character. This will then look like this.

    //this routine will most likely be called from an interrupt
    // just a rough guide to get you thinking - will need some extra stuff :)

    FontIndex = StartOfFontTable[(STringToDisplay[ScrollingIndex])];
    FontStart = FontIndex;
    while(FontIndex < FontStart + NumberOfLinesInCharacter)
    {
    OutPut(FonTable[FontIndex ]);
    FontIndex++;

    }



  5. #5
    Full Member level 2
    Points: 2,523, Level: 11
    Achievements:
    7 years registered

    Join Date
    Jan 2008
    Location
    india
    Posts
    133
    Helped
    7 / 7
    Points
    2,523
    Level
    11

    8x8 led

    Instead of using c use assembly language
    For more detail contact on the following link
    http://www.thestudentproject.com/pro...oj_MC-8051.htm - 30k -



    •   Alt15th March 2008, 05:44

      advertising

        
       

  6. #6
    Newbie level 4
    Points: 580, Level: 5

    Join Date
    Aug 2010
    Posts
    7
    Helped
    2 / 2
    Points
    580
    Level
    5

    Re: 8x8 led matrix

    // Amir Rasheed
    // 0345-5917219
    //************************************************** ****************************

    #include <reg51.h>
    #include "table.h" //defined lookup table for MMD LED patern
    #define set 1
    #define reset 0
    unsigned char bdata temp; // bit addressable memory location variable
    sfr port2 = 0xA0; // port2 is used for row scanning attached with 74LS145
    sbit MSB=temp^7; // MSB bit of temp variable to make data serialized
    sbit clk = P3^2; // Clock Pin 3/12 ----> MBI5026/8051 P3^2 PIN_12
    sbit sdata = P3^3; // port pin for data Serialization P3^3 PIN_13


    unsigned char scan[8]={0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7}; //Row selection
    unsigned char ser_copy[]={"AMIR"}; // store incomming 5 characters

    void main()
    {
    unsigned char row,col,count,i;

    while (1)
    {
    for (col=0; col<8; col++) // loop for selecting columns
    {
    for (i=0; i<4; i++) // loop for INSERTING WORDS
    {
    row = ser_copy[i];
    row = row-0x0D; //staring hex code of lookup table is 0x0d
    {
    temp = matrix_arr[row][col];
    for (count=0; count<8; count++) //SERIALIZATION
    {
    clk=0; // low to high transition
    sdata = MSB; // (serial data to MMd) sdata = P3^1
    clk = 1; // (for MMD) clk = P3^2
    temp = temp << 1; // bit addressable memory location
    }
    }
    }
    port2 = scan[col]; // connected to 4 to 10 decoder/driver
    delay_ms(2); // For low or high intensity of LEDs
    port2 = 0xff;
    }
    }
    }

    ---------- Post added at 15:28 ---------- Previous post was at 15:26 ----------

    The code i have given to you is not based on INTERRUPTS ... its just to provide you an idea of coding it but for better control and brightness you must use interrupts.

    Make a lookup table for your desired font.

    Regards

    Amir Rashid
    Engr. Electronics
    NADRA HQs, Islamabad


    1 members found this post helpful.

--[[ ]]--