Microcontrollers in C
Okay, it's been a while, and this time, i'm going to need opinions, so please help me with this one!
- How do you actually program a microcontroller? Does it involve connecting circuit to PC?
- What's the best compiler for this kind of case?
- Will i be programming each component one at a time or a circuit as a whole?
- What's a good book or tutorial for this kind of programming?
- Can anyone share an experience involving this kind of programming? (maybe some tips, i'm a beginner and only know c a little bit)
I think that's it for now, i am looking forward your answers, thanks.
For your 2nd question, I believe it depends on what type of microcontroller it is. There are obviously different compilers for different systems.
So you might want to say what kind of microcontroller it is and some may know a compiler for it.
The term microcontroller (uC) is used to describe a microprocessor that has built-in peripheral devices, such as I/O ports, memory controller(s) and other devices that you may need to build a small computer. There are tiny 8-bit micro-controllers, and there are bigger 32-bit microcontrollers. This chip is often used to build a small SBC (Single Board Computer), which has a minimum of memory (RAM and ROM) and some connectors that allow the SBC to communicate to the rest of the world.
None of your questions can be answered with a single answer that covers ALL microcontrollers.
Some connect to a PC, others you write your program on a PC, then use a ROM/FLASH programming device to store the program in a ROM, which is then plugged into the computer board.
As Elysia already said, different microcontrollers use different compilers. The very minimal requirement is that the microcontroller is supported by the compiler. Without knowing what model of microcontroller, it is impossible to say which compiler(s) are available for it. Most uC manufacturers have a web-page with "recommended sets of tools", including compilers.
What you will be programming depends on the board-design. Normally, there is one processor and then some peripheral (I/O) devices, such as serial ports, LED/LCD display. Some even have proper VGA or Text console output.
Sharing experience is again very dependant on EXACTLY what you will be doing - unless you expect me to actually write down everything I've learnt when working 15 or so years with various forms of uC stuff. And then you would have to digest the "braindump", much of which is highly unlikely to help you.
The more specific your questions, the more likely it is that you get a proper answer. Open-ended questions like these are nearly impossible to answer.
I also thought that my questions are not specific, forgive me for that. But it is because, i have not even touched the microcontroller yet, i was given information about electronic devices first before using the microcontroller in C.
Anyway, thanks for the replies, i think i'll ask more once i get my hands on the microcontrollers.
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.