Microcode Studio Plus Loader?


Closed Thread
Results 1 to 14 of 14
  1. #1

    Arrow Microcode Studio Plus Loader?

    Hi Picers

    I am using MicroCode Studio Plus and PicBasic Pro and I designed MCLoader hardware as described here
    http://www.picbasic.co.uk/forum/show...ght=bootloader

    I pluged this device to my computer's serial port and when I tried to compile and program my source code, for 16F877 @ 4MHz, I have a problem "Reset Required, please reset the target microcontroller in order to access to the bootloader process... ".

    In the help file they said "Before using MicroCode Loader, you need to ensure that the bootloader firmware has been programmed onto the target microcontroller.", how do I do this?

    Thx
    Last edited by koossa; - 29th November 2005 at 05:00.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    You have to use some other programmer - EPIC, Microchip's PICSTART PLUS or ICD2, etc to first load the appropriate loader file into your chip.

    In your case, it would be 16F877_04.HEX , generally found in

    \\... \CodeStudioPlus\MCLoader\16F877


    After that is loaded, you can then reload code quickly whenever needed through the serial port. Very handy for debugging or field upgrades.
    Charles Linquist

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Charles, Thank you, I will try it!!

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I have upload the hex file (16F877_04.hex), but still gets the "Reset Required, please reset the target microcontroller in order to access to the bootloader process... ". error if I try to program it through my serial cable?

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    You need to insure that the serial port is working properly on both machines.

    On my PC, I simply connect pins 2&3 together on the serial cable and hit a key. If the character echoes, then the PC end is working.

    On the PIC side - Write a very simple program, such as:

    DEFINE OSC 20 (or whatever it is)

    DEFINE HSER_RCSTA 90H
    DEFINE HSER_TXSTA 20H
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1
    DEFINE LOADER_USED 1

    Dummy VAR BYTE

    Begin:

    HSEROUT ["Press Any Key "]
    HSERIN [Dummy]
    HSEROUT ["You Pressed ",Dummy,13,10]
    GOTO Begin

    END

    The program above will prove that the PIC is sending and receiving characters - something it must do before any bootloader can work.
    Charles Linquist

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Hi Charles

    Both sides are working perfectly, I am doing serial comms using HSEROUT and HSERIN.

    Thx

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Make sure Microcode Loader is set to use the correct serial port on your PC.
    Charles Linquist

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Yes, I have set that to Comm2.

  9. #9


    Did you find this post helpful? Yes | No

    Default

    I'm Using the PIC16F877 20/P with a 4MHz Crystal and then upload the 16F877_04.hex file.

    Could my problem maybe be the "20/P"

    Thx!

  10. #10
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by koossa
    I have upload the hex file (16F877_04.hex), but still gets the "Reset Required, please reset the target microcontroller in order to access to the bootloader process... ". error if I try to program it through my serial cable?
    You say you are successfully doing serial comms already but this only requires TX and RX (as does the bootloadr for actual programming) but you need a way to restart the PIC so that it looks for the bootloader when it boots from a reset.

    Do you have the DTR (Pin4) line connected to MCLR so that the bootloader can reset the PIC ?



    IF not, you either need to do that, or have a reset button on your PCB that you can reset the PIC with (or power down the PIC).

    I prefer the reset button method personally as previously when using the DTR line my program would reset when I opened the serial port on the PC.

    Regards
    Keith

    www.diyha.co.uk
    www.kat5.tv

  11. #11


    Did you find this post helpful? Yes | No

    Default

    Hi Keith

    Thank you very much for your reply.
    I have setup my PCB as described in this thread:
    http://www.picbasic.co.uk/forum/show...ght=bootloader

    But I did not build the reset button in, I have connect MCLR to the 10uF capacitor and the capacitor then goes to Pin9 on the MAX232.
    Must I put the reset button in, as described on the thread above?
    If so, when do I press the reset button?

    Thx
    Koossa

  12. #12
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by koossa
    Hi Keith

    Thank you very much for your reply.
    I have setup my PCB as described in this thread:
    http://www.picbasic.co.uk/forum/show...ght=bootloader

    But I did not build the reset button in, I have connect MCLR to the 10uF capacitor and the capacitor then goes to Pin9 on the MAX232.
    Must I put the reset button in, as described on the thread above?
    If so, when do I press the reset button?

    Thx
    Koossa
    Hi Koossa,

    I hadnt heard of the capacitor coupled version. It is exactly the same circuit except for the 10u capacitor instad of a 100R resistor. The difference being that instead of pulling MCLR permanently low it will only provide a short pulse. Maybe it is not pulling it low enough or for long enough.

    The Reset button *shouldnt* be needed but having it gives the option of manually resetting your PIC at any time.

    When the bootloader is displaying a message saying it is waiting for a reset, connect the MCLR pin to 0V momentarily and it should then reset the PIC and bootload the new program.

    Just had a few more thoughts.....

    1. When you programmed the bootloader into your PIC did you make sure that the MCLR pin was set as MCLR and not an IO pin ?

    2. Is your MCLR pulled up with a resistor or have you tied it directly to +5V ?

    3. Is Microcode loader set to "Auto" baud rate or is it fixed at the wrong speed?

    4 Try the bootloader circuit with 100R instead of 10uF !

    Other than that I cant think of anything else

    Regards
    Keith

    www.diyha.co.uk
    www.kat5.tv

  13. #13


    Did you find this post helpful? Yes | No

    Default

    Hi Keith

    1. When you programmed the bootloader into your PIC did you make sure that the MCLR pin was set as MCLR and not an IO pin ?
    How do I do that?

    2. Is your MCLR pulled up with a resistor or have you tied it directly to +5V ?
    With a Resistor.

    3. Is Microcode loader set to "Auto" baud rate or is it fixed at the wrong speed?
    Yes, to Auto

    4 Try the bootloader circuit with 100R instead of 10uF !
    Thx, I will try that.

  14. #14


    Did you find this post helpful? Yes | No

    Default

    When the bootloader is displaying a message saying it is waiting for a reset, connect the MCLR pin to 0V momentarily and it should then reset the PIC and bootload the new program.
    I have connect the MCLR PINT TO 0V, but it still don't work.
    I'm using the Max1672 switching regulator, and it has a soft on pin, so I must press the ON button on my keypad for the power to go through to my PIC.
    I have done this and then momentarily connect MCLR to GND, but still no luck?

    Any idea what else I can try?

Similar Threads

  1. 16F877A Microcode Studio won't compile
    By curt66111 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th November 2009, 19:35
  2. Interrupt & device setup for a PIC16F628A in Microcode Studio Plus
    By wildpikachu in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 3rd May 2008, 16:28
  3. Microcode studio loader problem
    By woodygjw in forum General
    Replies: 2
    Last Post: - 10th September 2007, 01:18
  4. Microcode studio and USB pics
    By KPDes in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th May 2007, 09:28
  5. How to used ICD of microcode studio
    By chai98a in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th November 2005, 00:29

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