Author Topic: need help with avr source code  (Read 2747 times)

Thomas P.

need help with avr source code
« on: October 22, 2006, 05:57:16 AM »
is there anyone familiar with programming avr microcontroller?
i got this timer source code for my uv-machine which so far works great. the problem is that it shoud save the last time and automatically display it on the next startup - and it doesn't which is a real pain.
now becaus i'm new to assembler i can't figure out what's wrong with it and maybe there's someone around here more into this.

the source is here:
http://www.rzuser.uni-heidelberg.de/~tpfluege/counter.txt

thanks
god said...
∇ ⋅ D = ρ
∇ x E = - ∂B/∂t
∇ ⋅ B = 0
∇ x H = ∂D/∂t + j
...and then there was light

RaceDriver205

Re: need help with avr source code
« Reply #1 on: November 15, 2006, 06:28:18 AM »
Lol, I think asking people to help debug a huge source code is a bit much.  :D
The best way to debug it is to use the debugging tools in the AVR studio. Run the program line by line if nessesary, until you know exactly where the problem is. Then it'll come to you what is wrong, and you'll be able to fix it.

Dave_B

Re: need help with avr source code
« Reply #2 on: November 15, 2006, 10:38:35 AM »
Assuming this code uses the built-in EEPROM, look for the subroutines that write and read the EEPROM.  Put a 'break' in those sections and monitor the EEPROM memory as you step through them in the simulator. 

Is that possible?  Can you use a stim file to simulate the input?
Help build our Wiki!