Need Advice for Micro-Controller for Beginner.

Discussion in 'Embedded Systems and Microcontrollers' started by Tajiknomi, Jan 27, 2013.

  1. Tajiknomi

    Thread Starter Active Member

    Mar 18, 2010
    I'm much in interested in Programing Micro-Controller, which i haven't used b4...
    But i'm not new to Programming as i have learnt C-Programming.

    Now i want to implement some C-Code on MicroController as my hobby but i don't know where to start from! Coz i don't know Which "Burner/Micro" i should bought so that its Easy for beginners as its my first time, I'm not using it for project.

    It will be great if someone give me a nice Solution of that...
    (Excuse my English).....
  2. khier


    Jan 16, 2013
    If I may share/hijack the post. I am familiar with programming too, but totally novice to embedded systems. I read a couple of books and could somewhat understand the differences between general purpose C and embedded systems C. I could settle some issues like: 1-I am going to stick to ATMEL chips. 2-I am going to use C, not assembly nor special interpreters. 3-It is better to start with a start kit like that of machinescience ( to understand how the compilation execution process goes in the embedded word. Or is it better to go the arduino way:

    These decision I could make based on my readings. However, there a lot of open questions that may make me change my mind. For example, what is exactly an arduino boards. What are there strong points and limitations? Can I program a chip in Arduino world and connect it to other components for real applications or is it lmited to arduino boards? Are the Arduino specialities optional or is it a different world than classical ATMEL? In other words, if I buy an arduino based starter kit, can I use it later with ATMEL studio or whatever embedded C compiler?

    Thanks in advance for your recommendations.
    Tajiknomi likes this.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Tajiknomi: I'm a Microchip guy, and they have a nice starting kit with lessons in C. The complete kit is the PICkit 3 Debug Express for about $70 USD.

    You get a programmer/debugger, a pre-built and tested development board and a set of lessons:

    Chapter 3. PICkit 3 Debug Express Lessons
    3.1 Lesson 1: Hello LED
    3.1.1 Creating the Lesson 1 Project in the MPLAB® IDE
    3.2 Lesson 2: Blink LED
    3.3 Lesson 3: Rotate LED
    3.4 Lesson 4: Switch Input
    3.5 Lesson 5: Using Timer0
    3.6 Lesson 6: Using PICkit 3 Debug Express
    3.7 Lesson 7: Analog-to-Digital Converter (ADC)
    3.8 Lesson 8: Interrupts
    3.9 Lesson 9: Internal Oscillator
    3.10 Lesson 10: Using Internal EEPROM
    3.11 Lesson 11: Program Memory Operations
    3.12 Lesson 12: Using the CCP Module PWM

    (Don't worry if you don't understand all these chapter titles. You will after you do them.)
    Tajiknomi likes this.
  4. MrChips


    Oct 2, 2009
    The arduino is a microcontroller platform. It uses a microcontroller that is programmed in C using library functions to connect with the hardware and off-the-shelf external devices. There is nothing to prevent you from using the arduino boards and modules (called shields) in a stand-alone real world application or with other code development platforms.
  5. khier


    Jan 16, 2013
    Oblex and MrChips, thanks for your answers

    I am not interested in re-inventing the wheel.

    I am still unable to grasp the concept byound the point of code development. Once a code is tested, how the hardware will be controlled? With the whole board as a unit or is it just a programming environment?
  6. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    Essentially, start out by drawing a diagram/flow chart of what you'd like to do. Then, break the project apart by analog and digital. Decide how many, if not all, portions can be done by uC. For those that cannot be done by uC (Lack of I/O, etc), choose a common port expanding IC such as the 74HC595 or MAX6956 (LED Driver, I/O and interrupt).

    Put together the hardware on breadbaord or perfboard, write code, starting with basic functions, ensuring they work, and then the more complicated functions.

    Write the code. This can be simple or complex. For example, Arduino makes it very simple to change an I/O pin, but at the cost of: flexibility, program speed, and cost. Standard C on a PIC or ATmel uC (< $1-$2) is the most common, and what embedded designers mostly use. Assembly is mostly for the masochistic, but sometimes a bit of tidy assembler does what you need.

    Simulate the code, inject your ADC or digital inputs into the simulator and make sure the program flow is the way you want. This is the other downside of Arduino, no simulation, no debugging interface (other than manual printing of a variable to serial terminal).

    Test all possible inputs, even those that weren't considered at the time it was designed. Fix code to work with those as well.

    Project is now finished. It can take anywhere from a few minutes to a few months for the above process, depending on the complexity of the project.
    khier likes this.
  7. khier


    Jan 16, 2013
    My quoted comment was meant for the Arduino case. But thank you very much for taking the time to explain all the details.
  8. Brownout

    Well-Known Member

    Jan 10, 2012

    Microcontrollers have many built-in periphreal functions, so it may not be necessary to add any hardware at all to the chip. Depends on what you want to do with it.
  9. takao21203

    AAC Fanatic!

    Apr 28, 2012
    You can do amazing circuits with the 16F59, especially using more than one. The one or the other extra function- use an I2C chip or a small 14 pin PIC for that.

    If you use 3x 16f59, you have 96 I/O ports for not much more than $3.

    Saves you multiplexing and other worries.

    I have even gone so far to use Arduino add on's for PIC circuits. No problem at all.

    Most of the actual problems with embedded circuits come from the hardware, the physical side, especially avoiding clunky designs, large PCBs and unneeded stuff. How to use just the right chip, not having 80% of the I/O unused, or also not to squeeze an underpowered chip to 99.8% using weird tricks.

    And to save electrical power means prolonging battery life, to multiplex in order to need less components and things like that. Or how to replace additional analoque hardware with software!

    The ICSP (in circuit programming), debugging, compiler, and the chip datasheets are just the basics you'd get used to them quickly.