The Godfather talking
This is god damn my place! Capisci?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2024, 03:14:33 03:14


Login with username, password and session length


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

Posts: 72

Thank You
-Given: 10
-Receive: 2


« on: April 20, 2014, 03:51:10 15: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: 173

Thank You
-Given: 122
-Receive: 254


« Reply #1 on: April 20, 2014, 04:22:38 16: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: 72

Thank You
-Given: 10
-Receive: 2


« Reply #2 on: April 20, 2014, 04:36:26 16: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, 04:50:38 16:50 by orpheedulogis » Logged
Unhappy
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 988
-Receive: 100


« Reply #3 on: April 20, 2014, 08:05:03 20: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, 08:09:36 20:09 by Unhappy » Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #4 on: April 20, 2014, 08:55:40 20: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: 72

Thank You
-Given: 10
-Receive: 2


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

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

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


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

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

Posts: 7

Thank You
-Given: 38
-Receive: 2


« Reply #7 on: January 23, 2015, 07:32:27 19: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