easyPic V7 programming randomly halts.

General discussion on mikroElektronika development boards.
Post Reply
Author
Message
SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

easyPic V7 programming randomly halts.

#1 Post by SaturdayScience » 15 Apr 2017 09:04

Hi I am becoming frustrated trying to program PIC18F26K22 for internal oscillator.

I'm running win 10, microC Pro 6.6.2, mikroprog suite 2.32. The code is very simple

Code: Select all

void setup() {
  ANSELA = 0;          // set digtal no analogues
  ANSELB = 0;          // set digtal no analogues
  ANSELC = 0;          // set digtal no analogues

  TRISA = 0;           // set direction to be output
  TRISB = 0;           // set direction to be output
  TRISC = 0;           // set direction to be output
  TRISE = 0;           // set direction to be output
  //  Set up the oscilator module
  OSCCON = 0b01110011;   // bits 6:4 are IRCF - clock frequency
                         // bits 1:0 are SCS - system clock source
  OSCCON2 = 0b00000000;  // bit 4 is MFIOSEL
  OSCTUNE = 0b11000000;  // bit 6 is PLLEN
  // bit 2 of OSCCON will show if Hi freq osc is stable 1=stable 0 = not stable
  // bit 7 of OSCCON2 will show system clock comes from PLL = 1 or not =0
}  // end of setup()

void main() {
  setup();
  do {
    LATA = 0x00;       // Turn OFF LEDs on PORTA
    LATB = OSCCON;
    LATC = OSCCON2;
    Delay_ms(1000);    //  delay

    LATA = 0xFF;       // Turn ON LEDs on PORTA
    Delay_ms(1000);    // delay
  } while(1);          // Endless loop
}
Programmer simply halts at random memory locations as shown in the attached file. I have tried external power for the easypic7 as well as USB. Neither work - so it isn't because I have too little power available. I have no peripherals selected by header (e.g. analogs, temperature etc). I have tried with J10 and J23 set for VCAP - and that doesn't improve matters much (I get some complete erase/ write / verify cycles but <30% success rate).

SW1 are all off, SW2 are all off, SW3 are all ON, SW4 are all off. J19 is set for MCLR. Button press level J17 set to VCC and J24 is not in place. For all ports (A-E) the Pull up/down are all in the off position. The programmer progresses to the verify action. It then stall randomly and the DATA led of the ICD blinks once every few seconds and halts.

If I select external crystal as the oscillator choice then I enjoy 100% success rate (VCAP set for RA4 RA5). And yes such simple code works.

I ask myself what am I missing? Is it something in the Config fuses?
Hoping one of you kind folk might be able to shed light on the situation. :)

Thanks,

Mike
Attachments
progsuite point of failure
progsuite point of failure
pic18f26k22.png (275.23 KiB) Viewed 5003 times

User avatar
danilo.milovic
mikroElektronika team
Posts: 501
Joined: 05 Dec 2016 14:59

Re: easyPic V7 programming randomly halts.

#2 Post by danilo.milovic » 18 Apr 2017 14:44

Hi,

please update mikroProg suite to 2.51 version, and then in suite go to USB -> firmware update, to make sure you have latest firmware.

If that doesn't solve your problem please send me whole project in .zip archive so I can try to reproduce the issue.

Regards,

Danilo

SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

Re: easyPic V7 programming randomly halts.

#3 Post by SaturdayScience » 18 Apr 2017 18:41

Hi thanks for the suggestion. I have tried to obtain an update [by opening the programmer, menu USB > Firmware Update] and the result was a big negative - see screen shot. I can't find any place on the mikroe website to get downloads of software. I tried the mikroe website chat which was supposedly on line but it halted as no one was available - I guess it is holiday time.

Please advise as this is getting ever more frustrating.
Mike
Attachments
noUpdate.png
noUpdate.png (188.14 KiB) Viewed 4993 times

User avatar
danilo.milovic
mikroElektronika team
Posts: 501
Joined: 05 Dec 2016 14:59

Re: easyPic V7 programming randomly halts.

#4 Post by danilo.milovic » 19 Apr 2017 11:06

Hi,

you need to connect and turn on Easypic v7 in order to upgrade the firmware on the board programmer.

Regards,

Danilo

SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

Re: easyPic V7 programming randomly halts.

#5 Post by SaturdayScience » 19 Apr 2017 14:51

Hi Danilo,

I believe I had done so. :)

Mike

SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

Re: easyPic V7 programming randomly halts.

#6 Post by SaturdayScience » 19 Apr 2017 22:01

Hi Danilo,

Programmer updated and write fails.
Attachments
writeFail.png
writeFail.png (284.87 KiB) Viewed 4975 times

SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

Re: easyPic V7 programming randomly halts.

#7 Post by SaturdayScience » 19 Apr 2017 22:02

Project files attached
Attachments
Submitted.zip
ZIP of project files
(31.63 KiB) Downloaded 210 times

MaGiK
Posts: 897
Joined: 19 Apr 2013 10:00

Re: easyPic V7 programming randomly halts.

#8 Post by MaGiK » 21 Apr 2017 06:09

Hello Mike ( <---- Cool name ) :D

I had the same issue back in the old days.
What I have in mind is not a solution, but I guess you can call it a work around.

I just had to disable the verification of the writing process because I never really needed it.

These are the steps of how to do the same:

1- Open your (MikroProg suite for PIC) software.
2- Choose (Options) which is available in the bottom left.
3- From the new window, uncheck the first option in the menu to the right.

As I said earlier, it's not a solution, but it will save you lots of time.

Kindest regards :D
My hobby is collecting MikroElektronika products.
Gotta catch them all!

User avatar
danilo.milovic
mikroElektronika team
Posts: 501
Joined: 05 Dec 2016 14:59

Re: easyPic V7 programming randomly halts.

#9 Post by danilo.milovic » 21 Apr 2017 10:23

Hi,

I haven't been able to reproduce the issue, can you send me the photo of the board.

You can also disable the verification process as suggested by MaGiK.

@MaGiK thanks for helping our users.

Regards,

Danilo

SaturdayScience
Posts: 14
Joined: 04 Jan 2013 23:40
Location: Chester, UK

Re: easyPic V7 programming randomly halts.

#10 Post by SaturdayScience » 21 Apr 2017 10:44

Hi MaGiK,

Thanks for taking the time to help - its much appreciated. Very thoughtful of you to include an explanation of the steps involved.

As it has been such a "failure rate" [programming / verification cycle not device] I have been progressing my project using external crystal which the programming cycle seems happy with.

Somewhere I came across some reference to Port B pullups giving the programmer a hard time but only when using internal oscillator. Can I find the reference again? Of course not.

Thanks again for taking the time to help.

Mike

MaGiK wrote:Hello Mike ( <---- Cool name ) :D

I had the same issue back in the old days.
What I have in mind is not a solution, but I guess you can call it a work around.

As I said earlier, it's not a solution, but it will save you lots of time.

Kindest regards :D

Post Reply

Return to “Development Boards”