i am supposed to code a bubble sort program in embedded C using keil uVision. I havnt yt understood what is it that is actually required. I have been told to use registers and/or ports in it. if anyone can understand what exactly has to be done pls help me out...
These seem like disparate requests.
Keil is simply a compiler for embedded systems, uVision is their IDE for said compiler.
Writing a bubble sort is just that, Keil/uVision is not germane.
And, saying you should use registers makes plenty of sense (it's the point of embedded work, KISS - keep it small stupid). But, ports doesn't seem to have anything to do with the request.
I would suggest you get clarity on the request and then determine if you need more help. I would post a new question as this one will have disappeared by the time you've completed the above endeavor(s).
Go back to the person who assigned this to you and ask them specific questions. Think about what you don't understand. Coding up a bubble sort in C is a pretty well defined task. They even told you what tools to use. Here's what I don't already know:
- How does the data get passed to the sorting function?
- How does the data get out of the sorting function?
- Is there some platform code atop which this sits?
The registers/ports thing sounds like an answer to the first two. Use registers for holding data you're working with. The I/O ports sound like a good way to get data in and out.
Another thing to consider is this: Do you know the meaning of all the words in your question? If you don't, look them up. You should be able to find good information on any of those technical terms with a quick google search.