Electronics > Beginners
Beginner here: how to start with PIC micros? PICKIT 3 or 4 or Mplab snap?
TomS_:
Ask 10 different people about microcontrollers and you might just about get 10 different answers. And on that note, heres mine.
For #2, my advice would be stay away from the 877. Its old tech by now, replaced by the 887 if I am not mistaken. But I might even go so far as to say stay away from that one too. The 877 was perhaps a bit of a stalwart of hobby electronics because it had loads of IO for the time, so probably still pops up in old articles or from old hats. It might have even looked impressive, being such a large package.
There are likely better options out there. Probably what I would recommend is, and since you are new to this it would be a good learning experience that you may need in a future potential career, go to the Microchip website and start playing around with their parametric search feature. The right PIC is afterall going to be the one that offers the features you need to accomplish your projects. Newer PICs, or PICs from a higher series (e.g. PIC24 or even PIC32) will have more and better peripherals than an old school PIC16.
Things you might like to consider are:
* Do you need to read analoge sensors - does your chosen PIC have the right resolution, or even enough channels?
* Are you going to be communicating with other devices - does your chosen PIC have the right interfaces available, or enough of them? UART, SPI, I2C, CAN, etc
* Do you need lots of GPIOs for reading switches or turning indicator LEDs on and off, or even interfacing with parallel interface LCDs
* You mentioned that a DIP40 was too big, but there are smaller PICs packed full of features in small packages like DIP28 (although you will compromise GPIO pin count, but there are ways to get around this, e.g. using IO expanders)
* What voltage range does it need to operate on, or be compatible with, does it have low power modes for battery operated applications?
* Internal EEPROM required, and how much?
* Do you need to be able to drive LCD segments directly, and how many?
* Maximum operating frequency
* Internal flash and RAM capacities
* etc etc etc
You'll be able to search on all of these metrics on their website to find a PIC that is more suitable to your needs.
And these kinds of questions are why there are sooooo many to choose from, because they all have differing quantities, features and capabilities making each of them more suited to one application than another. Will a 16F1829 be a good starting point? It will be if it has the features that youre going to need! Otherwise, perhaps you need to define some projects that you would like to accomplish and look for something that offers the features suitable for them.
Me personally, PIC are my go to microcontroller. I "grew up" with them, know how to drive them, and I understand the Microchip datasheet format so I can find what I need quickly and understand it. Most importantly I can get done what I need to do. Are there better microcontrollers out there? Well, maybe, probably. STM32 are certainly popular, but my smoke alarms have PIC16's in them and I have seen PIC32's used in elevator controls, so they cant be too bad. Its all about suitability, and also what your staff are familiar with, or just what ever "shop" you happen to be part of if you end up doing this for a living.
As with everything in life, its only a bad decision if it hasnt been thought through. You wouldnt wear a sweater to the arctic, and so you wouldnt try use a PIC16 to operate a self driving car. Ok, probably a bad analogy, but the point I'm trying to make is, define your requirements and then pick the right tool for the job - not the other way around.
As for #1, dont buy a clone PicKit, buy a genuine article. I personally dont like the fact someone can simply rip off someone elses design and even have the cheek to stick the original manufacturers logo on it when it is not the genuine article. I dont support such practices, and I dont think anyone else should either. If it is sold as a generic "compatible" item without original manufacturer branding, maybe. But a genuine article is not really that expensive either, and you'll get support from Microchip if anything goes wrong.
rstofer:
Don't overlook the utility of a decent bootloader like the Arduino uses. Whether I write to bare metal or use the complete set of Arduino libraries, the bootloading process remains the same. It just works! Of course, it doesn't have any JTAG or SWD debugging but printf() works for me.
Then there is mbed with drag and drop board programming. You literally copy/paste the .bin file to the device which shows up as a mass storage device (disk drive letter) and reset the device. I really like using the online toolchain but it isn't required. You can download the toolchain for local development. Now that ARM owns mbed, there is a lot of work going on to build credible libraries for the various peripherals.
The STM boards usually have ST-Link adapters attached. They break off if necessary. This is a full debugger and works well with the ST toolchain.
Having to use something like a PICkit seems archaic somehow. Those I have had always worked ok, no problem there. But the older 16F chips with high voltage programming were a PITA to design around. You had to be careful of what you hung on that Vpp pin as a peripheral. The circuit had to prevent damage to components from the programming voltage.
Anybody like the #pragma's used for setting up the PIC 'fuses'? The AVRs have the same concept.
I have never had a lot of success with OpenOCD so I would prefer to skip over JTAG dongles and JTAG debugging. I haven't used OpenOCD for more than 10 years. Things may have gotten better.
https://os.mbed.com/platforms/ST-Discovery-F746NG/
I haven't used the cc5x C compiler with a PIC in many years but I do remember gettings errors that said, in effect, "what you wrote is correct code but we can't implement it". There were, at the time, serious limitations to the language.
It's a real plus when you can get into a micro that is supported by GCC. That has simply got to be the most used compiler in the world with millions of users testing it every day.
The ARMs are just so much more 'grown up' compared to the mid-range PICs and ATmega chips. Once we got the Cortex chips, versus the ARM7TDMI's, we got rid of most, if not all, of the assembly language startup file 'crt0.S'. Everything including setting up the interrupt vectors is now done in C. Much better...
So many choices
Navigation
[0] Message Index
[*] Previous page
Go to full version