PIC 16f690 - ICD2 PicKit3 and TL866 - Page 1
Forum section: electronics / general

author: Gixy
author_rank: Regular Contributor
timestamp: February 07, 2016, 09:10:41 am
content: Hi,I have a project with a PIC 16F690, TSSOP package, ICSP connection. I know that I need a special header if I want to debug but I only need to program it.First try with ICD2: connected, selftest passed but ´invalid target device' error. No access to deviceThen I try PicKit3: unable to read device IDLast try with TL866C: read and write without problem!So, I can continue my project but why can't I use Microchip tools with this device? (MPLAB 8.92, VirtualBox Windows XP SP3 on Windows 10)ThxDenis

author: KL27x
author_rank: Super Contributor
timestamp: February 07, 2016, 09:10:47 pm
content: I have never used ICD2.I find the ICD3 and PK3 are very sensitive to ICSP layout.Any unintentional capacitance on the MCLR or CLK line on PK3 will cause failure. Once I left a 3 inch stray jumper wire attached to my CLK pin with the end N/C (was doing some testing with that pin), and I found removing and replacing this bare wire caused the PK3 to work/fail. Also have once put a signal FET on MCLR, which worked fine with PK2 but caused failures with PK3.ICD3, I have random failures all the time that makes ICD3 useless for production/batch programming. Once working, it seems fine for dev. But swap in a new chip and random fail, all over.There are also a few traps with a new PK3's firmware that can cause problems. I would not consider a new PK3 to be working until it has been verified on your setup with another chip, at least.

author: Gixy
author_rank: Regular Contributor
timestamp: February 07, 2016, 11:36:56 pm
content: Thanks for your comments.MCLR with 10k pull-up to VCC, no cap.Clock and Data lines directly connected to PIC.Nothing on the VCC rail (except some nF caps) to absorb the current generated by VPP thru the 10k pull-up: can this be the problem and then why TL866 works? With more complex circuits I used to put a diode in serial with the 10k resistor in order not to load the programmer.I'm waiting for the final PCB and will try with another chips when I receive them.

author: Gixy
author_rank: Regular Contributor
timestamp: February 29, 2016, 01:56:25 pm
content: I got the new PCB and assembled it. Results are the same: "invalid target device" with ICD2 and Pickit3, no problem with TL866A (ICSP).

author: KL27x
author_rank: Super Contributor
timestamp: February 29, 2016, 09:19:08 pm
content: An external pull up to Vdd rail on MCLR is a definite nogo for microchip programmers when using HVP, resulting in Vdd error.This part has an internal pull up when used as mclr. If mclr is active, just remove your external pullup. If using RA3 as an input then use the diode plus resistor.Hopefully this is your only problem. With PK3, If I even touch mclr and or dat/click lines with a finger, programming fails.Check out the enhanced midrange parts. Supply down to 1.8V, lower quiescent current, internal PLL, enhanced instruction set, more feature and options, similar cost. There are parts basically pin 4 pin compatible. And with selectable internal pullup on Mclr/RA3, when it is used as an input.I have used 690, and I am now using 16f1828. You could be able to port your project in minutes. 1828 is actually a bit cheaper.For assembly, the new BRW instruction is a huge improvement, alone. Just make sure you understand it can't cross a mini page boundary. Actually, in hindsight I suppose it is sorta the same thing as addwf PCL,f.

author: Gixy
author_rank: Regular Contributor
timestamp: February 29, 2016, 09:48:36 pm
content: Thx KL27x, I'll think about all that and considering replacement of MCU.Still don't understand how works the TL866A...

author: KL27x
author_rank: Super Contributor
timestamp: February 29, 2016, 09:51:21 pm
content: TL866A must not be verifying VDD as accurately, if at all.high voltage on VPP will pullup the entire Vdd rail thru an external resistor. Maybe not above max spec, but it is surely undesirable.

author: Gixy
author_rank: Regular Contributor
timestamp: February 29, 2016, 10:30:41 pm
content: You're probably right. I'll try removing the pull-up on MCLR and see if it works. Thx again.

author: Gixy
author_rank: Regular Contributor
timestamp: March 07, 2016, 06:40:23 am
content: Same problem with a diode and res on MCLR pin which is set as input.