Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : 8x8 Matrix LED Display Fun
Page 1 of 3 | |||||
Author | Message | ||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
I have been playing around with some 8x8 matrix LEDs with MAX7219 driver boards and thought I would share some of the code. This program borrows from others on TBS and references to those threads is listed in the program. This program is 100% functional, but I would also still call it incomplete. It shows off some scrolling text then shows a clock display, but there is not any facility to directly enter any text or manually set the clock. The font used is entirely my own work and is a proportional font. Why use a proportional font? Because I wanted to squeeze 8 characters on to 5 LED modules. And why is the font table in binary? Because I'm still "tweaking" it and it's easier to make changes on the fly with the binary. I will convert it to hex later. Demo of clock What do you get when you replace the font? Halloween Eyes! This is just a preliminary test and needs lots of work. ' ===========================================================
'* MAX7219 LED DISPLAY for 28pin µMite 150 or 170 * '=========================================================== ' ' See message threads which inspired this program: ' http://www.thebackshed.com/forum/forum_posts.asp?TID=4861 ' http://www.thebackshed.com/forum/forum_posts.asp?TID=6685 ' ' Also see: http://www.thebackshed.com/forum/forum_posts.asp?TID=7057&KW ' TassyJim's Data logger program for enabling the PCF8563 clock ' interupt output at one second intervals 'Notes: ' - Load data to ALL LED modules before pulsing the CS line Cpu 48 'Set maximum speed for a MicroMite-150 '!!!! The values for the govenor variable needs to be recalcuated !!!! '!!!! if the CPU speed is changed. !!!! 'Set RTC Clock using current Micromite time thetime$ = Time$ thedate$ = Date$ yr = Val(Right$(thedate$,2)) mth = Val(Mid$(thedate$,4,2)) day = Val(Left$(thedate$,2)) hr = Val(Left$(thetime$,2)) mn = Val(Mid$(thetime$,4,2)) sc = Val(Right$(thetime$,2)) Rtc Settime yr, mth, day, hr, mn, sc 'SPI PINS Spi Open 5000000, 3, 16 'pin 3 is SPI Out 'pin 25 is SPI Clock 'Pin 14 is SPI In, not needed for this application PLOAD=26 'pin 26 is used to pulse the CS line loading data into the MAX7219 chips Setpin PLOAD,Dout MaxLEDs = 5 ' Total # of 8x8 Matrix Modules Installed (Max allowed 31) maxbytes = 1530 ' Total number of bytes allowed to hold the entire message ' A 255 char message with 6 btyes per char (255*6 = 1530) Sptr = 1 'Pointer for start of buffer Eptr = 1 'Pointer for end of buffer Cptr = 1 'Pointer for current place in the buffer military = 1 '0 = 12 hour time, 1 = 24 hour time Dim chars(900), digi(8), clkcol(8,2), ASCIIptr(150,2), govenor(6) Dim MsgData(maxbytes), MsgData2(MaxLEDs*8), MsgData3(MaxLEDs*8), ShiftL(8), ShiftR(8) ' Dim ShiftBuffer(MaxLEDs*8) 'Load data for clock digit positions and sizes For i = 1 To 8 For j = 1 To 2 Read clkcol(i,j) Next j Next i Data 1, 6, 7, 6, 13, 2, 15, 6, 21, 6, 27, 2, 29, 6, 35, 6 'clock character positionw and sizes 'Divider values for a 8 bit left shift For i = 1 To 8 Read ShiftL(i) Next i Data 128, 64, 32, 16, 8, 4, 2, 1 'Divider values for a 8 bit right shift For i = 1 To 8 Read ShiftR(i) Next i Data 2, 4, 8, 16, 32, 64, 128, 256 'The govenor variable is used to compensate for the different scroll rates. 'Scrolling 6 digits takes longer that scrolling just one. At 48MHz it takes 'about 32ms longer to scroll two digits than just one digit, and scrolling '6 digits takes about 160ms longer than one digit. To insure take the scroll 'rate remanins constant a total of 160ms needs to be added to a single digit 'scroll. Therefore one eighth of 160ms (20ms) needs to be added to each step 'of the scroll. Two digits scrolling needs an adjustment of 16ms between each step '128ms / 8 = 16ms. When all 6 digits are scrolling, no delay is needed. For i = 1 To 6 Read govenor(i) Next i Data 19, 16, 12, 8, 4, 0 '** Load Font Table data bytecnt = 0 For i = 32 To 134 Read cnt For j = 1 To cnt Read x$ bytecnt = bytecnt + 1 Chars(bytecnt) = Val("&b"+x$) 'convert string of 1s and 0s into a number Next j ASCIIptr(i,1) = bytecnt - cnt + 1 'storge to position of the character data ASCIIptr(i,2) = cnt ' how may bytes make up the character Next i '----------------------MAIN---------------------------- M7219_INIT 'Initialize modules ERASE_ALL 'Clear displays msg$ = " MicroMite Powered Clock " CharToBits 'Convert ASCII characters into bit patterns For Cptr = 1 To Eptr - (8*MaxLEDs) Show_Text Pause 75 Next Cptr Pause 500 'Preliminary setup for clock display... Makes for a cool looking startup oldtime$ = " : : " 'non scrolling part of the clock display msg$ = oldtime$ CharToBits 'Show_Text 'Gather clock info and display the time... endless loop Clock: Rtc Gettime 'Comment this out if not using a supported RTC chip 'copy old bit pattern to use for vertical scroll For i = Sptr To (MaxLEDs*8) MsgData2(i) = MsgData(i) MsgData3(i) = MsgData(i) Next i 'Read time and parse it for display time1$=Time$ If military = 1 Then LH$ = Left$(time1$,1) RH$ = Mid$(time1$,2,1) If LH$ = "0" Then LH$ = " " ' eliminate extra leading zero if exists Else tmp = Val(Left$(time1$,2)) If tmp > 12 Then tmp = tmp - 12 If tmp = 0 Then tmp = 12 RH$ = Right$(Str$(tmp),1) If tmp > 9 Then LH$ = "1" Else LH$ = " " Endif Endif LM$ = Mid$(time1$,4,1) RM$ = Mid$(time1$,5,1) LS$ = Mid$(time1$,7,1) RS$ = Mid$(time1$,8,1) msg$ = LH$ + RH$ + ":" + LM$ + RM$ +":" + LS$ + RS$ ' + Chr$(134) CharToBits ' timer = 0 'reset timer for timing the scrolling of the digits Show_Time ' Print timer 'show how long it took to update the display (used to calculate govenor() variable) While time1$ = Time$ : Wend 'wait for time to change oldtime$ = msg$ 'save last time to displayed, use to find which digits need to be updated Goto Clock '===================================================== Sub M7219_INIT Local i For i = 1 To MaxLEDs AA=Spi(&H0C00): Pulse PLOAD, 0.1 'SHUTDOWN AA=Spi(&H0900): Pulse PLOAD, 0.1 'BCD DECODE DIGITS 00 = NO DECODE, FF = DECODE ALL AA=Spi(&H0A02): Pulse PLOAD, 0.1 'BRIGHTNESS 0 TO F AA=Spi(&H0B07): Pulse PLOAD, 0.1 '8 DIGITS AA=Spi(&H0F00): Pulse PLOAD, 0.1 'TEST OFF AA=Spi(&H0C01): Pulse PLOAD, 0.1 'RUN Next i End Sub '-------------------------------------------------------------- Sub ERASE_ALL Local I, AA, J For I=1 To 8 For J =1 To MaxLEDs AA=Spi(I*256+&H00): Pulse PLOAD,1 Next J Next I End Sub '-------------------------------------------------------------- '*** Assemble string to bit data Sub CharToBits Local i, j, k, tmp '**Reset ring buffer ' For i=1 To maxbytes ' MsgData(i) = 0 ' Next i Sptr = 1 'Start of ring buffer Eptr = 0 'End of ring buffer Cptr = 1 'Current place in the ring buffer 'TotalLen = 0 '*** Copy character bits into MsgData array For i=1 To Len(msg$) cv = Asc(Mid$(msg$, i, 1)) ' Character value provides location data is to be found For j = ASCIIptr(cv,1) To ASCIIptr(cv,1) + ASCIIptr(cv,2)-1 Eptr = Eptr + 1 MsgData(Eptr) = chars(j) Next j Next i 'add extra bits for and even multiple of 8 for LED Matrix data tmp = Eptr Mod 8 If tmp <> 0 Then tmp = 8 - tmp For k = 1 To tmp Eptr = Eptr + 1 MsgData(Eptr) = 0 Next k Endif 'Be sure there is at least enough data for all the LED matrix modules If (8*MaxLEDs) > (Eptr) Then tmp = (8*MaxLEDs) - (Eptr) For k = 1 To tmp Eptr = Eptr + 1 MsgData(Eptr) = 0 Next k Endif End Sub '-------------------------------------------------------------- Sub Show_Text Local i, j, k, Cptr2 Cptr2 = Cptr For i = 1 To 8 For j=Cptr2 To (MaxLEDs*8)+ Cptr-1 Step 8 AA=Spi(i*256+MsgData(j))' print MsgData() Next j Pulse PLOAD,0.1 Cptr2 = Cptr2 + 1 Next i End Sub '-------------------------------------------------------------- Sub Show_Time Local i, j, k, m, dc 'do not make k, m Local here dc = 0 For i = 1 To 8 If Mid$(msg$, i,1) <> Mid$(oldtime$,i,1) Then ' what digit changed? digi(i) = 1 dc = dc + 1 Else digi(i) = 0 'reset back to 0 Endif Next i ' Prepare data for bit shifting to vertical scroll a character up or down For i = 1 To 8 If digi(i) = 1 Then If i = 1 Or i = 4 Or i = 7 Then For j = clkcol(i,1) To clkcol(i,1) + clkcol(i,2) - 1 MsgData3(j) = (256*MsgData(j)) + MsgData2(j) Next j Else If i = 2 Or i = 5 Or i = 8 Then For j = clkcol(i,1) To clkcol(i,1) + clkcol(i,2) - 1 MsgData3(j) = (256*MsgData2(j)) + MsgData(j) Next j Endif Endif Endif Next i For k = 1 To 8 For m = 1 To 8 If digi(m) = 1 Then ShiftIt(k,m) Next m Cptr2 = Cptr For i = 1 To 8 For j=Cptr2 To (MaxLEDs*8)+ Cptr-1 Step 8 AA=Spi(i*256+MsgData(j))' print MsgData() Next j Pulse PLOAD,0.1 Cptr2 = Cptr2 + 1 Next i Pause govenor(dc) 'a variable delay so all digits scroll evenly Next k End Sub '------------------------------------------------------------------ ' Shift data Left or Right for scrolling of numbers up or down Sub ShiftIt(z,m) Local i If m = 1 Or m = 4 Or m = 7 Then For i = clkcol(m,1) To clkcol(m,1) + clkcol(m,2) - 2 'for clock, only 5 of 6 columns need shifting MsgData(i) = (MsgData3(i) \ ShiftR(z)) And &HFF Next i Else For i = clkcol(m,1) To clkcol(m,1) + clkcol(m,2) - 2 'for clock, only 5 of 6 columns need shifting MsgData(i) = (MsgData3(i) \ ShiftL(z)) And &HFF Next i Endif End Sub '------------------------------------------------------------ '**** Font Table '**** !!!! Warning - This is a proportional spaced font!!! '**** Not all characters are the same width. The number '**** at the begining of each line is to aid the proper '**** spacing of characters Data 6, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000 '32 - space Data 4, 00000000, 10111111, 00000000, 00000000 '33 - ! Data 6, 00000000, 00000111, 00000000, 00000111, 00000000, 00000000 '34 - " Data 6, 00100100, 11111111, 00100100, 11111111, 00100100, 00000000 '35 - # Data 6, 01000100, 11001011, 01010010, 11010011, 00100010, 00000000 '36 - $ Data 6, 10000011, 01100011, 00011000, 11000110, 11000001, 00000000 '37 - % Data 6, 01100010, 10010101, 10001001, 01010001, 10100010, 00000000 '38 - & Data 4, 00000000, 00000100, 00000011, 00000000 '39 - ' Data 6, 00000000, 00000000, 00111100, 01000010, 10000001, 00000000 '40 - ( Data 6, 10000001, 01000010, 00111100, 00000000, 00000000, 00000000 '41 - ) Data 6, 00101010, 00011100, 01111111, 00011100, 00101010, 00000000 '42 - * Data 6, 00001000, 00001000, 00111110, 00001000, 00001000, 00000000 '43 - + Data 5, 00000000, 10000000, 01100000, 00000000, 00000000 '44 - , Data 6, 00001000, 00001000, 00001000, 00001000, 00001000, 00000000 '45 - - Data 2, 10000000, 00000000 '46 - . Data 6, 10000000, 01100000, 00011000, 00000110, 00000001, 00000000 '47 - / Data 6, 01111110, 10100001, 10011001, 10000101, 01111110, 00000000 '48 - 0 Data 6, 10000000, 10000010, 11111111, 10000000, 10000000, 00000000 '49 - 1 Data 6, 11000010, 10100001, 10010001, 10001001, 10000110, 00000000 '50 - 2 Data 6, 01000010, 10000001, 10001001, 10001001, 01110110, 00000000 '51 - 3 Data 6, 00011111, 00010000, 00010000, 11111111, 00010000, 00000000 '52 - 4 Data 6, 10001111, 10001001, 10001001, 10001001, 01110001, 00000000 '53 - 5 Data 6, 01111110, 10001001, 10001001, 10001001, 01110010, 00000000 '54 - 6 Data 6, 00000001, 11100001, 00010001, 00001001, 00000111, 00000000 '55 - 7 Data 6, 01110110, 10001001, 10001001, 10001001, 01110110, 00000000 '56 - 8 Data 6, 01000110, 10001001, 10001001, 10001001, 01111110, 00000000 '57 - 9 Data 2, 00100100, 00000000 '58 - : Data 4, 00000000, 10000000, 01100100, 00000000 '59 - ; Data 6, 00000000, 00010000, 00101000, 01000100, 10000010, 00000000 '60 - < Data 6, 00010100, 00010100, 00010100, 00010100, 00010100, 00000000 '61 - = Data 6, 00000000, 10000010, 01000100, 00101000, 00010000, 00000000 '62 - > Data 6, 00000010, 00000001, 10110001, 00001001, 00000110, 00000000 '63 - ? Data 6, 01111110, 10000001, 10001101, 10010101, 10001110, 00000000 '64 - @ Data 6, 11111100, 00010010, 00010001, 00010010, 11111100, 00000000 '65 - A Data 6, 11111111, 10001001, 10001001, 10001001, 01110110, 00000000 '66 - B Data 6, 01111110, 10000001, 10000001, 10000001, 01000010, 00000000 '67 - C Data 6, 11111111, 10000001, 10000001, 01000010, 00111100, 00000000 '68 - D Data 6, 11111111, 10001001, 10001001, 10001001, 10000001, 00000000 '69 - E Data 6, 11111111, 00001001, 00001001, 00001001, 00000001, 00000000 '70 - F Data 6, 01111110, 10000001, 10000001, 10010001, 01110010, 00000000 '71 - G Data 6, 11111111, 00001000, 00001000, 00001000, 11111111, 00000000 '72 - H Data 6, 10000001, 10000001, 11111111, 10000001, 10000001, 00000000 '73 - I Data 6, 01100000, 10000000, 10000000, 10000000, 01111111, 00000000 '74 - J Data 6, 11111111, 00011000, 00100100, 01000010, 10000001, 00000000 '75 - K Data 6, 11111111, 10000000, 10000000, 10000000, 10000000, 00000000 '76 - L Data 6, 11111111, 00000010, 00000100, 00000010, 11111111, 00000000 '77 - M Data 6, 11111111, 00000110, 00011000, 01100000, 11111111, 00000000 '78 - N Data 6, 01111110, 10000001, 10000001, 10000001, 01111110, 00000000 '79 - O Data 6, 11111111, 00010001, 00010001, 00010001, 00001110, 00000000 '80 - P Data 6, 01111110, 10000001, 10100001, 01000001, 10111110, 00000000 '81 - Q Data 6, 11111111, 00010001, 00110001, 01010001, 10001110, 00000000 '82 - R Data 6, 01000110, 10001001, 10001001, 10001001, 01110010, 00000000 '83 - S Data 6, 00000001, 00000001, 11111111, 00000001, 00000001, 00000000 '84 - T Data 6, 01111111, 10000000, 10000000, 10000000, 01111111, 00000000 '85 - U Data 6, 00111111, 01000000, 10000000, 01000000, 00111111, 00000000 '86 - V Data 6, 01111111, 10000000, 01100000, 10000000, 01111111, 00000000 '87 - W Data 6, 11000011, 00100100, 00011000, 00100100, 11000011, 00000000 '88 - X Data 6, 00000111, 00001000, 11110000, 00001000, 00000111, 00000000 '89 - Y Data 6, 11000001, 10100001, 10011001, 10000101, 10000011, 00000000 '90 - Z Data 6, 00000000, 00000000, 11111111, 10000001, 10000001, 00000000 '91 - [ Data 6, 00000001, 00000110, 00011000, 01100000, 10000000, 00000000 '92 - \ Data 6, 10000001, 10000001, 11111111, 00000000, 00000000, 00000000 '93 - ] Data 6, 00000100, 00000010, 00000001, 00000010, 00000100, 00000000 '94 - ^ Data 6, 10000000, 10000000, 10000000, 10000000, 10000000, 00000000 '95 - _ Data 4, 00000000, 00000011, 00000100, 00000000 '96 - ` Data 6, 01000000, 10100100, 10100100, 10100100, 11111000, 00000000 '97 - a Data 6, 11111111, 10001000, 10001000, 10001000, 01110000, 00000000 '98 - b Data 6, 01111000, 10000100, 10000100, 10000100, 01001000, 00000000 '99 - c Data 6, 01110000, 10001000, 10001000, 10001000, 11111111, 00000000 '100 - d Data 6, 01111000, 10010100, 10010100, 10010100, 00011000, 00000000 '101 - e Data 6, 00010000, 11111110, 00010001, 00000001, 00000010, 00000000 '102 - f Data 6, 00011000, 10100100, 10100100, 10100100, 01111000, 00000000 '103 - g Data 6, 11111111, 00010000, 00001000, 00001000, 11110000, 00000000 '104 - h Data 4, 10000000, 11111010, 10000000, 00000000 '105 - i Data 6, 01000000, 10000000, 10000000, 10000000, 01111010, 00000000 '106 - j Data 6, 11111110, 00010000, 00101000, 01000100, 10000000, 00000000 '107 - k Data 4, 10000010, 11111110, 10000000, 00000000 '108 - l Data 6, 11111000, 00000100, 11111000, 00000100, 11111000, 00000000 '109 - m Data 6, 11111000, 00000100, 00000100, 00000100, 11111000, 00000000 '110 - n Data 6, 01111000, 10000100, 10000100, 10000100, 01111000, 00000000 '111 - o Data 6, 11111100, 00100100, 00100100, 00100100, 00011000, 00000000 '112 - p Data 6, 00011000, 00100100, 00100100, 01111100, 10000000, 00000000 '113 - q Data 6, 11111100, 00001000, 00000100, 00000100, 00001000, 00000000 '114 - r Data 6, 10001000, 10010100, 10010100, 10010100, 01100100, 00000000 '115 - s Data 6, 00000100, 00000100, 01111111, 10000100, 01000100, 00000000 '116 - t Data 6, 01111100, 10000000, 10000000, 10000000, 01111100, 00000000 '117 - u Data 6, 00111100, 01000000, 10000000, 01000000, 00111100, 00000000 '118 - v Data 6, 01111100, 10000000, 01000000, 10000000, 01111100, 00000000 '119 - w Data 6, 10000100, 01001000, 00110000, 01001000, 10000100, 00000000 '120 - x Data 6, 00011100, 10100000, 10100000, 10100000, 01111100, 00000000 '121 - y Data 6, 10000100, 11000100, 10100100, 10010100, 10001100, 00000000 '122 - z Data 6, 00000000, 00000000, 00001000, 00110110, 01000001, 00000000 '123 - { Data 6, 00000000, 00000000, 11111111, 00000000, 00000000, 00000000 '124 - | Data 6, 01000001, 00110110, 00001000, 00000000, 00000000, 00000000 '125 - } Data 6, 00000110, 00000001, 00000010, 00000100, 00000011, 00000000 '126 - ~ Data 6, 00000110, 00001001, 00001001, 00000110, 00000000, 00000000 '127 - degree Data 6, 00001111, 00000101, 00000001, 00000000, 00000000, 00000000 '128 - mini F Data 6, 00001111, 00001001, 00001001, 00000000, 00000000, 00000000 '129 - mini C Data 4, 00011110, 00000101, 00011110, 00000000 '130 - mini A Data 4, 11110000, 01010000, 01110000, 00000000 '131 - mini P Data 4, 00000000, 00000010, 00000101, 00000010 '132 - Alarm1 (part1) Data 4, 00000000, 00000101, 00000010, 00000101 '133 - Alarm2 (part2) Data 4, 00000000, 00000000, 00000000, 00000000 '134 - small space Comment out the RTC lines if not using a supported clock chip. The program will run normally but the Micromite probably will not keep very accurate time on its own. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
That looks great! I like all of it. The scrolling, the proportional fonts, how the clock changes time. That will be a great project to do. Thanks for sharing! Microblocks. Build with logic. |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Glad you like it. I have had plenty of fun and headaches getting it work the way I wanted it to. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
That is a work of art - yet another great use for the MM. Smoke makes things work. When the smoke gets out, it stops! |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
HELL YEAH! Awesome job justpayin!!!! These displays are readily available and this has been a long time coming!!!! A million thanks for your efforts. Because of efforts like yours, the uMite just keeps getting better and better. THANK YOU!!! |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Thank you! Look close and you will see the code I lifted directly from posts you and Frank N. Furter made last year. It was just what I needed to get started and keep building upon. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 830 |
Hi Curtis, thank you very much! Your clock is amazing and your Halloween Eyes are very nice! I see, I must build my own robot mask with your Eyes! THANKS AGAIN! Frank |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Curtis, Excellent practical use for a 'mite... And you are using one of my MuPs as well.. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Had you in mind Mick when I framed the video shots. The Mup is a great little board, and I love that I was able to setup the LED modules a and RTC without having to use a breadboard. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
I'm still playing with my Halloween Eyes program and getting close to what I envisioned. This short demo has 499 frames made up of 4491 settings. The outer shape of the eye is a separate element from the pupil. The two elements (characters) are ORed together to produce a new unique element(character) which is displayed. This helps reduce the number of animation characters I had to pre-make. The downside is everything is thrown out of whack if I edit the pre-made characters. Beware of the evil eyes! They might try to mesmerize you! LED Eyes 2 Looks much better in real life. The camera just doesn't capture the color, the crisp lines, the smooth animation and the strobing effect. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Damn it all to hell.... now I have to pull out my 5 8x8 units and set up and play with this. I really do appreciate your efforts with these display units. We can make some really cool things with these, now that you took the time to get the ball rolling. THANKS Justplayin!!!!!! |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 830 |
Hi Curtis, your eyes are very nice! ...would you post your code for it? THANKS! Frank |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Soon... I will be posting it after I clean it up. It is a modified version of the clock program and I have not yet stripped out all the unused code. Plus, there is one more animation control I have allowed for but have not integrated in yet. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Great news Curtis. Can't wait to see what you have come up with!!!! |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Curtis, I had my Max7219 `panels' arrive today but unfortunately they seem to be wired differently to yours. The effect is the RHS panel scrolls text sideways (going UP ie. like the panel is rotated 90degrees clockwise) and all the other panels are solid RED.. It is rather weird ... with 4 panels connected (they come in 4 joined) there is no intelligible text on that RHS panel but when I connect 8 panels together the RHS distincly shows the moving message board string on the RHS panel but rotated 90 degrees and scrolling up. Do you have a pinout of your panels? I can then buzz out mine and see what is different. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Curtis, All, OK, firstly I had my displays powered by 3v3 instead of 5V.. Now all panels `work' BUT it looks like my modules have the rows and columns swapped as the text chrs are all rotated 90degrees to the right .. Is there a simple way to modify the code to work with these panels or have I blown my 2 and 1/2 shekels I paid the little Chinese Gentleman.? Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Hello Mick. I was wondering when someone would ask that question. There at least three different 7219 matrix modules with the 3mm LEDs. Two use surface mount chips a one uses the dip version of the 7219. I have used the two which have the surface mount 7219. Looking at the back of the module, if you can see the 7219 chip and the are jumper pins in all four corners. Rotate the module so that pin one of the chip is in upper left, both vcc pins will also be on your left. The input connector runs along the bottom and the output is at the top. The next module in the chain will go on right. You can hold the modules together with the corner jumper pins. If you don't see the 7219, position the module so the silk screened 'IN' is in upper right corner. The input connector will be across the top of the module anf the output is across the bottom. The next module goes on the right. I used a bamboo skewer and twist tie to hold the module together. I opted for this orientation to reduce the amount of slicing a dicing of bit inorder to display a character. I did try the other way and it was SLOW. I hope that helps... I have to stop now, I'm typing this message on my old Kindle 3 and it's killing my thumbs. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Curtis, These are my Modules They are 4 modules on the same joined PCB that needs to be cut to separate them. They are prelinked at the joins with solder tracks. From eBay as shown in this link Ebay link Note the picture shows them linked by shorting blocks.. they are all on the same PCB ... solid.. I have also bought some from elsewhere that have not arrived yet. Regards, Mick EDIT *** The picture is compressed too small to see. I have ZIPped it up here 2015-09-18_080314_Max7219.zip Mik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 326 |
Mick, those modules (FC-16) are the second of the two I descibed. The modules I received were not fully assembled and I had to solder the pin headers on. I originally connected my modules in the same fashion as yours, but found my program was a bit to slow (the clock would fall behind when scrolling all six digits). I'll post the links to the modules I used when I get to a real computer. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Curtis, Thanks, I will have to cut the panels, they are not even fee-grooved to snap... Not a big deal.. My problem is I have torn a hamstring and am in agony most of the day and struggling to walk so it may have to wait a week or so, although I am keen to get it working.. Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Page 1 of 3 |
Print this page |