Page 1 of 1

Microstick

Posted: Sun May 15, 2011 1:02 am
by boyce
Has anyone successfully compiled for the Microchip Microstick?

I was hoping I could just bring the generated project into MPLAB, compile it, and upload it to the Microstick (it uses the Start Kits Tool). The code compiles just fine, but when I upload the code I get

"Starter Kit board connected
Firmware version: 00.00.03
Programming and verifying...done
Unable to Enter Debug Mode
Target removed"

and then it refuses to recognize the board as a Starter Kit.

Anyone else have better luck?

Thanks.

Re: Microstick

Posted: Sun May 15, 2011 4:58 pm
by LubinKerhuel
Lee, I just copy the solution you sent by email
Mail - Lee wrote:I found the problem; it was the configuration bits. I had left the previous settings which had an external oscillator. The Microstick only uses an internal oscillator, so in the Master block, I needed to set Oscillator Mode to Internal Fast RC (I also turned off the PLL for now). Apparently, the wrong clock bits throws MPLAB off so that it doesn't recognize the device as a Starter Kit.
Alternatively, you could also add a quartz (or external oscillator) to the kit. This solution is quite easy and gives you the possibility to use a serial bootloader. (And serial connexion also, internal RC is not precise enough. The blockset is not able yet to measure timing for correcting he baud rate)

I attached an early example here, where I tested the new clock switching capabilities.
It is now possible to have a bootloader running at a fixed frequency (PLL), and to configure the application with another PLL configuration.
Note also that a simulink block (from blockset) allows to do clock switching for saving power for example (however, peripheral will not works correctly then)
All these functions are working, but not documented yet and without example also ;-)

I attached here the firmware of a bootloader based on ds30 using the microstick where I added a external clock running at 4MhZ.
A simulink model running at a frequency different from the bootloader is also present.

Lubin