Before go into more detail you should know categories of programming software.
Those are
1. Machine languages
2. Assembly languages
3. High level languages
This is a code that use in machine language
01001010000011
Only machine(microcontrollers....) can understand this. So this is machine language and we can't use this to program microcontrollers because only 1 and 0 is used. But above code is write in an assembly language it is like this
Bcf STATUS,5
So what does it mean. It means that to convert 6th bit of status register to 0(zero). So we can use assembly language to write programs. But this is also difficult to understand. I'll tell the reason as we go on. In high level languages like Mikroc which is developed by C language, it is very easy to understand and writing language because it's code names are are familiar to english language and in few minutes you can write a big program. But there are prolems also. When we are using highlevel languages it's difficult to understand what is happening inside microcontroller. So some times it difficult to make correction. And other thing is high level languages use comparatively large program space. So limited memory of a microcontroller some time is wasted using highlevel languages. You will understand these when we are writing programs. So in my lessons I use assembly language but later I use high level language so you can master in programing in both languages. Remember if you want to be a good programmer you should know assembly very well. You will understand this as we go on \. So whether it's difficult to learn assembly language we should start to learn it.
Some assembly software are very expensive but we are going to use PIC microcontrollers and using MPLAB software which can be downloaded freely we can write programs for that. So you should download this software and install to your PC.
This is the link for that.
http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_83.zip
This is the interface of it. Do not worry we are going to get familiar with it.
After we finishing the writing program MPLAB convert it to a *.hex file which contains machine language codes. This process is called compiling. After compiling we have to insert that file to the microcontroller. We can use MPLAB for this but the problem is compilers which is a circuit that connect to the computer to facilitate writing program to microcontroller. But there are cheap compilers which you can make your own for 2-3$. But you have to download another software but it is also freely available. This is the link and get it downloaded.
http://www.winpic800.com//descargas/WinPic800.zip
This is it's interface
So I hope you will download these two software and be ready with it when we meet next time.
In next lesson i will write on hardware that you are going to need when you are doing microcontroller programming.
See you soon.
No comments:
Post a Comment