Electronics-Related.com
Forums

PIC/dsPIC development

Started by bitrex November 4, 2018
On 11/04/2018 08:40 PM, bitrex wrote:
> On 11/04/2018 08:27 PM, mpm wrote: >> On Sunday, November 4, 2018 at 3:12:28 PM UTC-5, bitrex wrote: >>> I might have to work on a project involving dsPIC code which I don't >>> have a lot of experience with, I'm primarily an AVR and ARM guy. >>> >>> What's the hip current toolchains/dev boards y'all like to use for PIC >>> development on Linux or Windows desktops nowatimes? >> >> Did you look at: >> https://www.mikroe.com/ >> >> I've used some of their other development boards. >> Not keen on their compilers, but they do work.  (Just not what I'm >> used to.) >> Some of their dev boards can double as programmers, which is a nice perk. >> > > Thanks, those dev boards do look good not at all expensive. So > apparently there's no particularly good option for an optimizing C > compiler plugged into 3rd party tools e.g. Code Blocks, or Eclipse et. > al. for the platform?
Or rather one that costs sub $1000 or $500. $500 not unreasonable for a good closed-source optimizing C compiler if I'm going to end up doing development for this platform routinely but more so for a one-off job.
On 11/04/2018 08:40 PM, bitrex wrote:
> On 11/04/2018 08:27 PM, mpm wrote: >> On Sunday, November 4, 2018 at 3:12:28 PM UTC-5, bitrex wrote: >>> I might have to work on a project involving dsPIC code which I don't >>> have a lot of experience with, I'm primarily an AVR and ARM guy. >>> >>> What's the hip current toolchains/dev boards y'all like to use for PIC >>> development on Linux or Windows desktops nowatimes? >> >> Did you look at: >> https://www.mikroe.com/ >> >> I've used some of their other development boards. >> Not keen on their compilers, but they do work.  (Just not what I'm >> used to.) >> Some of their dev boards can double as programmers, which is a nice perk. >> > > Thanks, those dev boards do look good not at all expensive. So > apparently there's no particularly good option for an optimizing C > compiler plugged into 3rd party tools e.g. Code Blocks, or Eclipse et. > al. for the platform?
Posted too soon, sorry, the dsPIC C compiler from them is only $250. That's not bad.
On Sunday, November 4, 2018 at 8:44:08 PM UTC-5, bitrex wrote:
> Posted too soon, sorry, the dsPIC C compiler from them is only $250. > That's not bad.
I think it's free... as long as you don't go over 2K of source. That may be barely enough to do anything useful, but at least it lets you kick the tires before you commit.
On 11/04/2018 08:54 PM, mpm wrote:
> On Sunday, November 4, 2018 at 8:44:08 PM UTC-5, bitrex wrote: >> Posted too soon, sorry, the dsPIC C compiler from them is only $250. >> That's not bad. > > I think it's free... as long as you don't go over 2K of source. > That may be barely enough to do anything useful, but at least it lets you kick the tires before you commit. > >
Got it, so the good "trial" options on the PIC front appear to be that one which is an optimizing(?) compiler but with a 2K source limit or the freeware MPLAB non-optimizing variant. Should be enough to start getting myself in trouble with :)
On Sunday, November 4, 2018 at 6:41:34 PM UTC-5, bitrex wrote:
> On 11/04/2018 05:45 PM, speff wrote: > > On Sunday, 4 November 2018 15:12:28 UTC-5, bitrex wrote: > >> I might have to work on a project involving dsPIC code which I don't > >> have a lot of experience with, I'm primarily an AVR and ARM guy. > >> > >> What's the hip current toolchains/dev boards y'all like to use for PIC > >> development on Linux or Windows desktops nowatimes? > > > > MPLAB-X with their compiler XC-16. It's a bit greedy with resources but okay on a modern machine. There is a free version with no optimization. I am not sure how well the DSP functionality is supported by the compiler, we just used it as a relatively fast 16-bit micro. > > > > The compiler is $995 but there is a 50% off discount coupon good to the end of this month. Use Coupon Code : TP1932 > > > > This family is a bit long in the tooth, but if your customer wants it.. > > > > --Spehro Pefhany > > > > I see a lot of requests on freelance sites, etc. for assistance > maintain/debugging/future-proofing PIC code. I see very few requests for > maintenance or debugging of "legacy" 8 bit AVR code. > > Maybe like the Maytag repairman they just worked right first time and > didn't need any further assistance, most of my AVR projects are like > that nowatimes. ;)
That may well be more about the people doing the design than anything inherent in the design process. The people I've met who like PICs seem to do so just because they "like" them rather than being able to explain any particular features or benefits of the PICs. While devices like the AVR often are justified because of a "modern" instruction set (which is not really an engineering evaluation) advocates can usually point to some real advantages. I'm not saying the PICs don't have advantages. I'm saying that when advocates can't justify their preference it makes me suspect other aspects of their work. Rick C.
On Sun, 04 Nov 2018 15:12:22 -0500, bitrex wrote:

> I might have to work on a project involving dsPIC code which I don't > have a lot of experience with, I'm primarily an AVR and ARM guy. > > What's the hip current toolchains/dev boards y'all like to use for PIC > development on Linux or Windows desktops nowatimes?
You might try the free JALV2, https://www.casadeyork.com/jalv2/. It covers most PICs, dunno about dsPIC. It's high-level, somewhat similar to Pascal, with lots of libraries. It has a quite large user-base and a Yahoo forum. I use a PIckit3, but most any old ICSP programmer should be good to push the hexcode. Yngve.
On 05/11/18 00:34, bitrex wrote:
> On 11/04/2018 05:45 PM, speff wrote: >> On Sunday, 4 November 2018 15:12:28 UTC-5, bitrex wrote: >>> I might have to work on a project involving dsPIC code which I don't >>> have a lot of experience with, I'm primarily an AVR and ARM guy. >>>
(AFAIK, the dsPIC is a very different architecture from the traditional PIC14/PIC16/PIC18.)
> > I wonder how much of a future 8-bit AVR has, unfortunately. I love 'em > and use the ATTiny series all the time, they're IMO a significantly > superior architecture wrt high-level C/C++ development than PIC. My time > from concept to working prototype on breadboard is astonishingly low, > sometimes just tens of minutes. > > But 8-bit PIC beats them on the long-term availability/support/"legacy" > front. And 32 bit ARM is coming down in price and power consumption all > the time, also astonishingly so. >
PIC microcontrollers are horrible to use and program, but their long-term availability is unrivalled. They are also incredibly robust. (We once had a customer who wanted help improving the temperature range of their board. It ran fine up to 135 C, but they wanted to get to 150 C. It turned out that the board had an 85 C qualified PIC on board - but that was not the problem, and was quite happy at 150 C.) AVR's are not going away any time soon, but they might be getting more specialised. They are extremely popular in ASICs and custom chips - that was Atmel's main business, I believe.
speff wrote
>On Sunday, 4 November 2018 15:12:28 UTC-5, bitrex wrote: >> I might have to work on a project involving dsPIC code which I don't >> have a lot of experience with, I'm primarily an AVR and ARM guy. >> >> What's the hip current toolchains/dev boards y'all like to use for PIC >> development on Linux or Windows desktops nowatimes? > >MPLAB-X with their compiler XC-16. It's a bit greedy with resources but okay >on a modern machine. There is a free version with no optimization. I am not >sure how well the DSP functionality is supported by the compiler, we just >used it as a relatively fast 16-bit micro. > >The compiler is $995 but there is a 50% off discount coupon good to the end >of this month. Use Coupon Code : TP1932 > >This family is a bit long in the tooth, but if your customer wants it.. > >--Spehro Pefhany
What a ripoff, for that money you buy many arduinos or raspberries and program in C with gcc. There are many other micros that do support gcc, have an instruction set that is optimized for C, and that was already 18 years ago. That 995$ reminds me when Intel was asking similar money for the first 8051 or what was it assembler, promptly wrote my own assembler for it. And all that (995 $) because you are too lazy to learn asm ... LOL You will have to read the datasheet anyways and learn the idiotic crippled C they present you. Or buy a trs80 and program in forth. No wonder bloat rules. It sells. ;-)
bitrex wrote
>My time >from concept to working prototype on breadboard is astonishingly low, >sometimes just tens of minutes.
Just lighting a LED can be done with one resistor too.
 bitrex wrote
>On 11/04/2018 05:45 PM, speff wrote: >> On Sunday, 4 November 2018 15:12:28 UTC-5, bitrex wrote: >>> I might have to work on a project involving dsPIC code which I don't >>> have a lot of experience with, I'm primarily an AVR and ARM guy. >>> >>> What's the hip current toolchains/dev boards y'all like to use for PIC >>> development on Linux or Windows desktops nowatimes? >> >> MPLAB-X with their compiler XC-16. It's a bit greedy with resources but okay on a modern machine. There is a free version with >> no optimization. I am not sure how well the DSP functionality is supported by the compiler, we just used it as a relatively >> fast 16-bit micro. >> >> The compiler is $995 but there is a 50% off discount coupon good to the end of this month. Use Coupon Code : TP1932 >> >> This family is a bit long in the tooth, but if your customer wants it.. >> >> --Spehro Pefhany >> > >I see a lot of requests on freelance sites, etc. for assistance >maintain/debugging/future-proofing PIC code. I see very few requests for >maintenance or debugging of "legacy" 8 bit AVR code. > >Maybe like the Maytag repairman they just worked right first time and >didn't need any further assistance, most of my AVR projects are like >that nowatimes. ;)
It is because of a zilion pics versus 1 avr sort of thing. And PICs were (are?) very popular by 'amateur' programmers. Those have questions, many real programmers too, good help. These days it is 'duinos, and moving towards 'berries. If your application has any serious I/O to the world including internet, WiFi, USB, keyboard and monitor etc, raspis are the way to go now. I just configured an old raspi as 4G access point for my LAN, 4G USB stick in it, 10 lines of code, bash script that is. http://panteltje.com/pub/raspi_as_4G_access_point_IMG_6654.JPG canceled my cable subscription and save loads of $$$$$ a year. So far I found no difference in performance / speed, even youtube works. https://en.wikipedia.org/wiki/Raspberry_Pi Lots of I/O via GPIO. Only for things that need very small space and / or very low power consumption maybe a PIC. Or for fun.