0

I have a few pic chips, mainly pic16f72 and pic16f73 on old ups circuits, realized they are not that bad. Their adc capabilities are my point of focus.

I have an esp32 (my first mcu) and i am very disappointed mainly because its adc being crap, I did some research on programming pic chips, some could be programmed via an arduino but my chips were not mentioned anywhere. I wanna program them via my esp32..

Is there a way to program them via arduino (esp32 in my case)? I can build some basic circuits but diy pic programmers require a preprogrammed pic chip which I can't produce if I can't program one already.

8
  • 1
    In principle you should be able to program every PIC, that works with ISP, over an Arduino. Though I haven't done that myself yet – chrisl Mar 20 '20 at 19:17
  • Can you point me in the right direction? I asked here because i don't know pic[s] and if arduino projects on internet for programming them gonna work with my pics – asim Mar 20 '20 at 19:26
  • What exact select criteria for picking pic16F72/73? You mentioned esp32 ADC(which is 12-bit) bad performance so you drop it and pick two MCUs that only offer 8-bit resolution ADC? Getting an Arduino Nano or Uno will give you at least 10bit ADC. If you said ESP32 ADC is a crap because of its non-linearity, it can be calibrate with a Look-up table, here is how I did it, it is still noisier than lower-speed MCU, but it is 12-bit ADC, so depend on what you are looking for. – hcheung Mar 21 '20 at 11:51
  • 8-bit ADC resolution on Pic16f72 means 5/256=19.5mV/bit resolution. 12-bit ADC resolution on ESP32 means 0.8mV/bit resolution. if whatever you are measuring can tolerant 19.5mV/bit, then the non-linearity and the higher noise on ESP32 is probably doesn't matter much to you anyway. – hcheung Mar 21 '20 at 12:09
  • BTW, you can find all the info about PIC IDE and toolchain at Microchip website – hcheung Mar 21 '20 at 12:13
1

For PIC32 you need chipKIT. Not all chips are supported, but most of the PIC32MX and PIC32MZ chips are. Which exact PIC32 chip(s) do you have?

You will need to install a bootloader, for which you will need a programmer. It is possible to build a programmer using an Arduino, though TBH I'd just pick up a cheap PICkit2 clone from China.

As for the 8-bit PICs, no, they can't be programmed like an Arduino, simply because there is no open source C++ compiler available.

0

It seems, that you are talking about 2 different things:

  • The programming/burning of the PIC can be done via an Arduino (so you don't need to build a complex PIC programmer circuit). It is irrelevant, what microcontroller type is on the programmer, as long as the programmer speaks ISP (the programming protocol). So even, when your specific PIC is not mentioned at your found sites, it should work nonetheless. The connections are every time the same, though of your specific PIC the used pin functions might be on other pins (consult the datasheet for this).

  • An Arduino project - meaning the sketch/program, that was written for a normal Arduino, is normally not easily reusable. PICs are different microcontrollers with different hardware, so you need to port those projects to your specific microcontroller, which might involve extensive changes. When you have an Arduino Project, that was directly written for your PIC, then you can reuse it. (Be sure to install the correct core for your PIC in the Arduino IDE)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.