• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to use debugger with PIC microcontroller

Not open for further replies.


Well-Known Member

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 no problem.

However, what do we do next?

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

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I seems like a debug solution used in the Arduino environment...

Every now and they stuff specific data down the serial port to a terminal... Any terminal program will work.. Personnaly I use teraterm or Putty... Both are free to use.. All you will see is ascii data on the terminal screen... You will, however, need a ttl to USB convertor... About £6 on ebay...
Last edited:


Active Member
It's just like thinking a CRO will solve your problem.
You should have never got to the stage of having a problem.
Find out where the problem is located by simplifying your program and/or by adding a subroutine that gets called and either outputs a blinking LED or a tone.
This will let you know if the micro has reached the particular location.
This is the way to "home-in,"


Well-Known Member
Most Helpful Member
Flyback has the guy written in a debug code? Sounds like its set up to spit out information. How come he wont debug it with the source code? Depending what the problem is, seems to make more sense if you can see registers and set break points.

Oh and I second putty or terra term, both good programs and free. The save file thing makes me think he wants the output? is that correct?
Not open for further replies.

Latest threads

EE World Online Articles