Programming Micro Controllers

Discussion in 'Embedded Systems and Microcontrollers' started by droggie, Jan 6, 2013.

  1. droggie

    Thread Starter Active Member

    Oct 21, 2012
    I'm fairly new to microcontrollers. I'm learning Arduino which I find fairly easy. However I would like to know what the most common method of programming standard alone micro controllers is. Is there a universal board that mounts microcontrollers and connects to the cpu via USB? An example of a microcontroller I'd like to use is this CD4518 which I would like to connect with a seven segment display in the future.
    Last edited: Jan 6, 2013
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    The CD4518 is a digital counter and not a micro controller.

    Generally every family of micros may need a custom method and hardware to program it. Very often this uses a USB bus.
  3. droggie

    Thread Starter Active Member

    Oct 21, 2012
    I thought digital counters were the same as micro controllers. Do digital counters still need to be programmed manually?
  4. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    No, the 4000 series CMOS logic chips and 74xx series of TTL/CMOS logic are packaged gates. Non-Programmable. They behave exactly as their datasheet states they will.

    There isn't a way to change the internal behavior of a 74xx or 4000 series IC, some have options brought out to pins which are "programmed" by putting a high or low signal on that pin.

    Microcontrollers are typically PIC or AVR. The part numbers for PIC are PIC16F... or PIC18F... with some PIC24 and PIC32. AVR are the ATmega 128/328, ATTiny <number>, and 8051 (89C51 or similar) part numbers.

    PIC use a PICKit2/3 ICSP (In Cicruit Serial Programming) programmer which works only with PIC controllers, while AVRs use a JTAG like ICSP progammer, which mostly only works with AVR (though some FPGA JTAG programming tools can be used to program an AVR, the reverse is not true).

    Before Microcontrollers, all that was available were the common Logic ICS, which people stuck together to form everything from flashing LEDs to 8 bit CPUs (with hundreds of logic ICs).

    I hope that helps. It can be confusing at first, but microcontrollers are easy to learn, as long as you understand logic and program flow.
    droggie likes this.
  5. JMac3108

    Active Member

    Aug 16, 2010
    Here is a description of a common or typical setup for a microcontroller...

    (1) A typical setup has a board with the target microcontroller on it. This board can be your design, or a development board purchased from the microcontroller manufacturer.

    (2) This board has a JTAG connector that is used to program and debug the microcontroller.

    (3) A device called a debugger (or programmer, or JTAG pod, or various similar names) is purchased from the microcontroller vendor. The debugger connects to the JTAG connector on your board, and connects to a PC by USB.

    (4) A software environment called an IDE (Integrated Development Environment) is used to write code for the microcontroller in C. The IDE allows you to write code in C, compile and link it, and download it to the microcontroller on your board via the debugger (or JTAG pod). It also provides debugging capability such as watching variables and setting breakpoints in your code. These help to debug your code when its not working properly. Examples of IDE's are Code Composer Studio, IAR, and MPLAB.

    The best way to get started with all this is to pick a microcontroller, then buy a kit from the manufacturer that includes a development board with microcontroller, the debugger and cables, the IDE and sample code. Some examples are the PICkit or the MSP430 Launchpad.
  6. droggie

    Thread Starter Active Member

    Oct 21, 2012
  7. MrChips


    Oct 2, 2009
    Sure. Why not? It is easy to program and lots of help and examples are available on the internet.
  8. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    I liked pics. They are a lot cheaper and really not that all hard to work with.
  9. vikramreddy1433

    New Member

    Aug 14, 2013
    sir,can you explain in detail how can i choose this type of microchip only can use for the particular application and also how can we programme for that particular microchip (or) micro controller only?
  10. MrChips


    Oct 2, 2009
    You go and buy a PICkit 2 or PICkit 3 Debug Express.
    It comes with a demo board/prototyping kit.
    Learn to program the mcu supplied by following the many examples on the internet.
  11. Shagas

    Active Member

    May 13, 2013
    You see what requirements you have and what peripherals you need and you choose the microcontroller . I heard microchip has system on their website which helps you choose a micro according to your needs.

    To program a microcontroller you need a programmer. For example PIC kit 3(for pic -microchip) .

    Pic kit3 + PIC microcontroller + breadboard + IDE (it's free) and you can dominate the world.
  12. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    If you google for universal programmers you will find a ton of them out there.

    You can find programmers that work with over 50000 different devices pretty easily.

    That will include tons of devices like eproms, and it should include several different families of microcontrollers.

    PIC and Atmel (most common chip in Arduinos) are only two of the microcontroller manufacturers.