PDA

View Full Version : Making the mock-up work alone, separated from its debugging environment



MikeBZH
- 17th July 2009, 19:38
Hello,

Sorry for this newbie question.

My mock-up is now nearly ready to work alone, separated from its debug environment but I cannot find the way to do this step. It is currently a connected to a PicKit2 which takes everything into account under MPLAB. I can program the PIC, launch my program etc.

I would like that, once the PIC is programmed and separated from the PicKit2, the moke-up boots and executes the program by itself after a POR. Currently, when I setup the power in this situation, nothing happens.

Is there something to add to the code, for example to indicate where to start ? Is there any piece of code to link with ? Something else ?

My environement is MPLAB, PicKit2, PBP and the µC is a 18F2685.

Many thanks for your help.

MikeBZH / F8DFN

mackrackit
- 17th July 2009, 21:22
Code and schematic might help.

How are you handling MCLR?

MikeBZH
- 18th July 2009, 13:18
Dave,

Thank you for your answer.

Herewith are parts of the schematic and of the code.
The circuit is intended to deliver some sounds in response to signals coming on RB0:3 and RA4:7. The sounds are recorded in three tables A, B and C
and delivered in PWM form on CCP1. There are also some other stuff including some dialog with peripherals on an I2C bus and an analog signal input (AN0).

The reset circuit is simply R8 to provide a POR.

The hardware is a copy of the 28 PIN Demo Board form Microchip with R8 added to make the POR.

From the software point of view, the program is supposed to start at the label "start:", jump over the datatables, initialize the environment and the variables and then jump again to an area currently used for testing.

I think I have missed something somewhere...

MikeBZH / F8DFN

mackrackit
- 18th July 2009, 13:48
I do not see anything wrong with the hardware, but your code just runs to END and ends.

But, if all works well when connected to the PICKIT2 and I will assume using the PICKIT2 to power the circuit... What are you using for a power supply?

MikeBZH
- 18th July 2009, 16:00
Dave,

The power supply is a DC/DC converter (MAX1724) embedded on the board which converts the 1.5 V from an AA battery to 5.0 V

Michel

mackrackit
- 18th July 2009, 16:22
And how many amps does that give you?

MikeBZH
- 18th July 2009, 20:04
I measured 100 mA on the 1.5V
This should give about 40 mA under 5V

Michel

mackrackit
- 18th July 2009, 21:37
Bet that is not enough. Try a better power supply and see what happens.

Dave
- 20th July 2009, 11:43
MikeBZH, I have designed a 900 Mhz, wireless interface for my wifes DDR pads that interface with a Gamecube or PS2.. I use the same (MAX1724) which powers the receiver and 2 18F2620's as well as 3 leds... I dont believe the upconvertor is the problem...

Dave Purola,
N8NTA

MikeBZH
- 21st July 2009, 22:07
Hi !

I finally got the answer from the Microchip forum :
No gremlins in the circuit nor powr supply issues.

Simply, with MPLAB, I had to select the PicKit2 as a Programmer instead as a Debugger.

And now, it works !

Mike BZH / F8DFN