![]() | ![]() | ![]() |
| | #61 | |
| Quote:
From your reply I noticed that you have only 5 registers (5bytes) for the 40 column display not 40 registers like I do. | ||
| |
| | #62 | |
| Quote:
I use a 35 byte display array, 5 bytes (40 bits) for each of the seven rows, so I must select the correct 5 bytes to send to the shift registers each interrupt. Why do you have a 40 byte array? Last edited by Mike, K8LH; 18th October 2009 at 05:11 PM. | ||
| |
| | #63 |
|
Mike I have a doubt in your macMUX design. To drive 40 columns you have 5 bytes (40bits) for each row. For 7 rows you have 35bytes. If you are writing a table pattern for your design what way do you write the table from the below mentioned ways? See the letter “A” appearing in the table. Code: Table addwf PCL,F retlw b'00011100' ; char "A" retlw b'00100010' retlw b'00111110' retlw b'00100010' retlw b'00100010' Table addwf PCL,F retlw b'00111111' ; char "A" retlw b'01001000' retlw b'01001000' retlw b'01001000' retlw b'00111111' retlw b'00000000' Last edited by Gayan Soyza; 2nd November 2009 at 01:10 AM. | |
| |
| | #64 |
|
My ROM character arrays are similar to your first example. Code: r08 romchar[] = { 0b0111000, // "0"
0b1000100, //
0b1001100, //
0b1010100, //
0b1100100, //
0b0111000, //
~~~~~~~~~
0b0111000, // "A"
0b1000100, //
0b1000100, //
0b1111100, //
0b1000100, //
0b1000100, //
0b1000100, //
0b1111000, // "B"
0b1000100, //
0b1000100, //
0b1111000, //
0b1000100, //
0b1000100, //
0b1111000, //
0b0111000, // "C"
0b1000100, //
0b1000000, //
0b1000000, //
0b1000000, //
0b1000100, //
0b0111000, //
~~~~~~~~~
Last edited by Mike, K8LH; 2nd November 2009 at 09:50 AM. | |
| |
| | #65 |
|
Ahhhh here now comes the problem.......... In your method it can load a particular byte of a character to the shift register directly.But consider when showing the 2nd character theres a three column gap.How do you overcome this problem mike? But I see your clock is displaying within the shift register columns nicely. Last edited by Gayan Soyza; 2nd November 2009 at 01:25 PM. | |
| |
| | #66 |
|
Gayan, The following text refers to my 7x55 design. I use a "character generator" subroutine to place the character pixel bits into the display[] array. This sub' will shift and mask the character pattern as necessary according to an 'htab' value of 0..55. The display[] array maps directly to the display hardware, that is, the display[0..6] bytes are row 0 with bit 7 in the display[0] byte mapping to the left most row 0 pixel and bit 0 in the display[6] byte mapping to the right most row 0 pixel. The ISR automatically loads the shift registers from the display[] array, using bytes in display[0..6] for a row 0 update, or bytes in display[7..13] for a row 1 update, etc.. Regards, Mike Last edited by Mike, K8LH; 2nd November 2009 at 03:18 PM. | |
| |
| | #67 | |
| Quote:
| ||
| |
| | #68 |
|
Gayan, May I ask if you're using an array of bytes as a video buffer in your designs? In other words, do you have an ISR which takes data directly from this buffer (array) to "paint" the display hardware and does your 'main' program simply manipulates bits in the video buffer (array)? Mike <added> This may give you an idea of what you need to do with the rom character pattern for the number "2" to place it into the display array (straddling an 8-bit shift register boundary). Seems daunting, doesn't it? Last edited by Mike, K8LH; 2nd November 2009 at 03:53 PM. | |
| |
| | #69 |
|
Hi Mike thanks for your ideas & time.Now I see what you doing. My ISR takes data directly from the column registers.The advantage of this method is character placing is very easy even though it takes more RAMs. Mike couple of questions. If you need to display a letter let say from 12th column, first you loading 12 & calling your character generator? What about displaying a word like "MIKE" do you have to send the starting columns of each letter to the character generator? While traveling I thinked your method its hard mike you have to deal with 14 registers every time when you have to place a letter. Last edited by Gayan Soyza; 3rd November 2009 at 02:58 AM. | |
| |
| | #70 |
|
Gayan, I just use "htab = 12" to set or change the htab. The character generator automatically advances "htab" by 6 after writing each character to the display buffer so no need to change "htab" for each letter. Yes, the character generator is a bit more involved when you multiplex rows and it updates 14 bytes in the display buffer for each character but the advantage is that adding columns to this type of multiplexed display does not reduce the LED duty cycle (and brightness). Mike | |
| |
| | #71 |
|
Mike i'm doing a row scan for larger designs like my last youtube signboard.if i have 64 columns i'm taking 64 registers.in ur method you are taking 56 registers.in isr routine i track the row position & bit mask the appropriate bit & fill the entire row bit by bit .but you are filling entire row byte by byte.thats the different between us.
| |
| |
| | #72 |
|
Hi Gayan, If I was simply doing a scrolling signboard then I would probably increase the size of the display array (see drawing below) so that one complete character can be built outside of the display area and scrolled into the display one column at a time. Copy the character pattern from rom (table) into those right-most row bytes (no byte boundary problems), scroll one new column at a time into the viewable portion of the display buffer, then do it again for the next character. The scroll_left routine is simple (and fast); Code: void scroll_left_() // 17 words, 92 cycles
{ u08 i = 7; //
fsr0 = 0x47; // fsr0 = &display[7]
do //
{ asm //
{ rlcf _postdec0,F // scroll row
rlcf _postdec0,F //
rlcf _postdec0,F //
rlcf _postdec0,F //
rlcf _postdec0,F //
rlcf _postdec0,F //
rlcf _postdec0,F //
movlw 15 // prep index for next row
addwf _fsr0l,F //
} //
i--; //
} while(i); //
}
Code: void getromchar(u08 charval) // 31 words, 43 cycles
{ asm //
{ movlw 7 // tblptr = @display + charval * 7
mulwf _charval //
movlw low(romchar) //
addwf _prodl,W //
movwf _tblptrl //
movlw high(romchar) //
addwfc _prodh,W //
movwf _tblptrh //
clrf _tblptru //
tblrd*+ //
movff _tablat,_display+7 // display[7] = romchar[charval*7+0]
tblrd*+ //
movff _tablat,_display+15 // display[15] = romchar[charval*7+1]
tblrd*+ //
movff _tablat,_display+23 // display[23] = romchar[charval*7+2]
tblrd*+ //
movff _tablat,_display+31 // display[31] = romchar[charval*7+3]
tblrd*+ //
movff _tablat,_display+39 // display[39] = romchar[charval*7+4]
tblrd*+ //
movff _tablat,_display+47 // display[47] = romchar[charval*7+5]
tblrd*+ //
movff _tablat,_display+55 // display[55] = romchar[charval*7+6]
}
}
Last edited by Mike, K8LH; 5th November 2009 at 04:34 PM. | |
| |
| | #73 |
|
Hi mike thanks for those wonderful comments. I just checked your way of doing.Scrolling all 4 ways easy but the problem with character aligning. I just wrote a character generator subroutine. Code: ;=========================================================================== ;File - Char Generator ;Author - Gayan Soyza ;Date - 08-11-2009 ;=========================================================================== ;Notes ; ;Character Tables must arrange like this starting from MSB ;Char_A Retlw b'01110000' ; Letter A ; Retlw b'10001000' ; Retlw b'10001000' ; Retlw b'11111000' ; Retlw b'10001000' ; Retlw b'10001000' ; Retlw b'10001000' ;GP registers used ;Htab ; Horizontal Tab (Starting Column of a char) ;Byte_H ; division byteH - Integer ;Byte_L ; division byteL - fraction ;Rotate_Count ; Rotate couns for make masks ;Mask_1 ; mask bits of a char,0 bits will affected by new data ;Mask_2 ; mask bits of a char,0 bits will affected by new data ;Temp_H ; Temperory byteH for char placing from table ;Temp_L ; Temperory byteL for char placing from table ;Pointer ; offset values to table patterns ;---------------------------------------------------------------------------- Char_Generator movwf Htab ; ex: 11th column movwf Byte_H ; movlw b'00000011' ; Make default masks first movwf Mask_1 ; 00000011 11111111 movlw b'11111111' ; movwf Mask_2 bcf STATUS,C rrf Byte_H,F ; divide by 8 rrf Byte_L,F bcf STATUS,C rrf Byte_H,F rrf Byte_L,F bcf STATUS,C rrf Byte_H,F ; 00000001 rrf Byte_L,F ; 01100000 swapf Byte_L,F bcf STATUS,C rrf Byte_L,F ; 00000011 ; movf Byte_L,W ; remainder = 3 btfsc STATUS,Z goto Char_Place_Loop movwf Rotate_Count ; 3 ; Make_Masks bsf STATUS,C rrf Mask_1,F ; 11100000 rrf Mask_2,F ; 01111111 decfsz Rotate_Count,F goto Make_Masks ; ;----------------------------------------------------------------------------- ; Char_Place_Loop movf Byte_L,W ; movwf Rotate_Count movf Byte_H,W ; position register addlw 20h movwf FSR ; add the position from 20h movf Pointer,W call Table ; get the character pattern movwf Temp_H ; store in temp movf Htab,W ; get column btfsc STATUS,Z ; is it zero column ? goto Place_Set_1 ; yes,then no need adjust pattern Adjust_Pattern bcf STATUS,C ; no, rrf Temp_H,F rrf Temp_L,F decfsz Rotate_Count,F goto Adjust_Pattern ; Place_Set_1 movf INDF,W andwf Mask_1,W iorwf Temp_H,W movwf INDF ; incf FSR,F Place_Set_2 movf INDF,W andwf Mask_2,W iorwf Temp_L,W movwf INDF decf FSR,F ; decfsz Row_Counter,F goto $+4 movlw .7 movwf Row_Counter retlw 0x00 ; end of placing a char movlw .6 addwf FSR,F incf Pointer,F goto Char_Place_Loop I'm doing a research these days what is the speediest way of doing a multiplex routine. Last edited by Gayan Soyza; 9th November 2009 at 03:54 AM. | |
| |
| | #74 |
|
Let me tell it again. Mike I'm doing a row scan.If I want to do a 56 column display I'm taking 56 column registers.But in your case you are taking 49 registers. The method I'm following doesn't need a character generator & its really easy to place charactors.I'll post a picture for better understanding. Last edited by Gayan Soyza; 9th November 2009 at 04:02 AM. | |
| |
| | #75 |
|
That's what I was trying to say -- if all you're doing is scrolling text then you don't need a character generator function. Just stuff your character pattern into the display buffer outside of the viewable area (see diagram in my previous post). There's no alignment problems. You simply copy the seven byte character pattern into the display array. I'm currently writing a demo' program for you that simply scrolls text based on the design below. Just need to finish creating the rom 5x7 font array (may take awhile). If you have 5x7 modules with anode rows you would swap out the N-FET row drivers with P-FET drivers (also requires a small soft' driver change). I will look at your code in a moment. Regards, Mike | |
| |
|
| Tags |
| 64x8, led, pic, signboard |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| 10x7 LED SignBoard (MERRY X MAS) | Gayan Soyza | Micro Controllers | 44 | 10th May 2008 04:49 PM |
| 16f628A - How do I do this? | Hakachukai | Micro Controllers | 6 | 4th July 2007 05:09 PM |
| Signboard electronic | leticia | Micro Controllers | 1 | 18th March 2007 05:01 AM |
| 7X48; 250 character signboard | don.vito | Micro Controllers | 0 | 4th January 2007 12:11 AM |
| 16f628a | RMIM | Micro Controllers | 8 | 29th July 2006 08:45 AM |