8x8 Scrolling LED display (Simple example)


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    hello again I menaged to display letter M on 5x7 dot matrix with this changed code is this a good solution
    Code:
    ' SIMPLE 8X8 LED MATRIX SCROLLING EXAMPLE
    ' 16F872 External 4MHz Xtal Osc
    ' LED Matrix columns are conected to PORTC pin rc0 via ULN2004AN and CD4017 to 0v.
    ' RC1 reset for 4017
    ' LED Matrix rows conected to PORTB via 100 ohm resistors (Resistor value dependant on LEDs used)
    ' RB0 - top row
    ' MCLR (pin1) connected via 4K7 to +5v supply.
    '
    ' today
    '***************************************************************************************
    Device 16F877A
    TRISB = %00000000
    TRISC = %00000000
    PORTB=0
    PORTC=0
    	kolona		var	Byte
    	brojac		var	Byte
    	scan 		var Byte
    	scroll		var	Byte
    	leddata		VAR Byte[5]
    
    START:
    
    	Clear  				
    
    	leddata[0] = $FF	'start of 'm'
    	leddata[1] = $40 
    	leddata[2] =$20
    	leddata[3] =$40
    	leddata[4] = $FF
    LOOP:
     
    	'For scroll =  0 To 34
    		
    	For scan = 0 To 12	' scan speed
    		PORTC.1 = 1  'reseting 4017
                PORTC.1 =0
    			For kolona = 0 To 4
    			PORTC.0 = 1 'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
    				DelayUS 500
                    PORTB=0				
    			Next
    	Next 
    
    	GoTo START
    End
    any idea how to change letters????
    Last edited by xxxxxx; - 6th February 2011 at 14:42.

  2. #2
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    now i manage to change code to show leter M and then some simbol with duration of 500ms,
    Code:
    Device 16F877A
    Xtal 8
    TRISB = %00000000
    TRISC = %00000000
    PORTB=0
    PORTC=0
    	kolona		var	Byte
    	brojac		var	Byte
    	scan 		var Byte
    	scroll		var	Byte
    	leddata		VAR Byte[10]
    
        brojac=0
    START:	
    Clear
    	leddata[0] = $FF	'start of 'm'
    	leddata[1] = $40 
    	leddata[2] =$20
    	leddata[3] =$40
    	leddata[4] = $FF
    	leddata[5] = $0f	'start of 'z'
    	leddata[6] = $f0 
    	leddata[7] =$0f
    	leddata[8] =$f0
    	leddata[9] = $0F
    LOOP: 
            
          For scroll = 0 To 1
               
             PORTC.1 = 1  'reseting 4017
             PORTC.1 =0	
             For scan = 0 To 500
    			For kolona = 0 To 4
    				PORTC.0 = 1 'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
    				DelayMS 1
                    PORTB=0     	
    		    Next
             Next
             For brojac = 0 To 4
            leddata[brojac]=leddata[brojac+5]
            Next
            Next   
    GoTo START
    End
    is this good solution....i am trying to build up my programing skills , i was playing with PLC's for 2 year so i forgot even basic stuff...evantally i am going to build BABY ON BOARD with 4 5x7 dot matrix and cascade 4017, srolling static going up going down...so i need help

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    I have seen those yellow B.O.B. signs for years and have always questioned their logic. It seems to me if I am maniacal enough to kill you in traffic, is not taking out your offspring a bonus? A scrolling B.O.B. sign might just be the trigger . . . Ugh, not for ME but THEY are out there.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    well i hope i will triger a nicer behavior in trafic..... or i could scroll ...eat my dust... that would be a good treiger !!!

  5. #5
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    hello this may help, I have eeprom values for displaying characters this should fit on pic's with larger eeprom storage such as a 16f877
    the code snippet reads the eeprom characters into the leddata varible and should display them scrolling.....well hopefully i havnt tested myself!

    Code:
    	eeprom 0,[%00111110,%01010001,%01001001,%01000101,%00111110]	'0
    	eeprom 5,[%00000000,%01000010,%01111111,%01000000,%00000000]	'1
    	eeprom 10,[%01000010,%01100001,%01010001,%01001001,%01000110]	'2
    	eeprom 15,[%00100001,%01000001,%01000101,%01001011,%00110001]	'3
    	eeprom 20,[%00011000,%00010100,%00010010,%01111111,%00010000]	'4
    	eeprom 25,[%00100111,%01000101,%01000101,%01000101,%00111001]	'5
    	eeprom 30,[%00111100,%01001010,%01001001,%01001001,%00110000]	'6
    	eeprom 35,[%00000001,%01110001,%00001001,%00000101,%00000011]	'7
    	eeprom 40,[%00110110,%01001001,%01001001,%01001001,%00110110]	'8
    	eeprom 45,[%00000110,%01001001,%01001001,%00101001,%00011110]	'9
    	eeprom 50,[%00000100,%00000110,%01111111,%00000110,%00000100]	'Up Arrow
    	eeprom 55,[%00010000,%00110000,%01111111,%00110000,%00010000]	'Dn Arrow
    	eeprom 60,[%01111110,%00010001,%00010001,%00010001,%01111110]	'A
    	eeprom 65,[%01111111,%01001001,%01001001,%01001001,%00110110]	'B
    	eeprom 70,[%00111110,%01000001,%01000001,%01000001,%00100010]	'C
    	eeprom 75,[%01111111,%01000001,%01000001,%00100010,%00011100]	'D
    	eeprom 80,[%01111111,%01001001,%01001001,%01001001,%01000001]	'E
    	eeprom 85,[%01111111,%00001001,%00001001,%00001001,%00000001]	'F
    	eeprom 90,[%00111110,%01000001,%01001001,%01001001,%01111010]	'G
    	eeprom 95,[%01111111,%00001000,%00001000,%00001000,%01111111]	'H
    	eeprom 100,[%00000000,%01000001,%01111111,%01000001,%00000000]	'I
    	eeprom 105,[%00100000,%01000000,%01000001,%00111111,%00000001]	'J
    	eeprom 110,[%01111111,%00001000,%00010100,%00100010,%01000001]	'K
    	eeprom 115,[%01111111,%01000000,%01000000,%01000000,%01000000]	'L
    	eeprom 120,[%01111111,%00000010,%00000110,%00000010,%01111111]	'M
    	eeprom 125,[%01111111,%00000100,%00001000,%00010000,%01111111]	'N
    	eeprom 130,[%00111110,%01000001,%01000001,%01000001,%00111110]	'O
    	eeprom 135,[%01111111,%00001001,%00001001,%00001001,%00000110]	'P
    	eeprom 140,[%00111110,%01000001,%01010001,%00100001,%01011110]	'Q
    	eeprom 145,[%01111111,%00001001,%00011001,%00101001,%01000110]	'R
    	eeprom 150,[%01000110,%01001001,%01001001,%01001001,%00110001]	'S
    	eeprom 155,[%00000001,%00000001,%01111111,%00000001,%00000001]	'T
    	eeprom 160,[%00111111,%01000000,%01000000,%01000000,%00111111]	'U
    	eeprom 165,[%00011111,%00100000,%01000000,%00100000,%00011111]	'V
    	eeprom 170,[%00111111,%01000000,%00110000,%01000000,%00111111]	'W
    	eeprom 175,[%01100011,%00010100,%00001000,%00010100,%01100011]	'X
    	eeprom 180,[%00000111,%00001000,%01110000,%00001000,%00000111]	'Y
    	eeprom 185,[%01100001,%01010001,%01001001,%01000101,%01000011]	'Z
    	eeprom 190,[%00100000,%00010000,%00001000,%00000100,%00000010]	'/
    
    	leddata	var	byte[80]
    
    	
    START:
    	CLEAR
    	FOR counter = 0 TO 4
    		READ counter+65, leddata [counter+5]	'B
    		READ counter+60, leddata [counter+11]	'A
    		READ counter+65, leddata [counter+17]	'B
    		READ counter+189, leddata [counter+23]	'Y
    
    		READ counter+130, leddata [counter+32]	'O
    		READ counter+125, leddata [counter+38]	'N
    
    		READ counter+65, leddata [counter+47]	'B
    		READ counter+130, leddata [counter+53]	'O 
    		READ counter+60, leddata [counter+59]	'A
    		READ counter+145, leddata [counter+65]	'R
    		READ counter+75, leddata [counter+71]	'D 	
    	NEXT
    
    LOOP: 
    
    	FOR scroll = 0 TO 77
    		FOR scan = 0 TO 15
    			PORTC = 1
    			FOR counter = 0 TO 7
    				PORTB = leddata [counter]
    				PAUSEUS 1500 
    				PORTB = 0		'This helps prevent ghosting
    				PORTC = PORTC * 2
    			NEXT
    		NEXT 
    		FOR counter = 0 TO 78
    			leddata [counter] = leddata [counter+1]	' *** SHIFTS DATA IN leddata ARRAY DOWN.***
    		NEXT 
    	NEXT
    	GOTO START
    End
    you will have to modify the loop section to suit your 4017 setup

  6. #6
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    of course this is helpful here is the code that i changed, i know there is a beter way to feed variable but this is for testing and is the siplest way...thx for helping and insiration


    and link for video.

    Code:
     
    '*************************************************  ***************
    ' SIMPLE 14X8 LED MATRIX SCROLLING EXAMPLE
    ' LED Matrix columns are conected to PORTC pin rc0 via ULN2003 and CD4017.
    ' RC1 reset for 4017
    ' LED Matrix rows conected to PORTB via 100 ohm resistors (Resistor value dependant on LEDs used)
    ' RB0 - top row
    ' MCLR (pin1) connected via 4K7 to +5v supply.
    '
    ' today
    '*************************************************  **************************************
    Device 16F877A
    Xtal 8
    TRISB = %00000000
    TRISC = %00000000
    PORTB=0
    PORTC=0
        kolona        var    Byte
        brojac        var    Byte
        scan                 var Byte
        scroll                 var    Byte
        leddata        VAR Byte[47]
    START:    
    Clear
     
            leddata[0] = $FF    
        leddata[1] = $91 
        leddata[2] =$91
        leddata[3] =$90
        leddata[4] = $01
        leddata[5] = $01    
        leddata[6] = $ff 
        leddata[7] =$01
        leddata[8] =$01
        leddata[9] = $46
        leddata[10] = $89    
        leddata[11] = $99 
        leddata[12] =$b1
        leddata[13] =$62
            leddata[14] = $00      'start smjalija
            leddata[15] = $00
            leddata[16] = $00
        leddata[17] = $7e 
        leddata[18] =$81
        leddata[19] =$95
        leddata[20] = $a1
        leddata[21] = $a1    
        leddata[22] = $95 
        leddata[23] =$81
        leddata[24] =$7e
            leddata[25] =$00
        leddata[26] =$00
            leddata[27] = $00 
            leddata[28] = $00
     
     
     LOOP: 
     For scroll = 0 To 1 ' NUMBER OF LETERS or changes display TO SHOW
     
             For scan = 0 To 185
     
             PORTC.1 = 1                       'reseting 4017
             PORTC.1 =0    
                For kolona = 0 To 13
                    PORTC.0 = 1  'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
                    DelayUS 250
                    PORTB=0         
                Next
             Next
             For brojac = 0 To 14
            leddata[brojac]=leddata[brojac+14]
            Next
            Next
    GoSub scrolling  
    GoTo START
    End    
    scrolling:
        leddata[0] = $00
        leddata[1] = $00
        leddata[2] = $00
        leddata[3] = $00
        leddata[4] = $00
            leddata[5] = $00
        leddata[6] = $00
        leddata[7] = $00
        leddata[8] = $00
        leddata[9] = $00
            leddata[10] = $00
        leddata[11] = $00
        leddata[12] = $00
        leddata[13] = $00
        leddata[14] = $00
            leddata[15] = $00
        leddata[16] = $00
        leddata[17] = $00
            leddata[18] = $FF    'start of 'E'
        leddata[19] = $91 
        leddata[20] =$91
        leddata[21] =$81
        leddata[22] = $81
        leddata[23] = $00
        leddata[24] = $01    'start of 'T'
        leddata[25] = $01 
        leddata[26] =$ff
        leddata[27] =$01
        leddata[28] = $01
        leddata[29] = $46    'start of 'S'
        leddata[30] = $89 
        leddata[31] =$99
        leddata[32] =$b1
        leddata[33] = $62
        leddata[34] = $00    'start of '!'
        leddata[35] = $00 
        leddata[36] =$df
        leddata[37] =$00
        leddata[38] =$00
           For scroll = 0 To 38 ' NUMBER OF LETERS TO SHOW
     
     
             For scan = 0 To 25
                      PORTC.1 = 1  'reseting 4017
             PORTC.1 =0    
                For kolona = 0 To 14
                    PORTC.0 = 1 'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
                    DelayUS 300
                    PORTB=0         
                Next
             Next
             For brojac = 0 To 37
            leddata[brojac]=leddata[brojac+1]
            Next
            Next 
    Return
    Last edited by ScaleRobotics; - 8th February 2011 at 00:47. Reason: changed to video tags for video

  7. #7
    Join Date
    Apr 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    Quote Originally Posted by xxxxxx View Post
    of course this is helpful here is the code that i changed, i know there is a beter way to feed variable but this is for testing and is the siplest way...thx for helping and insiration


    and link for video.

    Code:
     
    '*************************************************  ***************
    ' SIMPLE 14X8 LED MATRIX SCROLLING EXAMPLE
    ' LED Matrix columns are conected to PORTC pin rc0 via ULN2003 and CD4017.
    ' RC1 reset for 4017
    ' LED Matrix rows conected to PORTB via 100 ohm resistors (Resistor value dependant on LEDs used)
    ' RB0 - top row
    ' MCLR (pin1) connected via 4K7 to +5v supply.
    '
    ' today
    '*************************************************  **************************************
    Device 16F877A
    Xtal 8
    TRISB = %00000000
    TRISC = %00000000
    PORTB=0
    PORTC=0
        kolona        var    Byte
        brojac        var    Byte
        scan                 var Byte
        scroll                 var    Byte
        leddata        VAR Byte[47]
    START:    
    Clear
     
            leddata[0] = $FF    
        leddata[1] = $91 
        leddata[2] =$91
        leddata[3] =$90
        leddata[4] = $01
        leddata[5] = $01    
        leddata[6] = $ff 
        leddata[7] =$01
        leddata[8] =$01
        leddata[9] = $46
        leddata[10] = $89    
        leddata[11] = $99 
        leddata[12] =$b1
        leddata[13] =$62
            leddata[14] = $00      'start smjalija
            leddata[15] = $00
            leddata[16] = $00
        leddata[17] = $7e 
        leddata[18] =$81
        leddata[19] =$95
        leddata[20] = $a1
        leddata[21] = $a1    
        leddata[22] = $95 
        leddata[23] =$81
        leddata[24] =$7e
            leddata[25] =$00
        leddata[26] =$00
            leddata[27] = $00 
            leddata[28] = $00
     
     
     LOOP: 
     For scroll = 0 To 1 ' NUMBER OF LETERS or changes display TO SHOW
     
             For scan = 0 To 185
     
             PORTC.1 = 1                       'reseting 4017
             PORTC.1 =0    
                For kolona = 0 To 13
                    PORTC.0 = 1  'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
                    DelayUS 250
                    PORTB=0         
                Next
             Next
             For brojac = 0 To 14
            leddata[brojac]=leddata[brojac+14]
            Next
            Next
    GoSub scrolling  
    GoTo START
    End    
    scrolling:
        leddata[0] = $00
        leddata[1] = $00
        leddata[2] = $00
        leddata[3] = $00
        leddata[4] = $00
            leddata[5] = $00
        leddata[6] = $00
        leddata[7] = $00
        leddata[8] = $00
        leddata[9] = $00
            leddata[10] = $00
        leddata[11] = $00
        leddata[12] = $00
        leddata[13] = $00
        leddata[14] = $00
            leddata[15] = $00
        leddata[16] = $00
        leddata[17] = $00
            leddata[18] = $FF    'start of 'E'
        leddata[19] = $91 
        leddata[20] =$91
        leddata[21] =$81
        leddata[22] = $81
        leddata[23] = $00
        leddata[24] = $01    'start of 'T'
        leddata[25] = $01 
        leddata[26] =$ff
        leddata[27] =$01
        leddata[28] = $01
        leddata[29] = $46    'start of 'S'
        leddata[30] = $89 
        leddata[31] =$99
        leddata[32] =$b1
        leddata[33] = $62
        leddata[34] = $00    'start of '!'
        leddata[35] = $00 
        leddata[36] =$df
        leddata[37] =$00
        leddata[38] =$00
           For scroll = 0 To 38 ' NUMBER OF LETERS TO SHOW
     
     
             For scan = 0 To 25
                      PORTC.1 = 1  'reseting 4017
             PORTC.1 =0    
                For kolona = 0 To 14
                    PORTC.0 = 1 'clock 4017
                    PORTC.0 =0
                    PORTB = leddata[kolona]
                    DelayUS 300
                    PORTB=0         
                Next
             Next
             For brojac = 0 To 37
            leddata[brojac]=leddata[brojac+1]
            Next
            Next 
    Return
    Dear sir,
    can u put the schamatic for this project that u designed 14*8 matrix
    thanks

  8. #8
    Join Date
    Jul 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    im use pic 16f877a... please help me... anybody also can help me...

  9. #9
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    Quote Originally Posted by xxxxxx View Post
    well i hope i will trigger a nicer behavior in trafic..... or i could scroll ...eat my dust... that would be a good trigger !!!
    Owing to where you live, your city has about 60 square miles more space and 3.5 million less people, which all somewhat resemble one another, you will very likely not encounter a problem there. Not so lucky here.
    HERE you see drivers with signage, they are usually the worst drivers on the road, I got behind one last month with Oregon plates, Obama and Save The Whales stickers waiting to turn left on a green light when the opposing traffic was facing a red light, and she sat and waited while they turned right in front of her. In LA LA Land eat my dust might just get a body shot. Sadly, It happens here, not a lot, but it happens.
    Good luck with your project, it looks like you have gotten a handle on it, I was thinking, if you only want one message, why include the entire alphabet? It would seem you only need a few letters (7), or are you intending to make an ever changing string ?
    EDIT: the above (last paragraph) is in reference to your earlier code, actually wellyboot's code or for about $20 you can get a license plate frame with this feature built in.
    Last edited by Archangel; - 9th February 2011 at 05:16.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  10. #10
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    Quote Originally Posted by Joe S. View Post
    I was thinking, if you only want one message, why include the entire alphabet?
    well just for fun and fere is first result
    Last edited by ScaleRobotics; - 10th February 2011 at 17:29. Reason: added video tags

  11. #11
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    Quote Originally Posted by Joe S. View Post
    I was thinking, if you only want one message, why include the entire alphabet?
    Above was just a cut and paste from a previous project that scrolled different infomation, I had stored the entire alphabet in the eeprom and just read the charactors i needed as required.

    You could add a few buttons to the project so that different messages can be displayed.
    'Baby on Board', 'Child on board', 'Back Off!!', 'Eat my Dirt' - hopefully you wont get shot at!

  12. #12
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default Your video IR remote

    Quote Originally Posted by wellyboot View Post
    You could add a few buttons to the project so that different messages can be displayed.
    'Baby on Board', 'Child on board', 'Back Off!!', 'Eat my Dirt' - hopefully you wont get shot at!
    Just saw your video...looks good, any chance of seeing your code for reading the remote control?

  13. #13
    Join Date
    Jul 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)

    hello mr.fratello... can you help me? im very need your help.. i want to do font moving display... but the coding is complicated to me... can u teach me about the coding for font moving display...

  14. #14
    Kalaiyarasi's Avatar
    Kalaiyarasi Guest


    Did you find this post helpful? Yes | No

    Default 8 x 8 led

    hai, i am doing project on PIC16F877A.I am executing the code in MPLAB.Can anyone help me to display the characters from A to Z in 8 X 8 LED using MPLAB code....

  15. #15
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: 8x8 Scrolling LED display (Simple example)


Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 07:14
  2. MY FIRST scrolling 8X8 LED
    By earltyso in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th August 2008, 17:23
  3. 5x7 LED Matrix Scrolling Display
    By roycarlson in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 5th August 2008, 00:50
  4. Replies: 2
    Last Post: - 14th July 2008, 23:11
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts