Author Topic: what should happen when you plug in a PIC microcontroller?  (Read 2974 times)

0 Members and 1 Guest are viewing this topic.

Offline bson

  • Supporter
  • ****
  • Posts: 2227
  • Country: us
Re: what should happen when you plug in a PIC microcontroller?
« Reply #25 on: December 13, 2022, 02:25:09 am »
@Doctorandus_P: I know it was my mistake when designing the original PCB, but I'd rather spend a couple minutes on posts to make sure there's no alternative I'm missing before redesigning my PCB and waiting for it to arrive from china (or trying to solder wires to a qfn package and building my own programmer)
It probably wouldn't be overly difficult to connect a few traces or pins to an ICSP connector while waiting for updated boards.  Still need a PICKit or such, though.
 

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: what should happen when you plug in a PIC microcontroller?
« Reply #26 on: December 14, 2022, 06:51:00 pm »
Ok I redid all my wiring, double checked that vdd and vss were indeed connected and the board is getting power when plugged in to usb (measured 5.2V with multimeter), but was still receiving the error: Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.

once (without changing anything) I tried again, it seems to be connecting to the chip, but following error shows up:

Device Erased...

Programming...

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x1fff
configuration memory
program memory
Address: 0 Expected Value: e Received Value: ff
Failed to program device


then it goes back to the could not detect target voltage vdd error even though I still measure 5.2v with a multimeter.

from what I can find online its still probably a bad connection? Thinking it would be easier by now to just order new boards from china with smd assembly (they'd probably do a better job than me) and proper easy to solder to breakout pins.
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 616
  • Country: us
Re: what should happen when you plug in a PIC microcontroller?
« Reply #27 on: December 18, 2022, 04:20:19 am »
I was plagued by similar errors using a Pickit 4 and a similar header pin arrangement. I ended up pulling the header apart and very carefully soldering the crimped wires. Problems vanished.
There's no point getting old if you don't have stories.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: what should happen when you plug in a PIC microcontroller?
« Reply #28 on: December 18, 2022, 04:30:18 am »
I'm sceptical. I had access to a few rolls of Kynar wirewrap wire and it was colossal pain in the ass to solder. Which is totally understandable, as the one thing this wire is NOT designed for, is soldering. It's wirewrap wire, after all.

Maybe you have had better luck with wirewrap wires, but for me, never again. There is no shortage of hookup wires of different diameters and insulation options, so I nowadays buy anything except wirewrap wire.

I've used it for many years, and I've soldered it a lot more often than I've wire wrapped it. Never had any trouble at all getting it to solder.
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: us
  • Not An Expert
Re: what should happen when you plug in a PIC microcontroller?
« Reply #29 on: December 18, 2022, 05:34:15 am »
This whole thread strikes me as an assumption only made by the Arduino generation.  Plug it in, the IDE does some sort of magic, and my LED blinks.  Embedded is easy!

If I plug something in for the first time and it "just works as expected" I buy a lottery ticket.
 

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: what should happen when you plug in a PIC microcontroller?
« Reply #30 on: December 18, 2022, 01:09:44 pm »
I was plagued by similar errors using a Pickit 4 and a similar header pin arrangement. I ended up pulling the header apart and very carefully soldering the crimped wires. Problems vanished.

Could you elaborate? Did you solder wires to the header on the pickit itself or to your board. Arrangement on my Pickit 3 is: female header, male-male header, female-female wire, male - male header, soldered to wires soldered to pic (see pics)
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 616
  • Country: us
Re: what should happen when you plug in a PIC microcontroller?
« Reply #31 on: December 18, 2022, 01:33:28 pm »
I was plagued by similar errors using a Pickit 4 and a similar header pin arrangement. I ended up pulling the header apart and very carefully soldering the crimped wires. Problems vanished.

Could you elaborate? Did you solder wires to the header on the pickit itself or to your board. Arrangement on my Pickit 3 is: female header, male-male header, female-female wire, male - male header, soldered to wires soldered to pic (see pics)
I removed each pin from the plastic carrier and soldered the wire to the pin.  This operation takes a really light touch.  Just 'breath' a bit of solder onto the connector.  Too much and the pin will not go back into the carrier.  Note that these were not factory assemblies.  I crimped and built them up myself.

1667320-0
There's no point getting old if you don't have stories.
 
The following users thanked this post: eigenvektor

Offline Tnixsw

  • Contributor
  • Posts: 22
  • Country: au
Re: what should happen when you plug in a PIC microcontroller?
« Reply #32 on: December 21, 2022, 10:01:34 pm »
The PICkit's work fine, I've used them for ages. The only problems likely (assuming that the PICkit and PIC actually work) are improper connections to the target board which also may have circuitry that interferes with the programmer.

Have you looked in the PICkit manual? It has a small discussion on how to properly connect a PIC while programming and what not to do, and also programming with the PICkit supplying power or from external power. If you follow these fairly simple guidelines, then the programmer should work.


Starting with any new microcontroller is a big ask, especially if you want to start with a bootloader. There are lots of things to learn. Just considering the bootloader, you need to know how the chip operates, how to connect to it, how it is set up internally, how to program it, decide how the bootloader will operate, learn how to write code for the device, write and debug the code, create an interface that can read HEX files and transfer the data to the PIC via some link and deal with errors.

This is not trivial. If you are new to programming these devices, please start small and work up to something larger as you gain knowledge, otherwise you will get into all sorts of frustrating trouble. The PIC 18 series have a lot of internals to set up, depending on what you want, so the best advice has already been given - read the data sheet. It is easy to breadboard a PIC and start with the infamous LED flasher. Just getting to that stage can be an interesting journey.

Bear in mind also, that the PICs have a limited program rewrite capability, but in practice good enough to develop code with.

cheers

Tony
« Last Edit: December 21, 2022, 10:27:17 pm by Tnixsw »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf