Arduino Mini Resets while program is running.


I have an Arduino Mini Rev5 (NOT a pro mini) with an atmel 328p. Data sheet says 32KB of flash.

My program will run until until I change it to the main running state (its a Finite State Machine) and it freezes and resets.

If i modify the program until "sketch size" is approx 15KB, everything runs like a dream

When I introduce a certain function (prints floats to an LCD screen) my "sketch size" jumps up to 17KB and that is when i run into problems.

I have already run a simple "freeMemory()" test that executes during that specific state, and reports 1436 free bytes of RAM so i don't think that is the issue here.

Is there something I am missing? Thanks for any advice. I am happy to post any code but not sure that it will help.


Not gonna get anywhere without it, that’s for sure.
Schematic would help also.

//Trip Meter myGLCD.printNumF(trip, 4, 1, 40, 3, '0');

This is for a mileage readout on a nokia 5110 screen. The function takes a float prints a to the screen. "trip" is a float.

Because this function is not used anywhere else in the program, I believe the linker does not add it to the program memory. The moment I introduce one instance of it, sketch size jumps up ~2KB

If i use this function

myGLCD.printNumI((int)trip, 4, 40, 3, '0');

"trip" prints as an int and there are no problems.

I am using this library:


definitely an ID-10-T error

Forgot to include a parameter. for [length] in the printNumF function. It somehow compiled anyhow.

Thank you all for your patience.

So you're all set then? You can do all kinds of stuff that will compile, and just not work. Biggest blunder of course: = when == was needed.

I have a software engineer friend who demo'd some code that would make a board catch on fire! Management didn't believe it could happen, so he had to demo it a 2nd time. Fun times :) Conflicting bus drivers overheating and drawing too much current was the cause in the end I believe.