In Circuit Debugging stops working?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: In Circuit Debugging stops working?

    Hi All!
    You guys are very correct and I do have the MAX232 and with the 16F628A ICD works fine now with a 20 Mhz resonator. What I did not know is that it is necessary to look at the .info file for a given PIC to know what the default(s) are. Turns out that with a 16F628A the default OSC setting is XT. In the beginning of the .info file are 3 config statements that you need to copy and paste into your code to change the XT to HS. Then everything will work fine! There is one PIC I can never seem to run in ICD mode and that is a 18F1320. I know this device uses different pins for TX and RX and checking the .info the default OSC setting is 20 Mhz. Any change someone has known good working code I could use just to do some further checking? Thanks, Ed

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: In Circuit Debugging stops working?

    Hi All! Turns out that the 18F1320 is a "unique" PIC requiring special handling. First the following lines are required for it to operate at 20 Mhz:
    #CONFIG
    __CONFIG _CONFIG1H, _HS_OSC_1H
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L
    #ENDCONFIG

    Next a very wonderful person Dannel Taylor sent me the attached file for the ICD to work. As part of the "trouble shooting" process I discovered that if you jumper the TX and RX out of the MAX232 that goes to the PIC in MicroCode Studioss you can open VIEW, Serial Communicator, then "connect" and type something and if your computer is talking to the MAX232 then it will echo back what you typed! If it does not then you can check that your computer comm port settings are correct and that the MAX232 is working. It's nice to have the warm and fuzzy feelings knowing at least how far things are working! Hope this helps others.

    Best, Ed
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default Re: In Circuit Debugging stops working?

    Sorry to tell you but there is nothing special or unique about it.
    The configs posted are typical.

    But , Good job figuring it all out.
    Dave
    Always wear safety glasses while programming.

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