Re: Help needed for programming of microcontrollers and associated chips.



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

.



Relevant Pages

  • Re: C90 IDE+compiler for Windows / educational purposes
    ... who is knowledgeable and determined to fix the problem ... If you need the source code, yes, I agree, in which case Digital Mars may ... problems in an ancient compiler from a museum, ... If one needs the source to make the implementation conform, ...
    (comp.lang.c)
  • Re: Warning: Because of COMMON...............
    ... Thank you for your reply glen.However, my concern is why a source code ... it does not.Do you think that this has to do with using a newer compiler? ... am finding it quite hard to fix the problem....The variables are so ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: GPL vs non-GPL device drivers
    ... shipped the source code of the modified POP server. ... given you the compiler he compiled it with, ... Actually, if memory serves, when you license a work under the GPL, part of the ... a derivative work" the claim is invalid - because, as it has been shown, a ...
    (Linux-Kernel)
  • Re: more compiler switches
    ... Also print the version number of the compiler ... driver program and of the preprocessor and the compiler proper. ... C source code which should not be preprocessed. ... Like -v except the commands are not executed and all command arguments are ...
    (comp.lang.fortran)
  • Re: Dad upgrade.
    ... If the source code is available in full, the job of compiling it is very ... end of it, you do just hit the `go' button on the compiler, and out pops ... neither is any good without some hardware to store it and execute it - ... program will be happily translated into machine code for whatever CPU ...
    (uk.comp.sys.mac)