Notifications
Clear all

PIC Programming

20 Posts
6 Users
5 Likes
750 Views
(@mikestarzec)
Member
Joined: 5 months ago
Posts: 2
Topic starter  

Have you ever produced a video on PIC Programming?


   
Quote
Topic Tags
MrRemedy
(@mrremedy)
Developer, Engineer
Joined: 3 years ago
Posts: 24
 

I too would be interested in anything on PIC Programming from the DroneBot Workshop.  I'm totally blown away with the entire PIC family of Micro-controllers.  Albeit there a large eco system for it.  They are more powerful than Arduino, ATMega, ATTiny, STM32.  Its just that you have to be patience with them.  I've found a lot of interesting projects on them with the free programmer IDE (Assembly and C based languages.  The one thing that got me looking toward a PIC was an application for a PIC10F200 used in an Electronic Dice.  I took out the chip and used my PROM Programmer to read the internals, however, I would need some way of reading the individual OP Codes and translate it back into Assembly to figure out how they were doing it.  But yeah, there's a ton of YouTube videos on how to use them in projects, USB integration, USART, SPI, I2C communications.   As I suffer from ADD, I can't seem to narrow down a specific niche of what I'd like to do with these little guys.

 

-d


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @mikestarzec and @mrremedy,

   Microchip certainly have a large catalogue of parts, and I recall using some of their first few designs that, at the time, were novel in that they provided the programmability of a simple microprocessor, complete with I/O pins, flash memory and so on, in a 'standalone' package that was more generally used for logic chips, including the ubiquitous 74xx range. Thus, they occupied a new technical and market niche, somewhere midway between the 74-series and microprocessors/microcontrollers.

At that time, it was reasonable to regard 'PIC' as a 'style' of device, as there were only a handful of different parts, and they were all fairly similar in style, and generally only differed in the number of I/O pins. (I maybe slightly oversimplifying their initial range, but that is the impression left on my ageing memory.) 

Since then the range has been hugely extended, with many devices for specific applications, so there must surely be a good chance of finding a device that matches the requirements, providing you can track it down!

Admittedly, you could peruse their catalogue list, choose a device, and then try to find a 'problem' that your chosen device will address, but that can be a tough route to follow. Generally, it is better to start with the overall 'problem' or 'aim', and look for a solution.

----------------

I haven't performed a direct performance comparison, but whilst the older Arduino devices use relatively old microcontroller designs, with consequent modest performance, there are now a growing number of alternatives from a variety of sources, some providing relative high processing performance at very low cost. Perhaps the best known of the very low cost are the ESP32 family, which can be programmed using a number of IDEs, including the Arduino IDE. This provides not only relatively high processing performance, but also built-in Wi-Fi communications. However, this is just one possibility of many to consider. 

------

But before spending too long on looking at all of the options, I would suggest that the first thing is to consider what you would like to do, and hence list the capabilities that will be required to meet that need. Then start looking for device(s) that match the requirements. Of course, Microchip's PIC range may well have the ideal part!

Plus, if you have an idea for a project, if you post a message on this forum, explaining what you would like to achieve, I think it is highly likely you will get some suggestions of devices to consider and so on, which might be a good way of starting.

Best wishes and good luck with your search, Dave


   
ReplyQuote
(@mikestarzec)
Member
Joined: 5 months ago
Posts: 2
Topic starter  

Hi Dave,

 

I don't have a problem with identifying a relevant chip to work with, my big problem is with actually programming the physically bigger chips e.g. PIC16F887 I/P format. Using a PICKIT 3 or 4 I can program the small chips but I keep coming up on problems trying to program the bigger chips. Some handholding or guidance would be much appreciated. Kind Regards Mike


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @mikestarzec,

re: my big problem is with actually programming the physically bigger chips e.g. PIC16F887 I/P format. .. etc.

OK, that sounds like a specific issue to address. Sorry, the word 'programming'  has a wide range of interpretations, including how to write the source code, etc., but from your follow up, it sounds like you can write the program compile and link it to produce the executable file, but have concerns about transferring that file onto the microcontroller itself. Furthermore, you are only having problems with larger devices, such as the PIC16F887.

Have I interpreted the question correctly this time?

Unfortunately, I do not have a PICKit 3, or PIC16F887 to try to reproduce the problem. I note that on the Microchip website it says that the V6.15 of MPLAB IDE has enhancements (cf V6.10) regarding PICKit 3 and ICD 3 support, but I guess you have already installed the latest version.

So sorry, I probably can't help you, although it is possible others will be in a better position.

I presume you have a specific reason for choosing this device. At first glance, it appears to be an 8-bit processor with a number of I/O functions including several serial formats and a multi-channel 10-bit A/D supported by a processor operating at up to 5Meg instructions/second. Program memory of 8 kwords, 368 bytes SRAM and 25 bytes EEPROM. I appreciate it includes some unusual features which may be hard to find elsewhere, but in many respects this is very much lower specification than (say) an ESP32, which is available on a 'dev board' etc at roughly the same price as the bare PIC16F887 chip.  The ESP32 dev boards can be directly plugged into the USB port of a PC, without the need for separate programmers, and are supported by a range of different free open source IDEs.

Without a full understanding of the needs of your project, I cannot make a meaningful assessment, but I would recommend you consider looking at the more recent devices now available. I am not sure when the PIC 16F887 was first release, but I note the data sheet has a copyright date range of 2006-2015, and data sheet revision history starting at May 2006. Processor technology has advanced a good deal during this time.

Whilst Microchip may be willing to support long-term major customers who buy millions of devices, unless this device has a 'cult' following for a particular use, I think you will struggle to find many amateurs who are still using these devices for new projects, and hence support will be limited.

----------

Sorry, if this is not the answer you were looking for, but this is the best answer I can find.

Best wishes and I wish you well with your projects, Dave


   
Ron reacted
ReplyQuote
Graham1904
(@graham1904)
Member
Joined: 5 months ago
Posts: 11
 

Beware as MPLAB X v5.00 has no support for PicKit3 any more and PicKit4 is an expensive programmer. Download and use MPLAB v6.92(?) (the last v6.00 before vX) from the Microchip archive store and PicKit3 works the pre MPLAB X IDE.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @graham1904,

 Thanks for your 'hands-on' addition to the position. I simply used the Microchip website to see what tools they were suggesting, in the hope it was accurate, albeit past general experience suggests that support info and reality can sometimes be found to be in different universes. 🤔 

-------------------

I started at the stated chip PIC16F887 page ... https://www.microchip.com/en-us/product/pic16f887

and followed links on that page in Design Tools Section, to  MPLAB X IDE, which after clicking a 'Learn More' box link, expanded the page to include a summary section entitled

"Features and Enhancements in MPLAB X IDE v6.15"

This included :

In this MPLAB X IDE release, you will find many enhancements that will increase your productivity, such as:

  • Reintroduction of native support for the PICkit™ 3 Programmer/Debugger, the MPLAB ICD 3 In-Circuit Debugger and many evaluation boards without needing the update required in version 6.10

which suggested to me that Microchip had changed their mind, and were now continuing to support PICkit 3 with newer versions of the MPLAB X.

Suggesting, it should be possible to download this version, and also updated compilers, and use it with PICkit 3 and the PIC16F887.

---------------

Of course, I may have misinterpreted their website, but maybe it is worth a look if this or other Microchip devices are of interest?

Best wishes, Dave


   
ReplyQuote
Graham1904
(@graham1904)
Member
Joined: 5 months ago
Posts: 11
 

@davee MPLAB X v6.15 is 100% for that PIC16F887 that you mentioned, but the IDE does not support the PicKit-3. What I mean is that going back to MPLAB v6.92 (or when the version ends) in the Microchip archive. Or use MPLAB X v6.16 and PicKit-4 🙂


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @graham1904,

So you have found this bit from https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide : (click on image to enlarge)

image

REALLY doesn't exist in this universe 🤔

That's Crazy ...

   To me, contradictions with reality suggest it is time to look elsewhere.

Take care & best wishes, Dave


   
ReplyQuote
MrRemedy
(@mrremedy)
Developer, Engineer
Joined: 3 years ago
Posts: 24
 

Good discussion.

I'm currently on Version: MPLAB X IDE v6.10 (Planning on upgrading soon)
OS:  Linux Mint 21,2 (Victoria)

For my first project involves doing some simple on an 8 PIN DIP PIC12F675 electronic die to get my feet wet.

I've seen many pages out there for how to program a rolling dice program for simplicity. 

I wanted to try my hand at PIC Assembly via the XC8.   I ran across a bunch of YouTube videos on how to program the famous blink LED (Hello World) program, but most fo these are based on the previous version of the Assembly Compiler. 

I came across this Solder Kit and seen a rudimentary example of what this uCU does in this circuit.  Very educational.
Velleman MK150-VP Shaking Soldering Kit

(Amazon: Velleman-MK150-VP-Shaking-Soldering-Kit)

For the PICKIT 4,5 etc, I've found a few of them on eBay for around $50 USD.  

 

"It's a journey not a destination"

This post was modified 4 months ago 2 times by MrRemedy

-d


   
ReplyQuote
 dw
(@dw)
Member
Joined: 3 years ago
Posts: 15
 

Posted by: @mikestarzec

Have you ever produced a video on PIC Programming?

 

I started programming PICs back in the 80s 

But through the years - PIC projects have been few and far between.

I recently programmed a 16F688 to function as a controller for a telescope stepper motor system.

Fortunately - I have a PC which I set aside for both PIC programming and Arduino programming.

So it was a matter of getting that out again to work on that project.

But I found - with large time gaps between PIC projects - I lose familiarity and have to get through the learning curve again.

For me - there is a **HUGE** difference between the PIC eco-system and the Arduino eco-system

When development with a PIC the resources that you have available are negligible compared to resources in the development with the Arduino

The Arduino eco-system is such that there will typically be library and example files for pretty much all of the current technologies for external components such as sensors and displays.

Go to Amazon and look for books on PIC programming - and the two or three books you will find were published 10 or more years ago.

The Arduino development environment hides a large percentage of the underlying code  

For most users that is what makes development in Arduino ultra fast and simple.

To do the same exact things with a PIC would be painfully arduous = with very little resources to draw on.

For example - creating a program to control an OLED display with a PIC

To do that with a PIC will require a lot of coding.
Whereas in the Arduino platform - 90% of that coding is done for you

However - one can have the best of both worlds - by programming the Atmel328 within the Arduino IDE and then off-loading the DIP package into one's project - the same way one would with a PIC

 

This post was modified 4 months ago 2 times by dw

   
ReplyQuote
MrRemedy
(@mrremedy)
Developer, Engineer
Joined: 3 years ago
Posts: 24
 

@graham1904 Found PICKit 4 and 5 on ebay in unopened box for around $50

-d


   
ReplyQuote
Graham1904
(@graham1904)
Member
Joined: 5 months ago
Posts: 11
 

@mrremedy That is a good find. Are you sure that they are not clones?


   
ReplyQuote
MrRemedy
(@mrremedy)
Developer, Engineer
Joined: 3 years ago
Posts: 24
 

@graham1904 .  I thought they were cloned kits when I ordered one of them.   If it was a clone it's a pretty darn good one.  But yeah, I did find the PICKit 4 on amazon, and yeah that' pretty pricey.   Now that you mentioned it, I'll scrutinize the PICKit5.  Any suggestions on how to authenticate it?

-d


   
ReplyQuote
Graham1904
(@graham1904)
Member
Joined: 5 months ago
Posts: 11
 

@mrremedy Good luck. I will be interested in the results you have as there are a couple of colleagues of mine who are interested in PICKit but can't afford (or judgeable)......


   
ReplyQuote
Page 1 / 2