DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: Thomas P. on October 22, 2006, 05:57:16 AM

Title: need help with avr source code
Post by: Thomas P. 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 (http://www.rzuser.uni-heidelberg.de/~tpfluege/counter.txt)

thanks
Title: Re: need help with avr source code
Post by: RaceDriver205 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.
Title: Re: need help with avr source code
Post by: Dave_B 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?