PIC Introductory Tutorial - PICking the right PIC - Page 1
Forum section: electronics / general

author: netwinder
author_rank: Regular Contributor
timestamp: October 29, 2016, 01:17:57 am
content: My apologies for the pun in the title. I couldn't help myself. Anyways I wrote a tutorial that focuses on what to look for in a PIC micro controller and how to select one. I was wondering if the fourm had any feedback. Also would you guys be interested in a short series about programming for on PIC micro controller?http://advtech.ca/index.php/pic-an-introduction/

author: JPortici
author_rank: Super Contributor
timestamp: October 29, 2016, 06:26:01 am
content: just. pick. a. modern. one.when most people think pic they still think about a 16f84a or a 16f876aand when it comes to programming... mplab 8 and c8please. mplabx and XC compilerwhat is your target? baseline? 8bit? enhanced 8bit? 16bit? 32bit?i rarely use baseline, there are specific needs for those i don't think it's suited for beginnerson 8bit,my usual goto is the 16f1823/16f1847+ it has been around a bit. availability is high and all relevant bugs are solved+ debugger!+ not new new new new part so most peripherals are the old simple ones (a plus for you, not really for me. sometimes i wish that...)+ a lot of memory and peripherals.+ very good power consumption- it has been around a bit. price is higher than new pin to pin compatible alternatives- which also have newer and better peripherals- and better power mode managementbut new chips are not mature enough to mealso check out the mplab xpress board... and the xpress ide of course. that thing is targeted to your audience. no external programmer needed with that one.other pics i like a lot but don't use at work (no need yet)..pic16f1776. a crapton of goodies in them. very very very nice onePIC16F18323. the 1823 upgrade... still too new a partpic16f1937. a ton of pins, i used this in a prototype for a touch musical keyboard, the chip did everything.. but it was slow to respond as it had only one CTMU that sensed all keys and buttons so then i planned to use another chip before the whole thing died.enhanced 8bit: pic18f26k22 (and variants depending on pin count). same reasons as before. i'm waiting for the updated chip to play with (if strange bugs don't come out.. 1€ cheaper in volume, not bad in a <10€ BOM)16 bit: i don't usually care for pic24, usually i don't think there is no real advantage on pic18 as the peripherals are the same (exceptions apply) so i go straight to dspics. like dsPIC33EV64GM102, if you want to remain with 5V and DIP packages.otherwise the ones i use a lot aredsPIC33EP32MC204 - cheapest in the family for no particular requirements. i'd use this for same reasons as beforedsPIC33EV256GM106 - for automotive stuffdsPIC33EP64GS504 - for more advanced peripherals, fast ADC, signal generation, digital - analog controlsyou will see projects, tutorials with dspic30 chips like the dspic30f4013 but they are old.. and slow... and with no interesting stuff on them. trust me, try dspic33.32 bit: yet to have a reason to use them so i can't comment.. other that i wouldn't use those for a tutorial, unless you want to make examples where you say "to do this copy these lines of code and paste them over there".

author: hans
author_rank: Super Contributor
timestamp: October 29, 2016, 08:05:19 am
content: I think you should cut down on the self explanatory questions and instead focus on actually telling something new to the user in an organized, comprehensive and fact-checked way.ADC/DAC doesn't give a hint what it does. Maybe convert analog cows in to digital milk?At USB you could easily have told some devices only support USB device mode, others have OTG/host capability as well.Or that the niche of I2C is that it's a 2-wire bus.And even one of the most fundamental peripherals like timer is missing.I would also add DMA to the mix, as it's increasingly important in many projects.Bit length; ugh.. "restrictions"? A 8-bit PIC can do 32-bit math, but not in hardware. Doing it in software is a lot slower. The bit size of a CPU core only tells something about the data path, not all that much about the rest. There are different reasons for 'restrictions', but not that.E.g. pointing out the significant differences between the 8-bit, 16-bit and 32-bit chip architectures would have more useful, especially in motivating the choice between them.I think the motivation between certain chips could be explained better. I view 8-bit chips as a decent choice for only 2 reasons: low pin count, and cost when used in volume. 8-bit architecture has a horrible data architecture, with the compiler clearly showing constraints (e.g. pointers and lack of software stack) when writing more complex code.The cost to develop stuff is far more dominant and I rather pick a 16/32 bit chip that has scarce-less computational power and memory, and a GCC(based) compiler that atleast somewhat sane.Result is I wouldn't recommended to bother at all with 8-bit PICs these days.

author: 22swg
author_rank: Frequent Contributor
timestamp: October 29, 2016, 11:09:24 am
content: A worthy project Netwinder. May have been said , 'makers' ( Is this the buzz word for hobbyist now ) will soon find out what features they need , I think it more important to actually start with actual hardware, none of this 'sim' bs ! , actually MPLAB 8.x has some great sim stuff, used it in conjunction with PIC on a board and PK2. I soon found limitations of old 16F mcu , but its a good place to start, my advice would be to just hook up a PIC16F1xxx ( I like the 1939 ) biggest and best you can get and start coding.

author: dannyf
author_rank: Super Contributor
timestamp: October 29, 2016, 11:37:35 am
content: It depends on what you are picking it for.For prototyping or code development, pick the biggest and most feature rich one. Once your code is done, downsize or down-feature it.

author: ez24
author_rank: Super Contributor
timestamp: October 30, 2016, 05:50:37 am
content: I suggest you look at the 8 bit boards that program via USB, not serial nor with a programmer and have a built in debugger.Please no programmers or serial ports.I hope you use WindowsA while ago I asked this question and they do exist.For me it is late and I cannot think too well but here is a start:http://www.microchip.com/DevelopmentTools/Listing.aspx?CatID=399fb274-3794-42ea-9621-f410ae4069dcFYI there is a lack of good tutorials using the latest PIC tools so I think there is a demand. I think it is easier to learn with something that has mikroBUS connection so less bread boarding would have to be done.Look at the recent items PIC is coming out with because they are keeping up with the market like the STM32 Nucleo boards (which I think are the best but hardest)Can I ask what is your motive? ie do you hope to make money on this? I think it best if you want to make money so you will be motivated. It is easy to get burned out.What I would do is come up with a short list of boards and then ask questions about them. Tomorrow I will look at them more carefully.If I can help by beta testing or financial, I am willing to help. Like I said it is hard to find good info for dumb asses like myself and I have been unable to find any help (at my level) that uses the new boards.One thing to keep in mind is this forum is haunted by professionals and they cannot understand simple stuff (like this subject).There is the Microstick II but I like the boards that have connections for other boards. But you could expand on Bruce Land's YT videos from Cornell from last year. I do not think he is posting this semesters lessons.

author: DVX
author_rank: Contributor
timestamp: October 31, 2016, 11:09:00 am
content: You don't mention if your planning to program in assembler of a higher level lanuage like C. If C take a look athttp://learn.mikroe.com/ebooks/piccprogramming/this gives a good start, you might also want to focus on programming and not hardware, so going for a PIC18 dev board with plenty of memory and peripherals will mean you won't need to upgrade your hardware as your coding grows. Driving a 2 or 4 line LCD with a PIC18 is reasonably straight forward, if you later need to drive a TFT a PIC18 will be too slow, a PIC32 would then be a better choice. Microchip dev boards and compilers are worth checking out as are Mikroe dev boards and own compilers.

author: eugenenine
author_rank: Frequent Contributor
timestamp: October 31, 2016, 11:51:20 am
content: The micro stuff looks interesting but then you would be stuck with windows.The tutorial looks like a good start but it doesn't answer the question of which Pic to pick.