Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Which PIC do I use?

Status
Not open for further replies.

Magen

New Member
hello everyone,
I'm still new to PICs but would like to learn on one that has more features than the 16f84 / 16f628. I am able to write basic pgms on them but now want to learn on one that has A to D , PWM , Uart etc. Can anybody please recommend a good one to start with?

regards
Magen
 
It depends on what BASIC compiler you will be using. A good one is the Swordfish Basic compiler. It only works on the 18F chips which are much like the 16F chips but better. A good chip to start with is the PIC18F1320,

I like the Junebug programmer tutor/target combo board. Follow the link in my signature.
 
I'll second the Junebug and Swordfish.

You don't actually state which language you are comfortable with, if it's C then Microchip supply a free compiler (C18), if it's Basic then Swordfish wins hands down.

Mike.
 
Last edited:
Can I third my own kit? :)
Junebug was designed as a quick start to PIC learning, although it uses an advanced 18F1320 as the tutor you should be able to start programming almost as soon as you assemble the kit and install the software. The 18F1320 is very modern compared to the 16F84A or 16F628A (it can program those too)
 
hi guys,
Sorry, I should have mentioned that I am using MPLAB and writing pgms with assembly code. I have limited experience with C++ but would like to learn more as I've heard this makes writing pgms a lot easier. What are the biggest benefits?
 
Unless you have a particular chip you want to start with then the Junebug is still your best bet.

Mike.
 
Hi Pommie,
I have recently built a low cost pgmr which I got from the Silicon Chip website so I would like to use one of the pics the pgmr supports. It does not list the 18F1320 but the 18F2320. I'll have a look at the differences. I want to learn a language that I can use across most of the pics. Are there any others besides C++ ?
 
I want to learn a language that I can use across most of the pics. Are there any others besides C++ ?

Hi Magen,
Yes there are lots of languages you can use. I think(MHO) C++ is not an appropriate language, but C works well as it is the lowest high level language. You can do almost the same using structs...

The outfit I like is SourceBoost SourceBoost Technologies - Home of BoostC Free PIC C Compiler and BoostBasic Free Pic Basic Compiler. They offer an IDE and C and C++ as well as BASIC compilers at a very good price less than $100 for the full package with no limitations. They also have size limited demos (code less than 2k.)

Their compilers work on both 16Fxx and 18Fxx series.
 
Last edited:
Magen,

I have one of the SC programmers but haven't used it for a long time. It should work well with most of the pic chips. Any that work with the JDM will work with the SC one. I would suggest getting a few 16F628s and playing with them. Just don't select internal oscillator and no MCLR pin.

Language wise, learning asm is well worth while. You can also download the free PicC lite from HiTech, this is a C compiler - C++ is not really viable on a μC.

Edit, Sourceboost C is also excellent.
Mike.
 
Last edited:
18F1320 is my junkbox PIC of choice.

If I ever need to knock something together I tend to use one of these. I've got 300+ of these in stock at the moment :)
 
18F1320 is my junkbox PIC of choice.

If I ever need to knock something together I tend to use one of these. I've got 300+ of these in stock at the moment :)

It's a favorite of mine too. The perfect 18pin 18F would be 16F88 pin compatible and include the comparators.
 
Given that you have some experiance with C++ and want to learn ASM I would either go with ASM aka MPASM and or C18. They are FREE and in the same toolchaing, you should be able to link you ASM and C18 files.

In time you will quite possibly want to get a programmer that is also a debugger like the Junebug or PICkit2. It makes debugging easier.

If you had to switch to the 16F's to use your programmer I would replace it and got with the 18F. Mostly for the free C18 compiler. The programmers are cheaper then compilers. The free C compilers for th 16F's are are badly crippled versions. The 18F is a better chip to run C on anyway.
 
The free C compilers for th 16F's are are badly crippled versions. The 18F is a better chip to run C on anyway.
Hi 3v0,

Have you had an opportunity to look at some of those free 16F' compilers in awhile?

I never really ever looked at them until I saw recently that Futz was using the BoostC compiler for 16F88 programs (his code always looks very nice).

I downloaded the free version and was delighted to find it supports up to 2 kwords of code space and variables in 2 banks. That's the entire memory map for the 12F683 device that I was interested in using.

Food for thought.

Regards, Mike
 
Hi 3v0,

Have you had an opportunity to look at some of those free 16F' compilers in awhile?

I never really ever looked at them until I saw recently that Futz was using the BoostC compiler for 16F88 programs (his code always looks very nice).

I downloaded the free version and was delighted to find it supports up to 2 kwords of code space and variables in 2 banks. That's the entire memory map for the 12F683 device that I was interested in using.

Food for thought.

Regards, Mike

One of the new things with boost is that you can do function overloading, like in C++. I haven't had time to really try it yet, but, I can see lots of uses!
 
I have not looked in over 2 years.

When I started with PICs I downloaded the CCS compiler demo then purchased the license for the 16F. When I started teaching I switched up to the 18F's to use the free C18 on the students machines at school.

I still play with CCS and the 16F's but most of the time I go with the 18's,
 
One of the new things with boost is that you can do function overloading, like in C++. I haven't had time to really try it yet, but, I can see lots of uses!
Would you believe after only a week I've already used an 'overload' function? I didn't even realize that was a new feature. Very cool!

Mike

Code:
//  function prototypes

void PutLCD(unsigned char ptype, unsigned char pbyte);
void PutLCD(rom char *pdata);

//
//  example ->  PutLCD("K8LH Clock");
//
void PutLCD(rom char *pdata)
{
  char n = 0;                    //
  char temp;                     //
  while(temp = pdata[n++])       //
    PutLCD(dat,temp);            //
}
 
I have not looked in over 2 years.

When I started with PICs I downloaded the CCS compiler demo then purchased the license for the 16F. When I started teaching I switched up to the 18F's to use the free C18 on the students machines at school.

I still play with CCS and the 16F's but most of the time I go with the 18's,
Forgive me. I wasn't thinking. If I were in your situation I think I would want to use MCC18 too because it's "mainstream" and going to be extremely stable and well supported (at least one would hope, grin).

Mike
 
We could start a my compiler is better then your compiler war. not

I like overloading, CCS does it to. It is one of the littles touches that bring a bit of civility to uC's. :)

I guess I'm not all that observant. I've used the CCS compiler a fair bit, and never noticed!
 
  • Like
Reactions: 3v0
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top