MAKE Problem

MiniPOV, MiniPOV2 and MiniPOV3

Moderators: adafruit_support_bill, adafruit

MAKE Problem

Postby RichC » Sun May 29, 2011 4:29 pm

Have MiniPOV3 from kit. Using Win XP with serial port. MiniPOV works and I can reprogram it with the supplied .hex programs. However, if I MAKE a .hex file from my own .c program and program the MiniPOV, all the desired LED's are ON constantly (somewhat dimly). The same thing happens if I re-MAKE and reprogram one of the supplied .c programs. It's as if, when I compile, the 'delay_ms' function is not working. Any help would be appreciated.
RichC
 
Posts: 4
Joined: Sun May 29, 2011 4:02 pm

Re: MAKE Problem

Postby adafruit » Tue May 31, 2011 12:10 pm

try using _delay_ms()
do the example programs work?
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: MAKE Problem

Postby RichC » Fri Aug 12, 2011 3:04 pm

Tried using _delay_ms()
Still doesn't work.
As I mentioned before for example, I can program the MiniPOV3 with a supplied program (test_leds.hex) and it works properly. However, if I MAKE a new 'test_leds.hex' file myself from the supplied 'test_leds.c' file and program the MiniPOV3 with this new .hex file and run it, there is the same error (i.e. all the LED's are ON constantly, somewhat dimly).
RichC
 
Posts: 4
Joined: Sun May 29, 2011 4:02 pm

Re: MAKE Problem

Postby adafruit » Fri Aug 12, 2011 6:05 pm

try to add #include <util/delay.h> at the top of the .c file!
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: MAKE Problem

Postby RichC » Fri Aug 12, 2011 8:42 pm

Tried adding #include <util/delay.h>. Still doesn't work.
I noticed that the test_leds.hex file supplied for the kit has a size of 764 bytes.
When I MAKE the same .hex file from the .c file supplied for the kit, the test_leds.hex file produced has a size of 300 bytes.
RichC
 
Posts: 4
Joined: Sun May 29, 2011 4:02 pm

Re: MAKE Problem

Postby RichC » Wed Aug 17, 2011 7:35 pm

FYI:
I have discovered that in my case, during compile, the compiler is removing the empty FOR loop:
for (timer=0; timer <= 4200; timer++);
So essentially, there is almost no delay between writes to PORTB, and that is why the led's look like all are ON dimly.
This seems to be a 'normal' action of the compiler using the MAKEFILE supplied with the kit. Possibly, there is an optimization setting that would eliminate this problem.
RichC
 
Posts: 4
Joined: Sun May 29, 2011 4:02 pm


Return to MiniPOV

Who is online

Users browsing this forum: mibignistinly and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]