Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/20/04 08:38
Read: times


 
#76194 - RE: Need help with LED display
Responding to: ???'s previous message
hi,

remember to recommend MCUs i should search for.

Well, it depends on that how will you shift data during refresh cycles. For example, refresh of 5 registers (40 columns) requires time about 310μs with standard 8051 and OSC=12MHz:
REFRESH:
; R0 points to a row data to be refreshed
	MOV	R7,#5		; 5 bytes = 40 bits to be shifted
NEXT_BYTE:
	MOV	A,@R0
	MOV	R6,#8
NEXT_BIT:
	RRC	A
	MOV	SHIFT_DATA,C
	CLR	SHIFT_CLOCK
	SETB	SHIFT_CLOCK
	DJNZ	R6,NEXT_BIT
	INC	R0
	DJNZ	R7,NEXT_BYTE
	RET
As result, complete refresh of 7 rows takes about 2,2ms. So maximum refresh rate with such scheme is about 460Hz.
Just one important note here: with such refresh rate, all productivity of MCU will be gave for refresh task; by other words you will have no time to do something else. If we assume that the refresh rate = 100Hz is enough, then about 78% of MCU productivity is kept for another tasks. For most projects it is enough value and so you may not take this as point of MCU selection.

Anyway, what may be done if you need with more productivity?
Well, you may use:
- highter frequency;
- modern MCU with x2 mode or anothers which reduce the number of clocks per instruction;
- another refresh schemes.
Some more words about last solution.
The simple way to decrease refresh time without big hardware changes is the usage of UART in mode 0. You should use line RX as shift data output and line TX as shift clock output. Here is the piece of software:
; UART setup
;	MOV	SCON,#00000010b
; ...
;
REFRESH:
; R0 points to a row data to be refreshed
	MOV	R7,#5		; 5 bytes = 40 bits to be shifted
NEXT_BYTE:
	JNB	TI,$
	CLR	TI
	MOV	SBUF,@R0
	INC	R0
	DJNZ	R7,NEXT_BYTE
	RET
With the same conditions as defined above, refresh of a row takes about 60μs. As result, if we still assume that the refresh rate = 100Hz is enough, then about 96% of MCU productivity is for you. With such reserve you may increase refresh rate to implement, for example, bright control of LEDs.

There is yet another way to decrease refresh time named "parallel shifting". No time to do full explanation of it now. In short:
This way very useful when 8 shift registers are used per row - in such case it decreases refresh time even more than UART mode 0.
This method requires to rearrange data storage format, change external schematic and using a whole port as 8 data outputs to eight shift registers while the clock line is still shared with them all. Such way is intermediate between serial and parallel loading of registers.

Regards,
Oleg


List of 62 messages in thread
TopicAuthorDate
Need help with LED display            01/01/70 00:00      
   RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
         RE: Need help with LED display            01/01/70 00:00      
            RE: Need help with LED display            01/01/70 00:00      
               RE: Need help with LED display            01/01/70 00:00      
                  RE: Need help with LED display            01/01/70 00:00      
                     RE: Need help with LED display            01/01/70 00:00      
                        RE: Need help with LED display            01/01/70 00:00      
                           RE: scroll            01/01/70 00:00      
                           RE: Need help with LED display            01/01/70 00:00      
                              RE: Need help with LED display            01/01/70 00:00      
                                 RE: Need help with LED display            01/01/70 00:00      
                                 RE: Need help with LED display            01/01/70 00:00      
                                 READY FOR SCHEMATICS            01/01/70 00:00      
                                    RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                       RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                       RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                          RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                             RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                                RE: READY FOR SCHEMATICS            01/01/70 00:00      
                                                   construction of marix            01/01/70 00:00      
                                                      RE: construction of marix            01/01/70 00:00      
                                                      RE: construction of marix            01/01/70 00:00      
                                    No reason to shout!            01/01/70 00:00      
                              RE: Need help with LED display            01/01/70 00:00      
                                 RE: Need help with LED display            01/01/70 00:00      
                                    RE: Need help with LED display            01/01/70 00:00      
                                 RE: Need help with LED display            01/01/70 00:00      
                                    RE: Need help with LED display            01/01/70 00:00      
         RE: Need help with LED display            01/01/70 00:00      
   Multiplexing scheme            01/01/70 00:00      
      RE: Multiplexing scheme            01/01/70 00:00      
         RE: Multiplexing scheme            01/01/70 00:00      
            RE: Multiplexing scheme            01/01/70 00:00      
            RE: Multiplexing scheme            01/01/70 00:00      
               RE: Multiplexing scheme            01/01/70 00:00      
                  RE: Multiplexing scheme            01/01/70 00:00      
                     RE: Multiplexing scheme            01/01/70 00:00      
                        RE: Multiplexing scheme            01/01/70 00:00      
                           RE: Multiplexing scheme            01/01/70 00:00      
   RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
         RE: Need help with LED display            01/01/70 00:00      
            RE: Need help with LED display            01/01/70 00:00      
               RE: Need help with LED display            01/01/70 00:00      
               RE: Need help with LED display            01/01/70 00:00      
                  RE: Need help with LED display            01/01/70 00:00      
                     RE: 100Hz            01/01/70 00:00      
   RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
      RE: Need help with LED display            01/01/70 00:00      
         RE: Need help with LED display            01/01/70 00:00      
            RE: Need help with LED display            01/01/70 00:00      
      how to do calculations            01/01/70 00:00      
         RE: how to do calculations            01/01/70 00:00      
            RE: how to do calculations            01/01/70 00:00      
               RE: how to do calculations            01/01/70 00:00      
               RE: how to do calculations            01/01/70 00:00      

Back to Subject List