Migrating to PIC

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am an AVR freak, but for my next project we have to use PIC (boo, hiss)

Normally I use winAVR and program in C.........in the PIC world is there something that's very similar to this?

Any recommendations on dev boards......price is not a major issue. I just want the best board I can get, preferably something which can be considered standard like the STK500.

Don't shout at me, I know this is an AVR forum and AVR's are great....just that i don't have much choice for our next project. Any suggestions would be appreciated as I'm a PIC newbe.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

forgot to mention we'll be using the PIC18F series.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that the PIC guys would know a lot more about this...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

look at the ICD with the PICDEM2 board. The board comes with an LCD, push buttons
pot for A/D and a temperature chip that demo's I2C. The ICD is an In Circuit Debugger which works pretty good for the price. There is a kit for the two products(ICD & PICDEM2). My boss also favors the PIC stuff and the company purchased from DIGI-KEY.
It will program the 'F87 if I am not wrong. I know it works with the 16F877 parts.
Good luck, the PIC has a rarther different architecture.
Checkout Microchip web site, you can find similar PIC support like this Atmel site.

I'll believe corporations
are people when Texas executes one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So far the only open source PIC compiler I have found is SDCC. I've only just downloaded it and havent got it running yet, so it may be total rubbish.

http://sdcc.sourceforge.net/

Let me know how it works for you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks... will look in to the ICD PICDEM2. The C compiler, sounds promising, I will have to ask my boss what he normally uses.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tubecut wrote:
look at the ICD with the PICDEM2 board. The board comes with an LCD, push buttons

Do you mean the "PICDEM2 plus" has an LCD, as PICDEM2 does not appear to have it.
In Digikey catalogue it says "LCD2 In-Circuit Debugger" (page 143) and the full kit includes "PICDEM2". This is almost certainly what we need. Does the kit come wih "PICDEM2 plus" i.e. include the LCD?

C compiler: we came across this :[url]http://www.picant.com/c2c/c.html
[/url] which my partner in crime seems to be rather keen on. ezcomp? any thoughts on that?

Please note, I don't want to introduce PIC's on this forum and I won't start any more threads on PIC. Please forgive me on this one ocassion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Both the pic and the avr series are good processors, and are similar in many ways. IMHO the pic's greatest short fall is it's limited return stack size. The 12 and 16 series pics
(12 and 14 bit instruction word) also suffer from a bank switched data area. Very often two registers which are needed at the same time will be found in different pages and you have to swap back and forth like crazy. The 18 series pics with 16 bit instruction words have got away from this problem with a much larger data page (but still smaller than the avr's 64k space!). About the only advantage I see in the pics from a programmers point of view is that almost all of the data space (64 addresses) can be used as registers in instructions. So the pic gives you 64 registers vs the 16 - 32 that the avr does. Both cpus are supported by free tools: simulators, assemblers, and a C compilier (for the 18 series pics anyway). Models of both families have jtag like debug support (though the pic's does take some memory and stack resources away from the user). Cost of this hardware is about the same on both platforms (but no clones are available for the pics).

Seems more ham radio projects use pics, probably due to the slightly lower cost of the chips. This could change if word of the avr jtag clones hit QST, though you'd have to use at least a 40 pin mega16 to take advantage of it. Pic 16 devices offer 18 and 28 pin devices that support jtag like debuging. There is only so much you can do on a simulator.

I'm using a Mega128 in a project where I work, and my next ham radio project will be using a Mega32 or Mega16 chip (i'll start with the 32 and see if it would fit in the 16).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't explicitly state that you need a free compiler, and you comment that you're not worried about the cost of the development kit, so I'd strongly recommend (from personal experience) the Hi-Tech software compiler. It's about £500 in the UK, no doubt you'll be able to get a price for it in your neck of the woods.

Go to www.htsoft.com

Regards,

Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
About the only advantage I see in the pics from a programmers point of view is that almost all of the data space (64 addresses) can be used as registers in instructions.
??? :) Yes you can do some register like functions with data space like rotating the value, (similar to Motorola) but the PIC has ONE (1) real general purpose working register w. At least that is the situation with the 16 series, don't know much about the 18 series. Pity that they decided not to have pin compatible 18 series chips with the 16 series.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes you can do some register like functions with data space like rotating the value, (similar to Motorola) but the PIC has ONE (1) real general purpose working register w. At least that is the situation with the 16 series, don't know much about the 18 series. Pity that they decided not to have pin compatible 18 series chips with the 16 series.

True, the pics ARE a single address machine, while the avr series has one, two, and some three address instructions. The 18 series pics are a growing family, and might replace the 16 series eventually. When I start seeing 8 pin versions of the 18 series arch. pics I'll know the 16 series is doomed. For now pic's offer more bang for the buck than AVR's at the very low end, and the AVR is a better choice at the upper middle and high end. Otherwise it's a turkey shoot.
AVR wins in development tools, but pics still have more exposure (Microchip wins in total units shipped). We all win in having not one, but two excellent micro lines to choose from.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

cstocks wrote:
You don't explicitly state that you need a free compiler, and you comment that you're not worried about the cost of the development kit, so I'd strongly recommend (from personal experience) the Hi-Tech software compiler. It's about £500 in the UK, no doubt you'll be able to get a price for it in your neck of the woods.

Go to www.htsoft.com
Regards,
Colin

Price is not an issue in the case of a programmer and development board. In my opinion a good development board and an in circuit debuger is money well spent.... as it will save lots of time....hence money. The same could be applied to a C compiler, but for my AVR projects i have been using avrgcc which has been really excellent (and it's free). Also, the avrgcc support on this site has been really useful.

£500 for a PIC C compiler is a little bit too much for us at the moment. Our budget is fairly limited (to start with), so we will be using one of the freely available compilers. If we are unable to get what we need (a good C compiler for free) then we will consider paying for a better one. This will however require increased investment in the project, which we don't have at the moment.

we are avoiding the PIC 16 series, as we beleive that the PIC18F series will be much easier to use (program). This seems to be the general opinion of everyone here also.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you program in C, there is not much difference between PIC16 and PIC18. 40 pin DIP PIC16 and PIC18 are pin compatible. You should be able to start with PIC16 and migrate to PIC18 easily. The PICDEM2 came with both PIC16 and PIC18 devices. There are many demo C compiler with limited function or limited time for you to try.