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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/06/09 22:25
Modified:
  11/06/09 22:32

Read: times


 
#170524 - Code suggestions for 7segment moving display
Responding to: ???'s previous message
The simple setup of counting registers [digit1..4] and the INC on every loop creates an overflow to indexed search because the table consists of just 16 entries. This can be considered on the [segdiplay] part of the code. Actually it is not about a moving display but for a specific rolling counter using hex digits 0..9 and A..F

The part of [segdisplay] should be corrected to use only the lower nibble since the lookup table has only 16 entries.

segdisplay:
         mov dptr,#lookup              
         ANL A,#0x0F                     ; ADDED to clear upper nibble before used to index
         movc a,@a+dptr
         cpl a
         mov p1,a
         call delay1ms
         mov p1,#0ffh
         ret

 


Also the table entries for seven segment display decoding is partially correct.
This file may be trivial but can help a lot anyone interested to 7segment display decoding to port pins.

http://www.8052.com/users/angelis/sevensegment.xls



K.L.Angelis

List of 23 messages in thread
TopicAuthorDate
moving display....            01/01/70 00:00      
   What do *you* think?            01/01/70 00:00      
   Have you written the code?            01/01/70 00:00      
      Understanding your own code is a minimum requirement            01/01/70 00:00      
   what you show is not code            01/01/70 00:00      
   No way to help...            01/01/70 00:00      
      Probably broken output code            01/01/70 00:00      
         Code suggestions for 7segment moving display            01/01/70 00:00      
   You can try this..            01/01/70 00:00      
   NO reply in 4 days.!! Where are you Vijay?            01/01/70 00:00      
      That feature is broken            01/01/70 00:00      
         I would like to, but...            01/01/70 00:00      
         ... and it wouldn't harm anyone to pause the thread            01/01/70 00:00      
            Did you miss the point?            01/01/70 00:00      
               NO, I didn't ... but ...            01/01/70 00:00      
                  jumps in promptly to show how clever they are,            01/01/70 00:00      
      Typical of this poster            01/01/70 00:00      
      O/P has concluded that he has to do it himself            01/01/70 00:00      
         Haha! Do you really think this?            01/01/70 00:00      
            Probably a bit of both?            01/01/70 00:00      
               Yes, most probably both reasons            01/01/70 00:00      
               "Top 5 ways to motivate engineers"            01/01/70 00:00      
            It's only fun the first time!            01/01/70 00:00      

Back to Subject List