EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Microcontroller programming

Started by Demon September 29, 2006
I am student of computer science. i have good skill of programming in
C/C++. I want to start learning Microcontroller Programming. What is
the pre-requisite to get started and what kind tools (Software and
Hardware) i need to get a start.

On 28 Sep 2006 22:50:03 -0700, Demon wrote:
> I am student of computer science. i have good skill of programming in > C/C++. I want to start learning Microcontroller Programming. What is > the pre-requisite to get started and what kind tools (Software and > Hardware) i need to get a start.
First of all you have to learn CPU architecture. Best way to do that is assembly programming :)
Demon wrote:

> I am student of computer science. i have good skill of programming in > C/C++. I want to start learning Microcontroller Programming. What is > the pre-requisite to get started and what kind tools (Software and > Hardware) i need to get a start.
Pre-requisites: 1. Knowledge of CPU architecture. How MMUs, interrupts, etc work. 2. Knowledge of some sort of assembler - how to write software for a processor when there is no OS is beneficial. 3. Knowledge of how a compiler and linker works, and what the output from a linker actually contains. 4. Masochistic tendencies. Debugging real-time multi-threaded apps using a single LED and a CRO is not unheard of! ;) Tools (software and hardware): *Completely* dependent on the chosen MCU. At the low end you have 8051-type processors with simple, free dev suites like SDCC (I'd say PIC but they're a little too left of the middle) or commercial compilers. At the mid-high end you'll be using GCC/GDB or commercial software. Generally a 'development kit' or 'evaluation board' is a good starting point. The hardware is proven to be correct and there's generally a turn-key development cycle and examples to guide you, not to mention ample I/O on the board itself to enable you to play with various aspects of the chip. Regards, -- Mark McDougall, Engineer Virtual Logic Pty Ltd, <http://www.vl.com.au> 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266
Demon wrote:
> I am student of computer science. i have good skill of programming in > C/C++. I want to start learning Microcontroller Programming. What is > the pre-requisite to get started and what kind tools (Software and > Hardware) i need to get a start.
Start with Microchip PIC microcontroller. It's a good trainning. You could program in assembly (better) or C. It's cheapest and you could find it easly
Mark McDougall a &#4294967295;crit :
<snipped>
> 4. Masochistic tendencies. Debugging real-time multi-threaded apps using > a single LED and a CRO is not unheard of! ;) >
Morse code? :-) :-) :-) ;-) ;-) ;-) :-) :-) :-) -- Thanks, Fred.
"dosadih" <dosadih@gmail.com> wrote in message
news:1159515834.500176.320520@i42g2000cwa.googlegroups.com...
> > Demon wrote: > > I am student of computer science. i have good skill of programming in > > C/C++. I want to start learning Microcontroller Programming. What is > > the pre-requisite to get started and what kind tools (Software and > > Hardware) i need to get a start. > > Start with Microchip PIC microcontroller. It's a good trainning.
No, that is true Masochism! Unless he wants to learn how a processor should not be designed.... Meindert
Demon wrote:

> I am student of computer science. i have good skill of programming in > C/C++. I want to start learning Microcontroller Programming. What is > the pre-requisite to get started and what kind tools (Software and > Hardware) i need to get a start.
Take a look at something like this : http://www2.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/en/USBToolStick.htm for very low prices ($10.99+) you can get real silicon, and real in-circuit emulation, with a uC with demo versions of Compilers included. Or if 8 bits in a 3mm package scares you a little, this alternative http://www.zilog.com/docs/zneo/FL0121.pdf gives you 16 x 32 bit register CPU. Large PCB+Compiler ToolChain and In System Debug, is <$50. -jg
On 28 Sep 2006 22:50:03 -0700, "Demon" <demon.lhr.pk@gmail.com> wrote:

>I am student of computer science. i have good skill of programming in >C/C++. I want to start learning Microcontroller Programming. What is >the pre-requisite to get started and what kind tools (Software and >Hardware) i need to get a start.
In addition skills already mentioned in other messages, in most cases you would need at least a very rudimentary understanding of electronics, i.e. voltage, current and resistance and how to measure these with a multimeter or oscilloscope etc. and perhaps how open collector/open drain and tri-state outputs work. Paul
On Fri, 29 Sep 2006 10:01:08 +0200, Fred Bartoli wrote:
> Mark McDougall a &#4294967295;crit : ><snipped> >> 4. Masochistic tendencies. Debugging real-time multi-threaded apps using >> a single LED and a CRO is not unheard of! ;) >> > > Morse code?
Actually a spare pin can be very useful! Sending out 'Morse code' (Baudot? - 5 bit) with another computer to receive the output can be very helpful for debugging and a lot faster than a printf. -- Neil Cherry http://www.linuxha.com/ - Linux Home Automation
Jim Granville wrote:
> > ...Or if 8 bits in a 3mm package scares you a little, this alternative > http://www.zilog.com/docs/zneo/FL0121.pdf > > gives you 16 x 32 bit register CPU. Large PCB+Compiler ToolChain and In > System Debug, is <$50.
Jim, your posts on this board have talked me into getting one myself. Never hurts to play around with another device family. To the OP, here's another board that has a good beginner's learning CPU (Motorola/Freescale HCS12 family) and a good assortment of IO to play around with: http://www.evbplus.com/dragon12.html And put me down in the Don't Start With a PIC column.

Memfault Beyond the Launch