Author Topic: Digispark: Micronucleus jumper configuration - removing the 5 second delay  (Read 9305 times)

nate1421

  • Newbie
  • *
  • Posts: 2
Hi

I'm attempting to remove the 5 second initial programming delay on the Digispark by using a bootloader that relies on a jumper to decide whether it is about to be programmed or to rather execute it's own program. I have the Digispark version where the onbaord LED is on P1.

Steps taken so far:
- I installed the Micronucleus USB drivers.

- I downloaded the Micronucleus jumper update bootloader hex file here: https://github.com/micronucleus/micronucleus/blob/v1.11/upgrade/releases/micronucleus-1.11-entry-jumper-pb0-upgrade.hex

- I plugged the Digispark (with no jumpers attached) into a USB port

- I executed "micronucleus.exe" with the newly downloaded hex file and it successfully uploaded.

- I then wrote and uploaded a simple program to make the onboard LED blink using the Ardunio IDE and it successfully uploaded.
after it finished uploading the console displayed:
Code: [Select]
> Starting the user app ...and then the onboard LED started blinking on the Digispark.
(no jumpers have been attached yet)

However when I unplug and then re-plugin the Digispark. It never runs the LED blink program, it rather sits in its bootloader mode waiting for another upload (which can be performed successfully)

This always happens even when adding a jumper in any of the configs below before re-plugging it in:
(5V)-------(P0)
(5V)-------(10KOhm resistor)----------(P0)
(gnd)-------(10KOhm resistor)----------(P0)

Voltmeter readings:
(5V) and (gnd)-> 4.8V
(5V) and (P0)-> 0V
(gnd) and (P0)-> 0V

I do not know how to interpret the following code concerning the jumper found in the "bootloaderconfig.h" file:
Code: [Select]
/*      JUMPER_PIN     Pin the jumper is connected to. (e.g. PB0)
 *       JUMPER_PORT    Port out register for the jumper (e.g. PORTB) 
 *       JUMPER_DDR     Port data direction register for the jumper (e.g. DDRB) 
 *       JUMPER_INP     Port inout register for the jumper (e.g. PINB)  */

#define JUMPER_PIN    PB0
#define JUMPER_PORT   PORTB
#define JUMPER_DDR    DDRB
#define JUMPER_INP    PINB

tl;dr - How do I add the jumper to make my program run?

nate1421

  • Newbie
  • *
  • Posts: 2
Re: Digispark: Micronucleus jumper configuration - removing the 5 second delay
« Reply #1 on: September 24, 2015, 07:41:51 am »
Fixed it. I was missing the "--run" parameter when executing micronucleus.exe.