tags:

views:

109

answers:

4

Can anyone suggest any good material to start embedded system programming?

  1. a good PIC board to start with
  2. a good book
  3. Tools like compilers, OS, etc.
+1  A: 
  1. a good PIC board to start with
    I don't know PICs. Check digikey.com for dev boards.
  2. a good book
    You will need a CPU Manual for the embedded device and the assembly reference. Past that, snag a copy of the K&R C book.
  3. Tools like compilers, OS, etc.
    C Compiler should be supplied with the device. OS you should do without when first starting; that could be your first project - write an OS for it.

You should also dig up a basic electronics website and understand a bit about digital circuits.

Paul Nathan
Thanks. But I am missing the main ingredient 'the board'
JPro
The board isn't terrifically important starting out, so long as it has a few LEDs and buttons. Also note that you can google 'pic board' as well as I can... Sparkfun is a reputable source as well.
Paul Nathan
I liked the PICDEM.NET 2 when i started into PIC design its a bit expensive at $165 but you can play with buttons, LCD screens, Ethernet, RS232, has some other sensors on board and a nice prototyping area as well as really easy access to all pins.
Mark
+2  A: 

Please, by all means do yourself a big favor and do NOT start your embedded career with the obsolete 8-bit PICmicro (the 16-bit PIC24/dsPIC or PIC32 are much more modern and aren't that lousy). This particular baroque architecture, where no standard-compliant C compiler is even possible, is really the worst choice for learning embedded systems programming. This makes no sense when so many other modern MCUs friendly to high-level language programming are available.

The best investment you can make at this point is to learn a modern CPU architecture, such as ARM Cortex. Plenty of excellent and inexpensive ARM Cortex-M3 and Cortex-M0 boards are available. I would recommend the Cortex-M3 based Stellaris boards (http://www.luminarymicro.com/products/evaluation_kits.html/). For example, EKI-LM3S811 board comes with complete on-board J-Tag debugger, 96x16 pixel OLED display, an LED, a pushubtton, a potentiometer wheel (for ADC), all under $50. You can also get good deals on STM32 boards (), or NXP boards. NXP is also the first vendor of the Cortex-M0 with their very inexpensive LPCeXpresso-1114 board.

Miro
It's not going to kill him to learn PIC. I'd argue that 8051/AVR/XCore/8086 is just as good as ARM for learning.
Paul Nathan
What planet are you living on? 8bit is the largest market segment in the microcontroller business and Microchip is the leader in market share.
Mark
From the programming point of view the 8-bit PICmicro CPU is so unnecessarily hard to deal with that I find it a disservice to the industry to keep teaching this CPU architecture to the future generations of embedded developers. Sure, many "old-hands", who learned the "PIC" or "8051" will keep using them forever. But I just hope that new engineers pay attention. My advice to them is to choose a modern CPU with unsegmented memory and a decent stack. A lot of progress happened since the 1970s.
Miro
I agree with Miro. The 8-bit PIC architecture is not very C-friendly. You can get a "kick-start" edition of an ARM compiler which will allow you to compile up to 32 kbytes of code from IAR (http://www.iar.com/website1/1.0.1.0/1784/1/) for free.
semaj
Agreed; get a cheap Cortex-M3 eval board and free code limited IAR or Keil compiler evaluation. For low-end Cortex-M3 parts the code limit is not even a limit - being larger than the part itself! Although the licenses do not permit commercial release.
Clifford
A: 
  1. PIC and "good" may be an Oxymoron. The low end parts are severely limited and have a quirky architecture that makes entirely ISO C compliant compiler implementation difficult or impossible.
  2. Micheal Pont's Embedded C and K&R 2nd ed.
  3. If you choose to stick with PIC, the compilers and tools can be relatively expensive, and you will need a different tool-chain for different PIC architectures (PIC10,12,16,18,24, 32 dsPIC etc.) - there is very little compatibility between them (especially PIC32 which uses MIPS architecture), and the debug interfaces differ between generations of device. There is at least one free compiler for PIC16 and 18 (SDCC), and the MPLAB IDE and debugger are free, but unless you use a supported compiler you may be limited to debugging in assembler.

I strongly suggest that you look at either Atmel-AVR or ARM Cortex-M3 devices.

AVR because it is the only 8 bit device supported by the GNU tool-chain, has an instruction set and architecture designed to support ISO C compiler implementation, and has an architecture that is common to all parts in the range.

ARM Cortex-M3 because parts are available from multiple vendors with the widest range of on-chip resources and peripherals, and with enough horse-power and an architecture suited to easily support an RTOS.

Of the two, I'd recommend the Cortex-M3; ARM is the most widely used architecture in embedded systems, and the Cortex-M3 is a significant improvement over ARM7, and is encroaching into markets previously held by the fragmented 8-bit world. And because a true 32bit architecture will always make your life easier!

For resources and information, as well as books, I suggest you take a look at Embedded.Com, read some articles, and subscribe to their newsletters and free paper publications.

Clifford
A: 

Have a look at the Arduino project based on the Atmel Meg128 micro.

'Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.'

Here is a link to FLOSS Weekly pod cast about Arduino

Charles Faiga