views:

686

answers:

4

What resources do you know dedicated to software development in C for PIC microcontrollers?

I would like to see some kind of framework that handles both IO (buttons for input and LCD for output) and application logic. You can think of it as a VERY simple OS. I understand that PIC's memory can be small for such frameworks so I think it could be a code generator that creates a specific code based on a config file. Then you add code fragments specific to your app. Have you seen something similar?

+1  A: 

I've never seen a library like this. This is probably because the I/O configurations can be really different from one project to the other, making it really hard to have a "generic" set of functions.

SoapBox
+3  A: 

TinyOS (written in a dialect of C) has been ported to some of the PIC microcontrollers:

But if all you want to do is is simple I/O then its way more sophisticated than you need and probably much easier just to write the code yourself than go through the learning curve.

Otherise it possible to write fairly sophisticated logic using a PLC 'ladder logic' approach. There's one based on PIC microcontrollers at:

tonys
+1  A: 

It depends on which PIC, of course. The PIC24/dsPIC have many interrupt levels, and it is easy to use them to make a simple priority based scheduler.

For determinism and good A/D filtering it's hard to beat a system with a few timer based interrupt levels.

If you really want an OS, here are a few: Contiki pico|OS TNKernel

Doug Currie
Thanks for feedback. I'm planning to use PIC16.
grigy
A: 

Look into CCS C compiler (http://www.ccsinfo.com). It has a nice comprehensive library for handling digital I/O, ADC, common bus communication. Tutorials and development boards available too.

It has a remarkable peer-to-peer support forum http://www.ccsinfo.com/forum . If you are considering CCS C, make sure to check out this forum, because it will identify for you some of this IDE's idiosyncrasies.

It's relatively inexpensive. I've been using it for years. It's been doing an adequate job.

Nick Alexeev