75Views12Replies

Author Options:

Thinking of getting into PIC microcontroller world Answered

So I'm thinking of learning about PIC micro-controllers. I'd like to know some info about it. In what language is it programmed in? Is it similar to C? How is it different with STM32 controllers? (Never used an STM before, though).

Discussions

0
None
-max-

6 months ago

It might be worth getting into ARM based microcontrollers, these are where things are headed. They offer a lot of compute power and are quite efficient. ARM is generally fairly scalable too. It's used from everything from low power 32 bit microcontrollers (like the STM32 you mentioned) up to server-grade equipment!

I am just beginning to explore the possibilities with a Teensy 3.6 and an ESP32 microcontroller.

Hi,
It sounds like you have no previous experience in microcontrollers (?) and if that's the case, Microchips PIC is probably not the right place to start, as it is rather datasheet dependent to program and a lot of people seems to shy away from how it is programmed (if using assembley).

PICs, as well as most other controllers can be programmed in C, C++, BASIC, Pascal (or some variant of it) and and a whole lot more languages, as long as someone have made a compiler for it - Some of the compilers are free, some are pretty expensive for what they are.

They all can be programmed in assembly, of course, but the assembler code will be different from one controller family to the next.

As much as I disgust the toy controller boards going under the name of Arduino (or some variant thereof), It might be just the place for you to start - it's a C-like language and as it only needs a USB cable and a free compiler, you cannot get a cheaper programming chain.

Regards

Hi Omnivent, thank you for the reply. I have had my experiences in programming arduino. I just want to start trying new things of embedded systems and just wanted to know some info about it from those who tried it before, like necessary hardware for programming the micro-controller(debugger, I believe?) Its price, how it's used.

Ah OK.
The PICkit-3 is the tool, costing US$ 47.95
The link is: https://www.microchipdirect.com/product/search/all/PG164130

You can get Chinese knock-offs or build one yourself at lower prices, but personally, I wouldn't skimp here, as (it's actually fairly prised IMO) and supported my MicroChip.
It has a facility that you won't find in a diy programmer, namely the ability to download a burn-file to the programmer and then bring it with you to program the code to one or more controllers anywhere, as long as you have a 5V supply available (something I would have appreciated in the mid-eighties, where I had to load up a PC or a (just as heavy) terminal and a huge amount of interface boxes, to reprogram UVEPROM cartridges around the country.
(besides those DIY burners usually won't support that many devices - it's a huge family)

I'm still running PICkit 2, because the #3 got bad reports when in its infancy, but I'd guess it to be well adjusted these days and my #2 seems to have vanished into some box - pretty annoying, considering the amount of SW I need to test out :-/ so I'll probably order a #3 in a foreseeable future myself.

One thing to notice... When talking about PIC controllers, we mean the bare chip, while the Whatever-duinos, Pi's, BB's and such are microcontroller _boards_
The chips in 'duinos are Atmel chips (MicroChip swallowed up Atmel btw.), which could be used as raw chips in your own purpose made boards and should you consider assembly, they may feel more logical to program - not that far from assembly on x86.
E.g.(simplified)
MOV from to
where the PIC equivalent would be something like:
MOV register file, whatever
MOV whereever, register file
But in C, programming is equally ugly ;)'
There is the chipKIT family from Digilent - Arduino compatible PIC boards running up to 200MHz. They might have a more shallow learning curve.
Read about them at: https://chipkit.net/

Rapberry Pi and Beagle Bone use (faster) ARM controllers, but again, make clear when you talk about the bare chip vs. a whole board.
The original target demographic for Arduinos was(is?) architect- and art students, IOW people with next to no clue in neither programming, nor electronics and judging from what I've seen so far, it hasn't changed much over the years.

Those who can, will usually go for the bare controller, to avoid a lot of stuff that isn't needed in every application.

I bought one of the cigarette lighters with a weak LED "lamp" at the bottom end, replaced the LED with an IR type, added a PIC10F220 (around US$ 0.35 a pop when I bought the last batch) and a little "glue" components in the extremely small space and now it can both light fires and trigger my camera (preferably not at the same time though ;) Wouldn't have happened if I had to rely on a giant preconfigured board.

The conclusion to my ravings is probably... Go for it, you'll never regret having the option to go bare (Noooo good people ;) and it won't stop you from still using Arduinos (or will it? ;)

Regards

Hi, rickharris, thanks for this link, too. I'll take a look at it and consider.

Oh, sorry about that, didn't see the link in the reply session.

Hi, rickharris, not exactly what I asked for but thank you for the link. I didn't know that Beaglebone Black is that powerful, and pricy.

0
None
Phil B

6 months ago

I won a Raspberry Pi 3 B in a contest. I did not know how it is different from Arduino. I have done some reading and learned a couple of things. I look at projects for it. A couple are interesting. But, I would need to buy a few peripherals. A commercial product is probably available to do the tasks of that project device for less and for a lot less money. Or, an app. for my phone will do the same task. It reminds me of the early days of home computers when I often asked, "What does this thing do that I need done?"

Hi, Phil B, wow, you won it from a contest? I've got a Raspberry Pi 3 B too, just started tinkering with it these days after involving in a blockchain-based project with my senior. I started to realize what I could do with it. Currently trying to learn NodeJS