I'm not quite sure where this problem is best posted so I will post it here and hope someone can solve my problem.
I have a MiniPOV3 kit and it works fine with the stock firmware. I also have a USBTiny kit that can upload firmware to an avr and it will run in the MiniPOV too. My problem is that if I try to compile my own code or try to recompile the stock firmwares they don't work. They compile and they upload fine using the USBTiny but when I turn the MiniPOV on all the LEDs light up solid. I have been trying the test_leds firmware which should alternate slowly which LED is on. I have tried compiling the code in both xp and ubuntu and get the same result both times. I have no idea what it is that I'm missing.
Please help, thanks.
MiniPOV3/USBTiny/AVR Problem
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: MiniPOV3/USBTiny/AVR Problem
are you sure you're using the exact same .hex file?
- myrddin
- Posts: 8
- Joined: Thu Jun 05, 2008 1:07 pm
Re: MiniPOV3/USBTiny/AVR Problem
I have uploaded the hex directly from the firmware zip file and it has worked. If I then delete that hex from the directory and then do a a make test_leds.hex and then upload that new file it fails. I have to be doing something wrong it has to be me. I have tried compiling it on 1 ubuntu machine and 2 xp machines now and still it fails. I only have the USBTiny setup on one machine so I have only done the flashing from it but since stock compiled hex works but not the one I compiled I figured the flashing wasn't the problem.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: MiniPOV3/USBTiny/AVR Problem
try flashing the stock .hex using both, -without- recompiling anything
- myrddin
- Posts: 8
- Joined: Thu Jun 05, 2008 1:07 pm
Re: MiniPOV3/USBTiny/AVR Problem
I can flash any of the hex files from the download zip file and they work just fine no problems at all they do what they are supposed to. When I recompile them on any system and then flash the new hex files they don't work all pins seem to go high (all LEDs light up). I've made an LED Christmas tree for an ornament everything is done but I can't get any compiled hex files to work to finish it.
- myrddin
- Posts: 8
- Joined: Thu Jun 05, 2008 1:07 pm
Re: MiniPOV3/USBTiny/AVR Problem
Ok interesting discover when I look at the hex files for test_leds.hex between the one from the zip file with the one compiled on my machine there is a major difference in size. The one in the zip file is 754 bytes and the one that I compiled is 402 bytes. Is there maybe a problem with the includes or something and not all the code that's needed is getting into build? This is the output when I make the hex.
F:\minipov>make test_leds.hex
Compiling: test_leds.c
avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -f
pack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-ad
hlns=test_leds.lst -mmcu=attiny2313 -std=gnu99 test_leds.c -o test_leds.o
Linking: test_leds.elf
avr-gcc -I. -g -Os -funsigned-char -funsigned-bitfields -f
pack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-ad
hlns=test_leds.o -mmcu=attiny2313 -std=gnu99 test_leds.o --output test_leds.elf
-Wl,-Map=.map,--cref
Creating load file for Flash: test_leds.hex
avr-objcopy -O ihex -R .eeprom test_leds.elf test_leds.hex
rm test_leds.o test_leds.elf
F:\minipov>make test_leds.hex
Compiling: test_leds.c
avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -f
pack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-ad
hlns=test_leds.lst -mmcu=attiny2313 -std=gnu99 test_leds.c -o test_leds.o
Linking: test_leds.elf
avr-gcc -I. -g -Os -funsigned-char -funsigned-bitfields -f
pack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-ad
hlns=test_leds.o -mmcu=attiny2313 -std=gnu99 test_leds.o --output test_leds.elf
-Wl,-Map=.map,--cref
Creating load file for Flash: test_leds.hex
avr-objcopy -O ihex -R .eeprom test_leds.elf test_leds.hex
rm test_leds.o test_leds.elf
- myrddin
- Posts: 8
- Joined: Thu Jun 05, 2008 1:07 pm
Re: MiniPOV3/USBTiny/AVR Problem
OK I got it figured out to some extent. It seems to be a problem in the test_leds.c code. That was the file I kept trying to compile and that's the file that I based my test code on too. I was able to get the alt_leds.c file to work just fine and then copied my code into it. replacing the while section with my own custom code and it all works great now. I don't know why the test_leds.c script doesn't work though but I'm also new at AVR development and have just programed for pcs and arduinos up until now.
- myrddin
- Posts: 8
- Joined: Thu Jun 05, 2008 1:07 pm
Re: MiniPOV3/USBTiny/AVR Problem
Thanks for the help project complete. This is my first avr non arduino project.
http://www.youtube.com/watch?v=PxzTXsQGX28
http://www.youtube.com/watch?v=PxzTXsQGX28
-
- Posts: 1
- Joined: Wed Mar 04, 2009 10:15 pm
Re: MiniPOV3/USBTiny/AVR Problem
Hi,
I was running into the same issue, and think I found the "bug" in the test_leds.c file.
The PORTB assignment prior to the WHILE didn't look right. In the original .c file the statement is PORTB = 0; I changed it to PORTB = 0x0; and created a new test_leds.hex file, and it worked.
Very cool device.....
Chris
I was running into the same issue, and think I found the "bug" in the test_leds.c file.
The PORTB assignment prior to the WHILE didn't look right. In the original .c file the statement is PORTB = 0; I changed it to PORTB = 0x0; and created a new test_leds.hex file, and it worked.
Very cool device.....
Chris
Please be positive and constructive with your questions and comments.