Making the mock-up work alone, separated from its debugging environment


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80

    Default Making the mock-up work alone, separated from its debugging environment

    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

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Code and schematic might help.

    How are you handling MCLR?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    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
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    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

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    And how many amps does that give you?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    I measured 100 mA on the 1.5V
    This should give about 40 mA under 5V

    Michel

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Bet that is not enough. Try a better power supply and see what happens.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    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

  10. #10
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    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

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts