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 26th January 2007, 05:03 PM   (permalink)
Default 8051 ascending order

I need to ask about the mechanism of generating ascending number code,the numbers are taken from a block starting from address 30h and its length stored in address 31h.it's required to put those numbers in ascending order in a block of numbers starting (for example) from address 60h.

any clue will be appreciated.
__________________
Tourism in syria website:
http:///www.syriatourism.org
4electros is offline   Reply With Quote
Old 26th January 2007, 06:38 PM   (permalink)
Default

You are refering to a sorting algorithm. The two which might be applicable in your case are the Bubble Sort and the Insertion Sort. Google them and get millions of hits
Papabravo is offline   Reply With Quote
Old 26th January 2007, 10:30 PM   (permalink)
Default

Sorting is complexity of Algorithm. But, it is your solution.

Wow! Syria is beautiful country.
__________________
Microcontroller Programming:
http://mcu-programming.blogspot.com
uC - News, Resources and Tutorials
sci-3d is offline   Reply With Quote
Old 26th January 2007, 11:15 PM   (permalink)
Default

what did you mean exactly by sorting and algorithm,i thought that they are the same
__________________
Tourism in syria website:
http:///www.syriatourism.org
4electros is offline   Reply With Quote
Old 28th January 2007, 12:17 AM   (permalink)
Default

Quote:
Originally Posted by 4electros
what did you mean exactly by sorting and algorithm,i thought that they are the same
One is a verb the other is a noun. Adding the -ing ending to a verb makes it a modifier of the noun.

sort (vt.) arrange a collection of objects according to an ordering rule (eg. ascending or descending)

algorithm (n.) a sequence of steps which lead to a desired result.

A sorting algorithm is different from a random number generating algorithm.
Papabravo is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
hyperterminal communication w/ 8051 spyghost Micro Controllers 8 22nd May 2008 10:54 AM
8051 Microcontroller (Urgent Help) UAE_Engineer Micro Controllers 5 22nd March 2007 11:13 AM
Could I get away with this? (8051 + AM29F010B) mstechca Micro Controllers 0 9th March 2006 02:04 AM
interfacing 16*16 matrix display with 8051 pmphilip Micro Controllers 0 1st February 2005 03:47 AM
MT8816 with Microcontroller 8051 dereksohail Micro Controllers 0 1st January 2005 08:03 PM



All times are GMT. The time now is 04:59 AM.


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