Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 01:02:52 13:02


Login with username, password and session length


Pages: [1]
Print
Author Topic: Trying to use MPLAB  (Read 2367 times)
0 Members and 1 Guest are viewing this topic.
orpheedulogis
Junior Member
**
Offline Offline

Posts: 61

Thank You
-Given: 9
-Receive: 1


« on: April 20, 2014, 04:51:10 16:51 »

Hi all

I'm trying to make working a PIC18F4523 with MPLAB instead mikroe... with no success  Embarrassed

Actually I use Proteus to simulate some parts with mikroe and it works (also on a real PCB) so why using MPLAB ? simple: I will need to use MPLAB for programming PIC24FJ128GC010 witch is not supported by mikroelectronika.

First I put MPLAB on my laptop and I think it's quite long to set correctly everything (and probably it's not because it doesn't work  Roll Eyes )
Second I added "MPLAB-C15-Full-v3" and MPLAB 18-v3.47".
Third in MPLAB I choose "mcc18.exe" in toolsuite

I'm here: I put a simple code to see if it worked.
 
 
Quote
#include <p18F4523.h>

 
#pragma config FOSC = HS, FCMEN = OFF, IESO = OFF
#pragma config PWRT = OFF, BOREN = OFF, BORV = 30
#pragma config WDTEN = OFF, WDTPS = 32768
#pragma config MCLRE = ON, LPT1OSC = OFF, PBADEN = OFF, CCP2MX = PORTC
#pragma config STVREN = ON, LVP = OFF, XINST = OFF


//
#define led PORTDbits.RD0
#define duree 10000
 
void tempo(unsigned int compte)
{
 while(compte--);
}
 
 
void main(void)
{
 TRISD = 0x00;
 while(1) {
 led=!led;
 tempo(duree);
 
 }
}


and, when compling, I have this:

Quote
Debug build of project `D:\WesX\WesX25 MPLAB\Simu4523MPLAB.mcp' started.
Language tool versions: mpasmwin.exe v5.54, mplink.exe v5.00, mplib.exe v5.00
Preprocessor symbol `__DEBUG' is defined.
Sun Apr 20 16:35:32 2014
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4523 /i"C:\MCC18\h" "Main.c" -fo="Main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
D:\WesX\WesX25 MPLAB\Main.c:10:Error [1224] configuration setting 'FOSC' not recognized
D:\WesX\WesX25 MPLAB\Main.c:11:Error [1225] configuration value '30' not recognized for configuration setting 'BORV'
D:\WesX\WesX25 MPLAB\Main.c:12:Error [1224] configuration setting 'WDTEN' not recognized
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `D:\WesX\WesX25 MPLAB\Simu4523MPLAB.mcp' failed.
Language tool versions: mpasmwin.exe v5.54, mplink.exe v5.00, mplib.exe v5.00
Preprocessor symbol `__DEBUG' is defined.
Sun Apr 20 16:35:32 2014
----------------------------------------------------------------------
BUILD FAILED

Could you help me ?

Thanks
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 153

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #1 on: April 20, 2014, 05:22:38 17:22 »

Quote
D:\WesX\WesX25 MPLAB\Main.c:10:Error [1224] configuration setting 'FOSC' not recognized
D:\WesX\WesX25 MPLAB\Main.c:11:Error [1225] configuration value '30' not recognized for configuration setting 'BORV'
D:\WesX\WesX25 MPLAB\Main.c:12:Error [1224] configuration setting 'WDTEN' not recognized

You are getting this error because you are not defining the configuration according to the version of compiler you are using.
Check the Device Header file in the compiler with which you are compiling your code.

Apart from that the IDE and Compiler you are using looks very very old.
MPLAB-C15-Full-v3
MPLAB 18-v3.47".

The Latest Compiler is MPLAB C18 v3.47 and can be downloaded from here
http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=SW006011#dtDocumentation

And as far as IDE you are using, Microchip has ended its support for this MPLAB IDE and its last version was v8.92 and now they had released a new MPLABX IDE which can be downloaded from here.
https://www.microchip.com/pagehandler/en-us/family/mplabx/

But if you still want to use the old MPLAB IDE, try to use its latest version which is available at this page.
http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html

With the Latest MPLAB-X you can set the configuration bits very easily.
Just read this MPLAB X wiki page

http://microchip.wikidot.com/mplabx:view-and-set-configuration-bits



Posted on: April 20, 2014, 05:14:28 17:14 - Automerged

Quote
Actually I use Proteus to simulate some parts with mikroe and it works (also on a real PCB) so why using MPLAB ? simple: I will need to use MPLAB for programming PIC24FJ128GC010 witch is not supported by mikroelectronika.

You wrote this that Mikroelektonika doesn't support this PIC24FJ128GC010 Controller, but it is supported by Mikroelektronika.

Download this mikroC for dsPIC/PIC24 from here: http://www.mikroe.com/mikroc/dspic/




Logged
orpheedulogis
Junior Member
**
Offline Offline

Posts: 61

Thank You
-Given: 9
-Receive: 1


« Reply #2 on: April 20, 2014, 05:36:26 17:36 »

Thanks very much !

I read mikroelektronika doesn't developped for this microcontroller. It must be a new version. Perhaps it would be good if I try to use MPLAB because it may have some bugs.

For MPLAB, do you think it's better to use X or older version ?

Also: I use PIC16, PIC18 and will use PIC24 so have I to install many MPLAB systems ?


« Last Edit: April 20, 2014, 05:50:38 17:50 by orpheedulogis » Logged
Unhappy
V.I.P
Active Member
*****
Offline Offline

Posts: 200

Thank You
-Given: 369
-Receive: 52


« Reply #3 on: April 20, 2014, 09:05:03 21:05 »

Thanks very much !
I read mikroelektronika doesn't developped for this microcontroller. It must be a new version. Perhaps it would be good if I try to use MPLAB because it may have some bugs.
For MPLAB, do you think it's better to use X or older version ?
Also: I use PIC16, PIC18 and will use PIC24 so have I to install many MPLAB systems ?
1.MPLAB/MPLAB-X is IDE only (choice is yours) AFAIK MPLAB-X is still unstable better stick with MPLAB 8.92
 
2.For different PIC16, PIC18 & PIC24 you only need to install their respective compilers in software toolchain
Goodluck
« Last Edit: April 20, 2014, 09:09:36 21:09 by Unhappy » Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 153

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #4 on: April 20, 2014, 09:55:40 21:55 »

As stated above by unhappy, it is true that mplabx is still unstable, but still i use and loving it.

You can either use mplab x or older mplab ide.
My vote goes to mplab x as older mplab is no longer supported and is archieved by microchip.

For pic10,12,16,18 yiu can use xc8 compiler

For dspic and pi24 you can use xc16 compiler

For pic32 you can use xc32 compiler.
These all are new compilers from microchip.



Logged
orpheedulogis
Junior Member
**
Offline Offline

Posts: 61

Thank You
-Given: 9
-Receive: 1


« Reply #5 on: April 21, 2014, 07:47:34 07:47 »

Ok
I will try with old one first.
Thanks
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2018

Thank You
-Given: 514
-Receive: 477


Top Topic Starter


« Reply #6 on: April 21, 2014, 12:46:31 12:46 »

try mplab-x, if you are sure you find bugs, go back to the already buggy mplab 8.92, im serious.
Logged

nothing to say..
danifox
Newbie
*
Offline Offline

Posts: 7

Thank You
-Given: 30
-Receive: 2


« Reply #7 on: January 23, 2015, 08:32:27 20:32 »

MPLAB X has improved a lot since it's first version, give it a try! I have not experienced big issues while doing my project with MPLAB X, but if you don't like it you always can work with the older version again. In addition, if you are finding it difficult to config the PIC18, I would reccomend you CCS compiler.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC