Programming

Status
Not open for further replies.
I use this method.
1) Make yourself a working schematic.
2) Start programing software and connect the programmer to the AVR (chip)
3) Start programming using C and following advice given in the datasheet of the chips in the circuit.
4) Simulate the code in the PC to see, if it works ok
5) Change some typos in the code
6) Program the chip.
7) If not working like it should Enable DebugWire fuse and simulate the code on the Hardware (step through the code)
8) find last bugs. and run the code full speed again
9) If works disable DebugWire and turn the Crystal to 20MHz
10) Last test to see, if it still works and if anything is getting hot. Also disconnect all thest equipment (Multimeters, Logic analyzers etc)

11) grab yourself a cold beer and say wupidoo!

Has worked very well for past years. hopefully also in the future
 
7) If not working like it should Enable DebugWire fuse and simulate the code on the Hardware (step through the code)
FWIW: When you execute your code on the hardware (as in using and ICD2) it is not simulation.

The only thing that will give you more accurate info is to run a trace using a processor emulator or logic analyzer with an inverse/reverse assembler. This is because they allow the program to run a full speed and do not impact the timing.
 
yes sorry, wrong choice of words there... not mi native language you know
But nothing beats the one wire debugging of the AVR series. even the smallest ones can be debugged that way and one loses no I/O's thanks to that because DW shares the pin with RESET line
you just press RUN and see it go... all the info is on your PC also.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…