Saturday, August 2, 2014

Minima - Very Little Progress

The lack of posting on my part does not mean that I have not be very actively working on my Minima Controller.

I received from the replacement boards for my damaged Minimal Controller. I loaded the board with as few components as necessary to install the bootloader and verify the microprocessor's operation.

That is were I have been STUCK for the last few days.

The "out of the box" ATMEGA328P-MU does not contain a bootloader and does not appear to be able to converse with my USBTinyISP for installing the bootloader.

The Original Board with
Microprocessor and Crystal
The "-MU" version for the microprocessor solders directly to the PCB, along with its attending (and very small) crystal. The processor works or it doesn't, trouble shooting is very difficult because each can NOT be easily replaced with known good parts, and a short under the part means it removal just for the inspection.

For the new board, I have replaced each part with "package fresh" parts, but with the same results. If I had used the much larger DIP version of the microprocessor, this would have been a no-brainer repair. The DIP version would have been removed and then place into an Arduino-UNO and programmed as per the documentation.

But I still like the challenge of using the very smallest parts that are available, and this has been a challenge.

My original Minima Controller exhibited a similar "brain dead" behaviour when I first turned it ON. But while stumbling around trying different things, it some how got into the correct state and accepted the bootloader. I do not know or understand the events that lead to success.

The ATMEGA328 has what are called "fuses" to configure its operational states. These fuses once set, stay set, and affects further operation. One of the fuses configurers the Clock, which is necessary to run at 16MHz from the crystal, otherwise the Clock runs at a much slower speed via an internal RC clock.  I suspect that my new microprocessors are running a the slow speed and therefore unable to accept my bootloader from the Arduino IDE.
The previous board was damage, but with the aid of the microscope and some very intense micro soldering, I think I have repaired the damage. But alas, the newly installed replacement processor is behaving exactly as that of the new board (at least the two board are consistent). I just need to find the "Magic" that will allow them to accept the bootloader.

Jeff - KO7M, has been providing suggestions to help with my problem. So far nothing has worked.

Once the bootloader is accepted, programming the Minima Controller via the Arduino IDE is a breeze.

Hopefully, good news will follow.



  1. In similar situations, I have found that feeding a ~1 MHz, 5 Vpp square wave into the X1 terminal (even when the 16 MHz xtal is still connected) can often get the ISP talking to the ATmega. If you haven't tried that, then it is probably worth a shot.

    Good luck,
    Jason NT7S

  2. Hi,

    by default, your programmer should be too fast for the microcontroller running from its internal clock - the handshake between the microcontroller and the programmer will fail. Arduino uses the avrdude programming software. It comes with a "terminal" mode where you can change the SCK timing. Try the following:

    (1) connect to the microcontroller with the plain avrdude command in terminal mode (avrdude -p m328 -c -t, the commandline should be printed without the "-t" parameter in the arduino IDE)
    (2) Slow down the programmer: Issue "sck 10" in the terminal mode
    (3) List the microcontroller spec with the "part" or "sig" commands

    See also

    If the programmer can access the microcontroller your hardware should be fine. You can then set the fuses manually using avrdude and the "-B 10" commandline parameter (which does the same thing as issuing "sck 10" in the terminal mode.

    I use the USBasp programmer because it has a jumper that allows you to quickly adjust the clock speed for "empty" chips. They're also really cheap and durable.


  3. Thanks for the comments and ideas. I have solved the problem as described in a following post.

    Again, Thanks