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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/23/06 17:21
Read: times


 
#108108 - circular buffer
Responding to: ???'s previous message
Second technique.

1. Make array of 54 bytes. Make three pointers: Base Refresh Pointer - BRPTR, Load pointer - LPTR and Work Refresh Pointer - WRPTR.

2. Clear the array at initialization. Set BRPTR and LPTR to the begining of the array.

--- Refresh ---

3. Load WRPTR from BRPTR.

4. Any time reftersh interrupt comes take data from WRPTR, shift data to LCD then increase WRPTR. If WRPTR goes over of the array then set in to the beginning. Do it for all 48 columns then go to 3.

--- Scroll ---

5. If you need to scroll: just increase BRPTR. If BRPTR goes over of the array then set in to the beginning.

6. Each six scroll load new character from EEPROM, translate it via bitmap table and put 6 bytes of result to memory pointed by LPTR. Then load LPTR from BRPTR.

7. If the character is End of String then re-initialize EEPROM for reading string from start.

No moving, no pain.

Regards,
Oleg

List of 17 messages in thread
TopicAuthorDate
Very long message multiplexing            01/01/70 00:00      
   Speed?            01/01/70 00:00      
      does not matter            01/01/70 00:00      
   How Many Chars on Display?            01/01/70 00:00      
      To Ian            01/01/70 00:00      
         Hardware?            01/01/70 00:00      
            Hardware,Ian            01/01/70 00:00      
               Hardware            01/01/70 00:00      
                  When erik and oleg can spare time?            01/01/70 00:00      
                     Such impudence!            01/01/70 00:00      
            exactly            01/01/70 00:00      
               a circular buffer does not require data            01/01/70 00:00      
                  indeed but            01/01/70 00:00      
               circular buffer            01/01/70 00:00      
   Really Dan I said experienced..            01/01/70 00:00      
      Are you the 1st one?            01/01/70 00:00      
         by the way I have no experienceI            01/01/70 00:00      

Back to Subject List