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.

dsPIC or ARM - Which way to go?

Status
Not open for further replies.

winterhunter

New Member
Dear All,

I'm quite new to the microcontroller world (though I have been playing around with a C-Control Unit - a 68HC12 loaded with a BASIC interpreter and a very unstable "OS").

I would like to now build a SCADA system to control things around my home (HVAC, alarm, etc.), and after looking around a bit, I'm seriously considering either a dsPIC30F or an ARM 7 core (probably an LPC21XX or AT9SAM). The main issue behind my choice is scalability of the system, which I plan on implementing using a preemptive task/thread scheduler or a small RTOS (eCOS, FreeRTOS, or others). Each new function that I will later add will simply be a new task/thread in the system.

Two µcontrollers that seem to be very well supported and have enough RAM are the dsPIC30F and the ARM7.

I have now a couple of questions regarding the tools that are available for the ARM processors :
+ Are there any free or cheap IDEs?
+ What about compilers/simulators/debuggers?
+ Is I use the JTAG interface, is it well supported by the available debuggers?
+ All these aforementioned programs, do they run on Windows? Linux?
+ I came across two providers that sell affordable development boards : OLIMEX and MIKROELECTRONIKA? Do you recommend them? Do you know of others (preferably inside the EU)?

Of course, any other ideas/comments/suggestions are very much welcome!

Thanks a lot.

Kind regards,

Gonzalo MEZA
 
If I understand it right you want to use one single powerful MPU to monitor and control everything. You can do that.

Have you considered using many inexpensive devices networked together to form a distributed system connected to a PC.

3v0
 
I'd tend to agree with 3v0, a DsPic or Arm processor seems a bit overkill for a home automation project. PIC's or AVR's are more than powerful enough to handle those sorts of tasks, and if you find yourself running low on horsepower with an individual device you can just add more. Arm's and DSpics are more useful for things like audio or data procsesing, and are more closely related to microprocessors than micro controllers. There are small free RTOS's for the both PIC's and AVR's and the deveopment software and support for both product lines is extensive and free.
 
Thanks for your answers.

I know that you are both right, but I had thought of these "big" machines since I would be in more familiar territory (I have a programming background in computers, and ARMs are actually MPUs derived from CPUs).

But let my ask you a couple of questions in order to let me further analyse and understand what you are proposing:
+ You talk about distributed computing (which is definitively the way to go if there is some simple way of implementing it)... How do you implement it with a PIC (physical transport, control layer, stacks?)? What are the possibilities? What about integrating a PC into that network?
+ What RTOS are there for PICs? For which PICs (12/16/18/24?)?

Thanks a lot!

Regards,

Gonzalo
 
https://www.freertos.org/
Looks like they have code for a Pic18 and various AVR's. (I prefer the AVR's myself)
A serial interface from a micro controller to a PC is almost trivial. For networking all the modules you can use any bus architecture you want, or create your own the possibilities are entirely up to you. With micro controllers it's usually easiest to just use a basic serial bus and design the protocol any which way you want around your application.
 
I also agree with the two above posters. There are free tools for ARM development - gnu toolchain - but they are not easy to jump in and start using, even after spending lots of time developing for simpler micros. If you don't have much experience, these will probably bring more frustration than joy. The dsPIC would be an easier start, but you don't need all that ram. Really, a PIC 18F452 or 18F458 will give you more than enough program/ram memory to do what you want. There are also the big PICs, like the 18F6720 etc, with what is it? 128k of program memory, around 3k5 of RAM, duel USARTs and 16 channels of 10bit AD. The idea of a series of smaller processors is a good one, though. Smaller PICs, like the 16F88s and 16F628s could all communicate by rs485, and one larger device could master.
If you really insist on learning the ARM, go over to sparkfun site, and find the Jim Lynch tutorial on setting up the tool chain, but the learning curve is steep!
 
Thanks a lot for your answers!!

A couple of last questions :
What are the BEST free tools for PIC/dsPIC development?
Why does everyone I talk to lately recommend the AVR over the PIC?
 
Perhaps the recommendation for AVRs is because there is a free gnu tool chain for them, which is well supported. As for PICs, microchip offers an excellent 'free' C tool set for the 18F parts. (after a couple of months, it won't perform optimizations) They recommend using assembler for the 12f and 16f parts. I would recommend starting in assembler for either PIC or AVR, that way you get forced to know the chip.
Right now, I'm starting into SourceBoost C. I got a full licence for around 50 dollars on eBay, and as far as I've found, it is pretty good. CC5x is also pretty cheap, and some like it. CCS makes some cheap compilers, and they come with lots of built in functions, but I would write my own, so I knew how they worked.
Some people like JAL for PIC which is totally free. It is a bit closer to PASCAL or MODULA than C, IMO. The high end tools for PIC, like highTech's compiler offer a 'free' version, which is code limited. I would try as many as you can, to find the one you like the best. You should take a look at Nigel's tutorials, and the Elmo160 tutorials, just to get an idea.
 
Yea dsPIC is a great line. I know a lot about the capabilities and probs in the 33F in particular.

You just don't have any apparent need to justify the dsPIC line. 18F would do fine!


You could do a CAN bus, Dallas 1-wire, or RS485.

For 18F/dsPIC, Microchip's own tools are the best.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top