+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Advanced Member level 5
    Points: 23,742, Level: 37
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    4,996
    Helped
    393 / 393
    Points
    23,742
    Level
    37

    Running micro and debugger to find problem with code?

    Hello,
    Our remote software engineer wants us to run some debug code on our controlled lighting system.
    There is a problem with it and he says if we use the debugger it will help us diagnose where in the software its going wrong.
    The micro is PIC18F26K20.
    He says we should connect up to pin 14 (TX) and gnd at the micro.

    We should then run wires from these pins to the USB port of a laptop.

    He says we will also need a “serial data to file” program, and he says he uses “coolterm, so i guess we have to buy/download that?

    Do you know what program we need to use to capture the debug data?...is it MPLAB IPE v3.26? ...he has written us the code that we need to load for the purpose....we loaded the hex file into the micro no problem, using pickit3.

    However, what do we do next?

    Do we need to set up MPLAB IPE in debug mode or something?

    •   Alt21st April 2017, 11:40

      advertising

        
       

  2. #2
    Advanced Member level 4
    Points: 7,315, Level: 20
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,307
    Helped
    306 / 306
    Points
    7,315
    Level
    20

    Re: Running micro and debugger to find problem with code?

    K-series doesn't support realtime debugging. It is microchip, dude. Welcome to middleages.
    Love me or hate me. All infractions will be ignored.



    •   Alt21st April 2017, 12:01

      advertising

        
       

  3. #3
    Advanced Member level 4
    Points: 5,122, Level: 16

    Join Date
    Jun 2016
    Posts
    1,108
    Helped
    118 / 118
    Points
    5,122
    Level
    16

    Re: Running micro and debugger to find problem with code?

    Tx pin in PIC is UART pin and most probably the programmer has provided UART debugging option that is the current state of code execution is printed on UART. You can use any Serial terminal Software to view the debugging data. You will need TTL2USB adapter to connect PIC UART to PC USB port.



    •   Alt21st April 2017, 12:12

      advertising

        
       

  4. #4
    Advanced Member level 5
    Points: 11,272, Level: 25
    Achievements:
    7 years registered

    Join Date
    Apr 2010
    Posts
    1,733
    Helped
    374 / 374
    Points
    11,272
    Level
    25

    Re: Running micro and debugger to find problem with code?

    Is it under Windows or Linux ?

    The info given is sketchy but i understand that your SW engr has sent you a debugging code for downloading to PIC and when it is executed it will emit all info for further analysis.

    You must have a serial data reader from PIC UART which can be carried out by the PC with an USB2Serial converter.

    The data read (which is the debug data ) can be saved as file and sent to the SW Engr.



  5. #5
    Super Moderator
    Points: 22,482, Level: 36
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Portugal
    Posts
    6,861
    Helped
    835 / 835
    Points
    22,482
    Level
    36
    Blog Entries
    5

    Re: Running micro and debugger to find problem with code?

    He says we will also need a “serial data to file” program, and he says he uses “coolterm, so i guess we have to buy/download that?
    Most serial communication interface programs ( actually all of them, AFAIK ) supports capturing received data to file, so you could selecct anyone. The Hiperterminal - wich is no longer available on Windows package - is one which has this feature, but you would be succedded just for standard ASCII characters ( alphabetical, mumerals and symbols ), not for control characters. For Windows there is the Realterm, a nice tool.

    Our remote software engineer wants us to run some debug code
    In the programming field, we use the term 'debug' ( the verb ) also as a general denomination to designate the process of extracting information from the system, and there are a lot of approaches. The scheme that he's using is certainly by issuing characters from within certain parts of specific routines, and this works pretty fine if used correctly.

    Do we need to set up MPLAB IPE in debug mode or something?
    No, just program the hex file to the target and release the Reset pin on the IDE, it's all you need.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



--[[ ]]--