debugger??


Closed Thread
Results 1 to 7 of 7

Thread: debugger??

  1. #1
    Join Date
    Dec 2005
    Posts
    23

    Question debugger??

    Hi everyone!
    After many years of struggling, I have been able to get fairly proficient at structuring code so it works. (usually) What I have the most problems with is getting timing right when using several while/wend statements, pauses, etc, if they are interrelated. For instance, I have a large program that works ok. But if I knew how to change timing and delays and could "see" what is going on it its execution, I could fine tune it to work better.

    I have never been hard pressed to learn how to use debuggers, etc!

    I am using Microcode Studio Plus, Mplab and a Picstart + with latest firmware upgrade.
    Can anyone suggest where I can get info on debuggers and how to use them? Or, if there is something better than debuggers I would like to hear about it.
    Help would be appreciated!
    Thanks,
    Ron

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Hi Ron

    Personally I treat Debugging and Timing as two completely independent processes, Debugging interferes with timing especially if you are using ICD as with MCSP even if you enable/disable sections.
    Debug
    Did you mean you do or do not use the ICD feature in MCSP

    Timing
    For me I choose a pin that is not being used for the routine i am interested in timing and toggle it, then capture the output on a scope or analyser, maybe also there is something that could be hooked up to a sound card. This for me is the only way I have found to accurately "see" timing.

    Duncan

  3. #3
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Red face debugging

    Hi Duncan'
    Believe it or not, I have never learned how to use an ICD. Also, I don't even know if it is in the MPLAB IDE I'm using or how to get started with it. Certain aspects of the code I am working on use pauses, which seem to interfere with each other occasionally. I would use the ICD to look at the lines of code to spot problems that I can't do now, if that is how it works! They're not really "timing" problems but have to do with external pushbuttons working with while/wend statements that have various length pauses in them. Suggestions on how to start using the ICD (if there is one) would be welcome!
    Thanks,
    Ron
    PS I am using ver. 7.60 of MPLAB IDE. In the past, I have found the help files with this program somewhat "unhelpful". Is there a separate program I could use to look at the code line by line?

  4. #4
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Hi Ron

    Have a look at the Help pages in your copy of Microcode Studio Plus, it will tell you everything you need to know to get started using the In Circuit Debugger (ICD).

    I do not have a PICSTART board so I am unable to say if it is easily connected to MCSP ICD. Maybe others who have used both MCSP and MPLAB as an ICD can say which is easier to get started, at a guess I would say Microcode Studio Plus,
    whichever method you choose I would say that it is very much worth the effort.

    Duncan

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PicStart is just a programmer, has nothing to do with MCS ICD. And PICStart can't be launched within MCSP either (Ok there's a known patch but it doesn't work for all PIC)

    MCSP ICD tutorial? yeah, go over there
    http://www.rentron.com/PicBasic/MCS_X3.htm

    Now you could still Buy PICKIKT 2, nice replacement for PICStart, Can be launch from MCS, compatible with MPLAB + may work as ICD... even if pretty slow ~50$.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    It was not my intention to mislead with regard to the PICSTART . I just thought it might be worth looking at to see if one could get access to RX/TX pins at TTL levels.

    In my defence, I had a very quick glance at the PICSTART package and understood it as a development system, together with the fact that the MPLAB IDE download is free, I guessed there must be something more that you get for your 300USD. I accept that the MELABS programmer does not have an independent MAX232, but I do also have Atmel programmers which have a MAX RS232/TTL converter built on; take the target device out and hook up with a couple of crock clips and one could have the MCSP ICD up and running pretty quickly. Ideal for a Sunday afternoon play about.

    I have absolutely no idea what is inside the PICSTART + hardware, because I do not have one, maybe it was worth a look though. I do accept from what has been said that it is not designed to be used in this way.

    As the Data and Clock lines of the ICSP whilst programming are at TTL levels maybe it is possible to get access to TX/RX with a MeLaBs serial programmer.

    However ideally for me it was best to build Hardware units based upon the MCSP help pages and on the excellent RENTRON site kindly provided by Bruce Reynolds ( I have read it many many times. Thankyou very much indeed Mr Reynolds )

    Rgrds

    Duncan


    Just trying to share a hobby

  7. #7
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Thumbs up Picstart

    Hi Duncan,
    Hi Steve,
    I have used the Picstart + for many years and it works well with MPLAB and so far has been very reliable. I have the latest flash in it which allows me to program just about anything in the PIC line.
    I did find out though, that the chip I am using cannot use the debug routine. (12F629), so I guess I'm dead with that issue.
    Most of the time/pause length issues are settled anyway!
    I appreciate all your help though.
    Thanks,
    Ron

Similar Threads

  1. PBP projects for R/C models
    By malc-c in forum Code Examples
    Replies: 771
    Last Post: - 21st October 2016, 12:56
  2. In-Circuit Debugger Mode
    By Darrel Taylor in forum Off Topic
    Replies: 15
    Last Post: - 25th January 2007, 09:50

Members who have read this thread : 0

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