Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 28th September 2006, 05:08 PM   (permalink)
Default Queue(list) in program

Hello..
I need to use assembly language to finish my project.I want to ask whether there are method to make a queue (list) in program.For example, when button 1 pressed first, it appears on top of the list.The next pressed button appears second and so on.when we press button 1 again, it will disappear and button 2 come to the top list.I just want to display the top list on seven segment.How to make it?
Xoll is offline  
Reply With Quote
Old 28th September 2006, 05:17 PM   (permalink)
Default

Could you use a "Circular Buffer" with a Read_Pointer and a Write_Pointer? The Circular buffer is full when Write_Pointer+1 = Read_Pointer and the buffer is empty when Write_Pointer = Read_Pointer. You'll have two functions, a "Load Buffer" function which places data in the buffer at the Write_Pointer then increments the Write_Pointer, and an "Unload Buffer" function which pulls data from the buffer at the Read_Pointer then increments the Read_Pointer.

Do you need to see a code example?

Mike
Attached Images
File Type: jpg Circular Buffer Diagram.JPG (74.7 KB, 12 views)
Mike, K8LH is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
program for writing and testing circuits luca-deltodesco General Electronics Chat 3 13th August 2006 10:17 AM
little help with my program please - simple count loop kud0s Micro Controllers 5 7th July 2005 09:40 PM
Tough assembly program for the PIC16F84 asmpic Micro Controllers 34 3rd December 2004 06:50 PM
PicBasic Keypad program Sora Micro Controllers 0 20th April 2004 07:01 PM
Program Verify on JMD with ic-prog monkeyxp Micro Controllers 2 2nd November 2003 11:56 AM



All times are GMT. The time now is 10:36 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.