| Electronics > Beginners |
| Beginner here: how to start with PIC micros? PICKIT 3 or 4 or Mplab snap? |
| (1/5) > >> |
| iamericmin:
Hi y'all, I'm a teenager looking to start with PIC microcontrollers. I have absolutely no prior experience with them. I have fiddled with AVRs and the Arduino ecosystem a bit but I want to start actual embedded design without any layers of abstraction. The PIC seems a nice cheap starting point, and after a bit of googling I believe the PIC16f1829 is a great starter chip. However, I have a few specific questions. 1) should I buy the PICKIT 4 or 3 or MPLab Snap? They all seem like solid choices and I believe the 4 is still in a developmental stage. I don't think it fully supports the 16F1829. 2) Is the 16F1829 a good starting point? Everyone else seems to be recommending the 16F877a but I don't like the giant DIL-40 package and the 16F1829 has slightly better specs. Thank you all! |
| stoyanoff:
Hi! I have PICkit 3(original) and it works fine. They say PICkit 4 is much faster, but I haven`t tried it yet! For start you can buy a PICkit 3 clone form aliexpress if you like - it will perform as the original! I`m uploading a book for beginers! It`s used something called CCS compiler. It is fine for begginers because most of the functions are ready and you just have to use them - it is no neccessary to know exactly which bit of which register you have to set or how exactly to do it. The compiler will do it for you! You should know this compiler has a lot of bugs. I prefer XC8, XC16 and XC32 with MPLab. But I don`t have begginers book for them. About the controller - I don`t think it matters. There is so many info in internet so you can choose every controller you can put hands on! If I were you I would pic a PIC32 series! It`s almost the same as PIC16, but it has 32bit architecture, higher frequency, more momory and so on. And there are quite cheeper - for example there is one series PIC32MM! So take a look at the book, try to install multiple compilers - CCS and XC with MPlab. If you decide to go straight to XC i can assist with the first steps. Best regards! |
| rstofer:
You can certainly use the stuff you already have with the Arduino infrastucture to do bare metal programming on the ATmega328P and you will be using a vastly better chip. Look into avr-libc, avr-gcc and avr-dude. These tools and library are used by the infrastructure and kept out of the way of the Arduino programmer. But those are the basic tools. Then there is a layer of Arduino code over the top which does the actual abstraction. Nobody paws through the Arduino installation directory but everything you need for bare metal programming is hidden in there somewhere. You can Google for Arduino bare metal programming. It's being done by a lot of folks. Or, you can look at the Teensy 4.0 which is a blistering fast (600 MHz) ARM processor that uses the Arduino IDE and a different toolchain. Again, you don't have to use the Arduino-like libraries, you can write code targeting the chip using just the arm-gcc compiler and associated libraries. This ARM architecture is where all the big kids play. Did I mention that this thing is blistering FAST! In both cases, you can look at the Arduino-style library code and decide what to keep and what to rewrite. And discover how it works! Start simple: Write a program that sets up a periodic timer with an interrupt handler. Every 500 ms, toggle an LED. Do not use any of the Arduino code. Keep the setup() and loop() functions until you are certain you can break the umbilical cord. Mid-range PIC chips are a PITA. The architecture starts out ugly and just gets worse. OTOH, they are useful for volume production or they would have been obsoleted years ago. Or, you could pick any of the ARM MBED enabled boards and use the online toolchain for programming. This is pretty slick because all you need is a PC, a browser and an Internet connection. I particularly like the LPC1768 MBED board. https://os.mbed.com/platforms/?_ga=2.105169667.1246524837.1569178144-1675594917.1563899139 You won't have a real-time debugger with the MBED approach. You would use printf() instead. https://os.mbed.com/platforms/mbed-LPC1768/ You can have wired Ethernet by simply adding a MagJack. The networking library is provided and its based on lwIP. |
| mariush:
Back on topic. If you want to save some money, Snap will be a good programmer for more modern PIC devices. It can't program the controllers that require high voltage programming, if I remember correctly.... but for most of those you'll find modern equivalents that are supported. Majority of chips if not all made in the last 5 years or so should support low voltage programming. If you have the money, Pickit 3 is a good product - i have one. I don't know about chinese clones, but I don't see why clones wouldn't work. I'd suggest avoiding those older chips like PIC16F877 but not because they're in DIP package. Avoid simply but there's better modern versions with internal oscillator, higher maximum frequencies (for ex 32 Mhz vs 20 Mhz), better features (like built in voltage references, more ADCs/DACs etc). They can also work at lower voltages like 1.8v..2.5v (of course, at lower frequencies) ... those older chips may need at least 4v to operate. There's also versions in narrow DIP package, which uses less space but can still be used on breadboarsd to quickly set something up. For exercises, practice, etc ... I would suggest an all around versatile chip like PIC16F157x or PIC16LF157x (LF = low voltage) : http://ww1.microchip.com/downloads/en/DeviceDoc/40001782C.pdf You have PIC16(L)F1574 , PIC16(L)F1575, PIC16(L)F1578, PIC16(L)F1579 .. difference is mostly pin count, memory and ram amount : You have internal oscillator, up to 32 Mhz, comparators, ADCs, you have a DAC, PWM, i2c, uart , Complementary Waveform Generator (CWG) for when you'd do more advanced stuff and you can also remap some pins to make circuits easier on prototyping boards/ breadboards You also have lots of program space, so you don't have to stress about writing unoptimized code. They're not expensive at around 1.1$ ...1.3$ ... here's the highest of the bunch : https://www.digikey.com/products/en?keywords=pic16f1579 When you want to advance from PICs and Arduino, my advice would be to look into ARM Cortex M0 and M4. I would play with Silicon Labs Zero Gecko or Happy Gecko families for Cortex M0 for example : See the M0/M4/M4F series of theirs here: digikey link But, ask others when you decide to move on, which controllers have the easier to understand documentation and all that, what's more friendly for beginners. |
| ebclr:
Do you want to know a much powerful ecosystem, try this https://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and It's very cool especially for the new generation like you, don't waste your time with legacy processors like PIC |
| Navigation |
| Message Index |
| Next page |