• AVR Freaks

AnsweredLow pin count PIC debugging

Author
LuckyX
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2016/10/30 16:45:44
  • Location: 0
  • Status: offline
2016/11/12 14:32:01 (permalink)
0

Low pin count PIC debugging

Hi, I have PIC16F506 I want to debug, I've read now that I need a debugging tool like MPLAB ICD 3 and a AC162070 special header. But god the prices... Is there some kind of workaround for this? How do you guys debug such low pin count devices? Or can PICkit 3 act as a debugger?
Thanks for replies.
#1
Ian.M
Super Member
  • Total Posts : 13274
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
Re: Low pin count PIC debugging 2016/11/12 15:37:29 (permalink)
+1 (1)
AC162070 is unavoidable as long as you stick to PIC16F506.   Similarly for other LPC baseline and midrange parts, you need their debug header as the PIC itself has no built-in debug support so must be replaced by the header.  Caution: Debug headers are electrically fragile, the -ICD r -ICE PIC on the header is *NOT* available separately, and transition sockets for SMD footprints were discontinued at MicrochipDirect a while back.
 
However AC162070 can be used with any reasonably recent Microchip debugger, not just ICD 3.  PICkit 2 or 3 need an adaptor cable, either AC164110, or DIY (6P6C plug wired straight through to 6 pin 0.1" pitch square pin SIL header), and the obsolete ICD2 requires you to use MPLAB 8
 
Mostly we upgrade to an enhanced Midrange PIC16F1xxx part, and rewrite the code to suit.  By using a PIC with a few more pins than the application requires and  reserving the ICSP pins, breaking them out to a header or at least providing an unpopulated header footprint to fit if required, one can simply debug in circuit on the final hardware, as long as the chosen PIC has built in silicon support for debugging.  This also avoids issues due to the -ICD or -ICE PIC on the header having different silicon errata to the production device.

--
NEW USERS: Posting images, links and code - workaround for restrictions.
I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
#2
NorthGuy
Super Member
  • Total Posts : 6589
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: Low pin count PIC debugging 2016/11/12 17:07:31 (permalink)
+1 (1)
You need both the header and PICkit3.
 
These things are so small that you hardly need any debugging. If you want to debug something, do it with a bigger PIC then re-compile for yours.
 
If you do want to debug, it's a good idea to switch to enhanced 16F1* chips, most of which are debuggable. BTW, they are much better in every respect, and are likely to be less expensive.
#3
Mysil
Super Member
  • Total Posts : 4130
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Low pin count PIC debugging 2016/11/12 21:58:04 (permalink) ☼ Best Answerby LuckyX 2016/11/18 21:11:27
+2 (2)
Hi,
Many PIC devices with small number of pins, ( 8-pin, 14-pin, 20-pin) have no hardware for debugging on the chip.
There are several different ways around:
1.
Use the Simulator in MPLAB, there is no money required, but the simulator is a learning experience in itself,
and it cannot simulate all features exactly.
You will need a programmer tool when you want to run the program on the actual PIC16,
PICkit 3 if you have to buy something, PICkit 2 if you have one already
 
2.
Use a different chip in the same family, to learn until you do not need hardware debugging.
I tried to look, but cannot find any device in the 16F5xx family, that can be debugged without a header.
 
3.
Use a different chip with debugging properties in the chip to learn until you are able to create the software you want. When you have got this far, you may well find that bothering with the obsolete chip do not help much.
There are suggestions in messages above.
 
4.
Use a Debug header for a chip without hardware debugging in the chip.
To be able to debug programs in these chips, there have been made special devices for these chips,
which may actually be a larger chip of the same family, that have been modified to act as the small device with debugging features, and with extra pins.
 
In any case, you will need a Programmer/ Debugger tool for development, if you do not have already.
PICkit 3 may be used with All Microchip microcontroller devices (that may be programmed).
PICkit 3 may be used with a PIC device on a solderless breadboard, there are tutorials around on the web.
Or, you may use a development board together with PICkit 3:
PICkit Low Pin Count DM164130-9, may be used with any PIC16 or PIC18 in 8-pin, 14-pin or 20-pin DIP.
 
There are some development boards with a programmer/ debugger in a separate chip on the same board.
Curiosity Development Board, DM164137, is the current offering from Microchip, it dead cheap,
20$ from Microchip Direct, is less than any PICkit 3, debugging header, or adapter cable alone.
It has a PKOB (Pic Kit On Board) in a chip on the same board.
 
Regards,
   Mysil
#4
LuckyX
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2016/10/30 16:45:44
  • Location: 0
  • Status: offline
Re: Low pin count PIC debugging 2016/11/13 16:12:27 (permalink)
0
Can't thank you enough guys! Appreciated :)
#5
Jump to:
© 2021 APG vNext Commercial Version 4.5