doubts about PIC microcontrollers

MaxHeadRoom

Joined Jul 18, 2013
30,661
About the clones: I saw various models on ebay, but I wasn't sure about any of them and didn't want to risk without knowing enough about PICs.
Over the few years I came to using Pic's I have a clone Picket 2, a Pickit 3 and a couple of Picdem boards, as well as some home made versions using the very good Olimex line from UK.
The pickit 2 clone has a ZIF socket so it is useful for repeated programming but no good for ICP and testing, For this I use the Picdem boards which use regular sockets requires leaving the pic socketted and also has the features of programming,running and debugging.
Max.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Yes, I was going to ask here for opinions about the clones, but then I thought that I would save myself a lot of trouble while following tutorials and so on by getting the original. You know, any tiny difference between both can drive a beginner crazy.
 

josip

Joined Mar 6, 2014
67
I would had preferred to use Atmel, since that's the platform where I'm developing the prototype; but I wasn't sure I could get the chips that would go in the final device with the same features and at low prices as PICs.

The cost of the development board is not what's important, but the features and prices of the final chips.
OK, give me number and price of that magic PIC (with hardware USB module, as I understood) and I will check if there is some cheaper / better in competitors garden.

There's also whether or not I'll use the platform in the future...

I've been using Arduino (Atmel) for a long time, and I intent to continue using it. I also had plans to get into PICs in the future, regardless of this project; so I was going to buy the programer anyway.
Yes, today PIC is great platform for start, you are joking? Read linked MSP430 thread from my last post, maybe you can find there some better option for start today.

The Maxim page is actually quite ridiculous I dont even think these old PICs are still available or manufactured.
Yes, it is well known that Maxim is in love with TI and Atmel, but they hate PIC, so they simple reserved last place for it. Check the linked thread in my previous post to MSP430 forum, you will not find PIC there.

And BTW, I am familiar with MSP430 and don't have any complains on Maxim MSP430 benchmarks, for me it is fair enough. Maxim document / benchmark is from 2004, with devices present on market at that time.
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
Well in its original form with 33/34/35 instructions, it is one the most primitive MCUs you can think of- and 512 words for the still available 16F54 is not a large memory.

Nonetheless, for some tasks it is more than required, and execution speed or current consumption dont play any role.

So you could argue, it is a piece of useless silicon, not good for anything, or you just use them for small tasks, because they dont need configuration, and dont cost much.

I also guess as the instruction set is more primitive, the silicon is less complex, and cheaper to manufacture and to test.

But today the baseline PICs or the old midrange are only part of a much larger product palette, indeed, the product families dont have all that much in common, PIC32 indeed arent even real PICs anymore, the instruction set is completely different.

Some day I saw the primitive Velleman kit in a shop and was just curious, and simply bought it, and I was scared how primitive the RISC Instruction set really is, and I found it quite hard and difficult to understand. But I learned it nonetheless. Years wasted with assembler, moved away from it because I wanted to use USB, and its too much a hassle to try in assembler.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
OK, give me number and price of that magic PIC (with hardware USB module, as I understood) and I will check if there is some cheaper / better in competitors garden.
I bought the PIC16F1459 at €1.45 directly from Microchip.

Yes, today PIC is great platform for start, you are joking? Read linked MSP430 thread from my last post, maybe you can find there some better option for start today.
I used Arduino as a starting point to microcontrollers; PIC is my next and final step (at least for the moment I have no plans to get deeper into it).
 

josip

Joined Mar 6, 2014
67
I bought the PIC16F1459 at €1.45 directly from Microchip.
Don't know for what you need USB, but with 1 KB of RAM and 512 bytes shared for USB this is just a toy. Just for relation, TI MSP430F5xx USB entry level devices have 6 KB of RAM, 2 KB shared for USB.

First Google answer for low cost USB micro (and I totaly agree with that) ...

NXP has some USB Full Speed ARM Cortex(M0 and M3) based microcontrollers which start in the ~$1.70 range for low quantity. They do not require an external oscillator for USB and have a dedicated PLL for USB use. For example, the LPC11U12FBD48.(price from AVNET)
I would personally avoid using 8-bit microcontrollers these days unless you are going to use very little memory or code space in your application. Cortex M0 based microcontrollers often can now best 8-bit controllers when it comes to power efficiency, too.
 

takao21203

Joined Apr 28, 2012
3,702
I would avoid constantly changing platforms just because somebody advises you to do so.

Also all this cost cutting is relevant how when you observe development of retail prices in recent years in large cities?

A dollar or two these days are nothing.

Few people will ever really develope or produce large number of devices.

I spent thousands on electronics and some day figured out the cost of a controller is not much relevant. Sure, if it is cheap, I can buy a box with many of them easily.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Just received the Pickit2 this morning... and I'm a bit disappointed. :(

There really nothing wrong with it; just that I'm trying to start but I can't figure out where. I found 24 pdf manuals on the installation folder; plus many more that are still left in the 2 CDs and websites they link to. The tutorials I had bookmarked last week either don't explain the basics (what I need to know right now to make the examples work), are for assembler (which I don't really want to get into again), or for chips/compilers that I don't have nor want to use.

Arduino was so easy! I just installed it, saw a couple of examples, and I was ready to go on my own.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Finished my first program!

At this pace people will be using quantum computers when I finish the device. :)

Can anyone please recommend a good tutorial for MPLAB X with C8 compiler for the PIC 16F family...
 

adamclark

Joined Oct 4, 2013
472
irrelevant I know,, but my son and I built a vellemen kits pic programmer and it has a 16 pin socket and a "hat" that can be placed over the pic for on the fly programming... paid 5 bucks for it at the local ESCO...
 

josip

Joined Mar 6, 2014
67
irrelevant I know,, but my son and I built a vellemen kits pic programmer and it has a 16 pin socket and a "hat" that can be placed over the pic for on the fly programming... paid 5 bucks for it at the local ESCO...
Few years ago, TI was selling MSP430 Launchpad (flasher/debugger) for 4.30 $ (with FedEx shipment include in price). It is not hard to find today, USB flasher/debugger board under 5$.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
irrelevant I know,, but my son and I built a vellemen kits pic programmer and it has a 16 pin socket and a "hat" that can be placed over the pic for on the fly programming... paid 5 bucks for it at the local ESCO...
I also thought about getting an alternative or clone programmer for a fraction of the price; but I didn't want to risk the possibility of having to troubleshoot compatibility or other issues. And so far, it seems I did the right thing; as I'm finding enough compatibility issues with the original in regard to development applications, languages, compilers, PIC families, and devices.

What I'm planning to make is a demo/programming board for DIPs from 8 to 20 pins.
 

ErnieM

Joined Apr 24, 2011
8,415
Do get a PICkit. Do get it from Microchip Direct or from Microchip thru distribution.

Do NOT get a clone.

The options are PICkit 2 or PICkit 3. The 2 is cheaper then the 3.

The PICkit 2 does more with a limited number of parts.

The PICkit 3 does less with a all parts.

Both do in circuit programming and in circuit debugging, which are the two essential functions.

If I was to only buy one programmer today I would buy the PICkit 3.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Do get a PICkit. Do get it from Microchip Direct or from Microchip thru distribution.

Do NOT get a clone.

The options are PICkit 2 or PICkit 3. The 2 is cheaper then the 3.

The PICkit 2 does more with a limited number of parts.

The PICkit 3 does less with a all parts.

Both do in circuit programming and in circuit debugging, which are the two essential functions.

If I was to only buy one programmer today I would buy the PICkit 3.
My PICkit 2 already arrived two days ago.

Now what I need, and urgently! is a good tutorial for MPLAB X with C8 for the 16F family.

Until yesterday I could only find ASM tutorials, or Mikro C tutorials, or HI-TECH C tutorials, or 18F tutorials. Today I found one on YouTube that kind of suits me; but I still need to figure out some equivalent instructions for the PIC16F88 and PIC16F887 that I'm testing (e.g. "PORTx" instead of "LATx", "TRISxbits.TRISxx" instead of "TRISxbits.Rxx", configuration bits differences, etc -which might sound trivial but are a headache for a beginner like me-).
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Read the compiler documentation and the PIC datasheet. It'll halp you more than the tutorials.
Yes, that's what I'm doing at the moment. As a guide I'm also using the tutorial I found on YouTube -because the documentation and datasheet alone don't explain the very basics- and then finding the specifics on the corresponding datasheet and looking for the equivalents instructions on the header files.

For general C information, consider a good C book, such as this one:

http://publications.gbdirect.co.uk/c_book/
So far I'm not having any problems with C; it was the language as I used as a programmer 20 years ago. Nevertheless, I'm a bit rusty.

The main problems I'm having is with the specific PIC commands and registers; specially since they are different on the tutorial. However, now that I'm staring to be familiar with it, it's getting easier.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Then the datasheet is your best friend. It explains almost every detail, basics too. That's why their datasheets are so big :)
I notice the size: 288 pages for the PIC16F887 and 228 pages for the PIC16F88. I'm keeping the datasheets open, but only as a reference guide. I can't use the datasheet alone because the commands and examples are in assembly, not C.

I might change to assembly later on, but since I'm more familiar C, I'm sticking to it for now.
 

NorthGuy

Joined Jun 28, 2014
611
I notice the size: 288 pages for the PIC16F887 and 228 pages for the PIC16F88. I'm keeping the datasheets open, but only as a reference guide. I can't use the datasheet alone because the commands and examples are in assembly, not C.

I might change to assembly later on, but since I'm more familiar C, I'm sticking to it for now.
You don't need to change to assembler. Access to hardware registers is the same as in C.

Compare:

Rich (BB code):
bsf LATA, 2
Rich (BB code):
LATABits.LATA2 = 1;
 
Top