Tuesday, 5 April 2016

What do you need to program a microcontroller

 Microcontrollers are getting more common in synths.
So its important to get started understanding these if you are ever to master DIY, repairs, etc.
Soldering is just the first step. once you have it on your board and are happy you don't have any shorts
you will need to program the thing.

How do I do this? There are 4 things you need.
 
1. Microcontroller
2. programmer
3. IDE (integrated development environment)
   - compiler
   - text editor
4. basic circuit building skills 


--------------
 1. Microcontroller
There are lots of companies that make microcontrollers.
Each of these companies have their own programmers, compilers,  etc.
This makes it tricky when deciding which programmer to buy, as there isn't one programmer that
works for everything.

Lets look at 2 popular companies:
Microchip & Atmel

* Microchip produces microcontrollers with three very different architectures:
   8, 16, & 32 bit
Here is their website

8-bit (8-bit data bus)]
   -PIC10 and PIC12:
  - PIC16 series 
  - PIC18
   
16-bit (16-bit data bus) 
    - PIC24F
    - PIC24H
    - ds PIC 30
    - Ds PIC 33

32-bit (32-bit data bus) 
    - PIC 32
 

Atmel were acquired my Microchip so they share the same website
You can get started here

Here is a brief list of Atmel Microcontrollers

    ATmega168PA AU Atmel Arduino IC. SKU : RM1155. ...
    ATmega328 Microcontroller for Arduino. SKU : RM2940. ...
    ATmega8 Microcontroller. ...
    ATmega16 Microcontrollers. ...
    AT89S2051 Microcontroller. ...
    ATmega16 Microcontroller with Robosapiens Boot Loader Software. ...
    ATmega168 Microcontroller. ...
    ATmega32 Microcontroller.
 
------------------------------------------

2. programmer
The programmer is the device that is used to send the code from your
computer to the chip.
 
 Each company has many programmers.
Your choice will depend on how advanced you want to get.

Here is an example of a PIC/Microchip programmer

Below is a PIC K150 ICSP Programmer Kit

 

Here is a programmer for ATmel

...------------------------------------------

3. IDE
The integrated development environment is the software application.
It consists of at least a source code editor, build automation tools and a debugger.  

Each company will have its own IDE. There are also lots of 3rd party companies
 
MPLAB is a common IDE used for PIC microcontrollers
 
Atmel Studio is a common IDE for Atmel microcontrollers 
Atmel also uses Visual Studio from Microsoft.

-------------------------

4. Basic circuit building skills

When you buy a programmer, it will come with a manual, that shows how to connect it to your microcontroller.
You need to be able to read a basic circuit diagram and probably use a breadboard .

You will need to open up the data sheet for the microcontroller in question, and make the appropriate connections.
 

Links

+ Microcontrollers... Programmers  


No comments:

Post a Comment