learning mplab ide

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: learning mplab ide

Postby zhenning » Sun Jul 22, 2012 3:06 pm

Mplab can only compile assembly code .asm to .hex. In order to compile c code you need to download c compiler such as hi tech c, c18, CCS C and etc. These will act as plugins to mplab. So, in your case, if i am not mistaken, mikrobasic is a standalone program which allows you to compile hex from basic language
zhenning
Enthusiast
 
Posts: 351
Joined: Thu Dec 30, 2010 12:32 am

Re: learning mplab ide

Postby sxmplab » Sun Jul 22, 2012 3:32 pm

zhenning WROTE:Mplab can only compile assembly code .asm to .hex. In order to compile c code you need to download c compiler such as hi tech c, c18, CCS C and etc. These will act as plugins to mplab. So, in your case, if i am not mistaken, mikrobasic is a standalone program which allows you to compile hex from basic language




could MPLAB compile hex from basic language too?
sxmplab
Newbie
 
Posts: 12
Joined: Wed Jul 18, 2012 1:31 pm

Re: learning mplab ide

Postby zhenning » Sun Jul 22, 2012 4:05 pm

sxmplab WROTE:
zhenning WROTE:Mplab can only compile assembly code .asm to .hex. In order to compile c code you need to download c compiler such as hi tech c, c18, CCS C and etc. These will act as plugins to mplab. So, in your case, if i am not mistaken, mikrobasic is a standalone program which allows you to compile hex from basic language




could MPLAB compile hex from basic language too?


Nope. You need basic compiler to do that.

Mplab can only compile assembly code .asm to .hex.
zhenning
Enthusiast
 
Posts: 351
Joined: Thu Dec 30, 2010 12:32 am

Re: learning mplab ide

Postby zhenning » Sun Jul 22, 2012 4:19 pm

You can follow the following guide to compile your basic code:

http://www.mikroe.com/pdf/mikrobasic/1s ... _basic.pdf
zhenning
Enthusiast
 
Posts: 351
Joined: Thu Dec 30, 2010 12:32 am

Re: learning mplab ide

Postby sxmplab » Sun Jul 22, 2012 4:22 pm

zhenning WROTE:
sxmplab WROTE:
zhenning WROTE:Mplab can only compile assembly code .asm to .hex. In order to compile c code you need to download c compiler such as hi tech c, c18, CCS C and etc. These will act as plugins to mplab. So, in your case, if i am not mistaken, mikrobasic is a standalone program which allows you to compile hex from basic language




could MPLAB compile hex from basic language too?


Nope. You need basic compiler to do that.

Mplab can only compile assembly code .asm to .hex.


i see... thank you very much, will try to find some basic compiler to learn :)
sxmplab
Newbie
 
Posts: 12
Joined: Wed Jul 18, 2012 1:31 pm

Re: learning mplab ide

Postby sxmplab » Mon Jul 23, 2012 11:47 am

zhenning WROTE:You can follow the following guide to compile your basic code:

http://www.mikroe.com/pdf/mikrobasic/1s ... _basic.pdf



i found this code from internet, i use mikcobasic but fail with many error...

http://electronics-diy.com/schematics/721/main.c
sxmplab
Newbie
 
Posts: 12
Joined: Wed Jul 18, 2012 1:31 pm

Re: learning mplab ide

Postby zhenning » Mon Jul 23, 2012 12:00 pm

sxmplab WROTE:
zhenning WROTE:You can follow the following guide to compile your basic code:

http://www.mikroe.com/pdf/mikrobasic/1s ... _basic.pdf



i found this code from internet, i use mikcobasic but fail with many error...

http://electronics-diy.com/schematics/721/main.c



Hi,

It is not mikrobasic.

Software
This project I use CCS C compiler to programming.The main routine continually read the input voltage on RA3 and convert to 7-segment code while TIMER1 set to timer for interrupt every 5mS for scan all digit about 66Hz(only one digit turn on at every 5mS).In convert digital value to voltage routine we must scale the value with the full scale display in this project I want full scale display at 30V so the input voltage must scaled with 30 and display resolution is 29mV or 30/1023. source code and shematic available here.
zhenning
Enthusiast
 
Posts: 351
Joined: Thu Dec 30, 2010 12:32 am

Previous

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 5 guests