Re: Help needed for programming of microcontrollers and associated chips.
- From: kensmith@xxxxxxxxxxxxxxx (Ken Smith)
- Date: Tue, 10 Jan 2006 15:09:52 +0000 (UTC)
In article <1136739664.434367.19310@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
adam <adam.mashraqui@xxxxxxxxx> wrote:
[....]
>1. What are the different stages that go into programming from start to
>end?
Here it is don't miss any steps. Once you become experienced, you can
start combining steps.
(1)
Write a vague description of what you are trying to make the programmed
part do. Don't worry about details just get the titles for all the big
ideas down on paper.
(2)
Review the description and often throw sections away and start again. Ask
your self "could a complete idiot understand this?" and "could a smart
person find a way to misunderstand this?".
(3) Write a more detailed specification of what you are trying to do.
This should be written in a format with no more than about 73 characters
per line so that it can be turned into comments easily. Use a very simple
text editor. Don't write any code at this point.
(4)
Break the problem down into smaller parts. Start looking at things like
how many bits are needed in your numbers. At this point you should be
writing stuff in the form of comments for the source code. It isn't too
hard to convert comments from one language to another.
(5)
Break those parts down further. Carefully re-examine issues like how many
bits are needed for values. About here is where you should start thinking
about what language you will use.
(5A)
Look at any obvious looping sections and ask "if this takes one machine
cycle per loop will it take the entire life of the universe to complete".
If so, you are in trouble already.
(6)
Determine how each step in the processing can be done and perhaps start
writing some code.
(6A)
Repeat the (5A) check for any new loops you see.
(7)
Go back a re-read the vague description you started with and compare it
with the now detailed stuff. Make sure that you have gone astray.
(8)
Write source code for some of the subsections and code to test those
subsections. Start with the things you are least sure of.
(9)
Now you need a compiler. Turn on all the warnings that the compiler has
and feed your source code in.
(10)
Fix everything that the compiler warned you about.
(11)
Compile and link a test program. You need the compiler and linker.
(12)
If you are using an emulator, load the code into it. If not perhaps you
need to program a part. If so you will need the "hex" format that the
porgrammer needs and the programmer.
(13)
Run the test code and see what doesn't work.
(14)
Figure out what you did wrong.
(15)
Fix the mistakes and repeat from (11)
(16)
Add more stuff to the program and repeat from (11)
(17)
Compare what you have to what you want and if needed repeat from (1)
[...]
>simplest way. Please suggest ways to go about it. some have suggested
>Visual Basic. Are VB codes for such application availalbe on the
>internet?
Run a simple terminal program on the PC. Hyperterminal is free but nearly
imposible to use. Procomm, Commo, Microcom, and Picocom are all simple
programs.
You can verify that you can work the program by linking two PCs together
and typing stuff back and forth.
Now just make your 8051 code output plain ASCII text for what you want to
display.
--
--
kensmith@xxxxxxxxx forging knowledge
.
- Prev by Date: Re: Base Bias Constant Voltage Source
- Next by Date: Re: Minimal SMPS regulator
- Previous by thread: small signal Bulk source voltage
- Next by thread: Re: Doppler Radar
- Index(es):
Relevant Pages
|