Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with mikroc & MPLAB IPE

Status
Not open for further replies.

kappa_am

Full Member level 6
Joined
Jul 16, 2012
Messages
331
Helped
19
Reputation
38
Reaction score
19
Trophy points
1,298
Location
Vancouver
Activity points
3,859
Hi,
I used MikroC and Mikroprog for programming PIC and dspics. Recently I have lost my Mikroprog, and I use my PICKIT3 for programming. I generate hex file using mikroC and use MPLAB IPE to program the chip but, unfortunately, we face a warning like :
2016-06-20T22:26:01-0700 - Completed loading IPE.

2016-06-20T22:26:07-0700 - Loading hex file. Please wait...
Loading code from D:\ddf.HEX...
Warning: D:\ddf.HEX contains code that is located at addresses that do not exist on the PIC16F1455.
Code incompletely loaded.

after ignoring warning and programing chip, pin configurations do not work. For example, I can't assign I/O function to MCLEAR and external OSC pins.

I would be grateful if you help me on this issue. I've attached a generated hex file that I generate for PIC16F1455.
 

Attachments

  • ddf.zip
    23.5 KB · Views: 96

Your project configuration is wrong.
Check if you have selected correct mcu and collect .lnk file.
Make sure you include the correct .h file for your mcu.

If cannot solve it, post the mplab project here.
 

Re: Problem with mikroc & MPLAB IPE

Thank you for your reply.
I use MikroC to write program. then MPLAB IPE to program chip. The program is simple:
Code:
 unsigned short FORU, FORU1, FORU2, FORU3;
void main() {
OSCCON=0x3C;
ACTEN_BIT =1;
ACTLOCK_BIT=1;
OPTION_REG=0XC7;
 INTCON=0x00;
 C1ON_BIT=0;
 C2ON_BIT=0;
 TRISA=0x00;
 TRISC=0xFF;
 ANSELA=0x00;
 ANSELC=0x00;
 WDTCON=0x18;
 ADCON0=0x0D;
 ADCON1=0x50;
 ADCON2=0x00;
 PORTC.B5=0;
 //delay_ms(1000);
 while(1){
asm CLRWDT;
 WDTCON=0x18;
  FORU1=PORTC.B3;
  FORU2=PORTC.B4;
  FORU3=PORTC.B5;
  FORU=FORU1+FORU2+FORU3;
 if (PORTC.B4==1) {
  if (FORU>1){
   PORTA.B0=1;
   delay_ms(2000);
   asm CLRWDT; }
  if (FORU<1) PORTA.B0=0;}
  else PORTA.B0=0;
 }
}
The Config register is as below:
CONFIG1 : $8007 : 0x089C
CONFIG2 : $8008 : 0x1CC3
I have this problem with another chip like dspic33ep512mc806.

- - - Updated - - -

I found out that I can't define portA as output.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top