Author Topic: Problem Programming PIC firmware on MR-16  (Read 3599 times)

Offline plaberge

  • Sr. Member
  • ****
  • Posts: 105
  • Every good project requires a new tool
    • Laberge Christmas Lights
Problem Programming PIC firmware on MR-16
« on: August 06, 2014, »
I recently got around to building an MR-16 V2 that I purchased through the Jan 2012 co-op – along the way, I took a costly detour through pixels…

The MR-16 was easy to build but I’ve run into problems programming the PIC firmware. As there is no ICSP header on the board I stuck the PIC on a breadboard and tried to use the approach described in the Bare bones PIC18F programmer interface page – I realize this is a different PIC – using the connections shown below.

PICkit 3                     PIC18F1220
Pin 1 Vpp/MCLR          Pin 4 MCLR
Pin 2 Vdd                   Pin 14 Vdd
Pin 3 Vss                    Pin 5 Vss
Pin 4 ICSPDAT/PGD     Pin 13 PGD
Pin 5 ICSPCLK/PGC      Pin 12 PGC
Pin 6 LVP                    Not connected

I’ve placed a 4.7K resistor across MCLR and Vdd and am powering at 5V from the PICkit.

When I connect to MPLAB IDE, it seems to connect correctly:
PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.28.18
Firmware type......................PIC18F
PICkit 3 Connected.
Device ID Revision = 00000007
 
but when I try to program, I get:
Programming...
The following memory regions failed to program correctly:
Program Memory
Address: 00000000 Expected Value: 0000003f Received Value: 00000000
Programming failed

Are the connections described above correct? I’ve noticed .1uF capacitors on the board, do I need to add these?

I’d appreciate any insights/suggestions.
- Paul
  North Vancouver, BC
  You are not allowed to view links. Register or Login

Offline dmaccole

  • Sr. Member
  • ****
  • Posts: 758
    • PacificaLights.info
Re: Problem Programming PIC firmware on MR-16
« Reply #1 on: August 06, 2014, »
Have you seen this page?

You are not allowed to view links. Register or Login

Allows you to change the address in the HEX file and then upload it as part of the firmware.

\dmc
________________________
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either.
You are not allowed to view links. Register or Login

Offline packetbob

  • Sr. Member
  • ****
  • Posts: 130
    • zappedmyself.com
Re: Problem Programming PIC firmware on MR-16
« Reply #2 on: August 06, 2014, »
Hey Paul,

I'm in Vancouver (just over the bridge by the PNE) and have the DIP adapters for the PICKIT3...
If you want I can program them for you...

Bob
zappedmyself.com

Offline plaberge

  • Sr. Member
  • ****
  • Posts: 105
  • Every good project requires a new tool
    • Laberge Christmas Lights
Re: Problem Programming PIC firmware on MR-16
« Reply #3 on: August 06, 2014, »
Hey Bob,

Thanks, for the offer, that may make things a lot simpler. I'm in Deep Cove not too far away, you're not on Trinity Street by any chance?  I'll PM you for your address and a convenient time for me to come over.

Cheers,
- Paul
  North Vancouver, BC
  You are not allowed to view links. Register or Login

Offline plaberge

  • Sr. Member
  • ****
  • Posts: 105
  • Every good project requires a new tool
    • Laberge Christmas Lights
Re: Problem Programming PIC firmware on MR-16
« Reply #4 on: August 06, 2014, »
You are not allowed to view links. Register or Login
Have you seen this page?

You are not allowed to view links. Register or Login

Allows you to change the address in the HEX file and then upload it as part of the firmware.

\dmc

No I hadn't. I'll give it a shot and see how it goes. Thanks for pointing that out.
- Paul
  North Vancouver, BC
  You are not allowed to view links. Register or Login

Offline rrowan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 5899
  • 08096
Re: Problem Programming PIC firmware on MR-16
« Reply #5 on: August 06, 2014, »
You could try this page instead of the page you did use

You are not allowed to view links. Register or Login

no resistor needed just the .1uf cap across the pins 5 & 14 of the PIC

Also in the FAQ here is the link for all of the pic pages You are not allowed to view links. Register or Login

Rick R.
Light Animation Hobby - Having fun and Learning at the same time. (21st member of DLA)
You are not allowed to view links. Register or Login
Warning SOME assembly required

Offline plaberge

  • Sr. Member
  • ****
  • Posts: 105
  • Every good project requires a new tool
    • Laberge Christmas Lights
Re: Problem Programming PIC firmware on MR-16
« Reply #6 on: August 07, 2014, »
You are not allowed to view links. Register or Login
You could try this page instead of the page you did use

You are not allowed to view links. Register or Login

no resistor needed just the .1uf cap across the pins 5 & 14 of the PIC

Also in the FAQ here is the link for all of the pic pages You are not allowed to view links. Register or Login

Rick R.

Thanks for pointing those pages out Rick. Not sure how I missed them! I think I went down a rat hole because of the title of the original page that I looked at refers to a PIC18F but is for a different device and I didn't think there was a specific page for the Pic18f1220.

Turns out I won't need to program using a breadboard right now. With packetbob's help (and his DIP adapter) I was able to get it programmed. All good for now :)
- Paul
  North Vancouver, BC
  You are not allowed to view links. Register or Login