DiyLightAnimation

Hardware => Lynx MR16 / 16 CH DC Controller => Topic started by: plaberge on August 06, 2014,

Title: Problem Programming PIC firmware on MR-16
Post by: plaberge 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.
Title: Re: Problem Programming PIC firmware on MR-16
Post by: dmaccole on August 06, 2014,
Have you seen this page?

http://www.diylightanimation.com/wiki/index.php?title=LynxManualChannel

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

\dmc
Title: Re: Problem Programming PIC firmware on MR-16
Post by: packetbob 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
Title: Re: Problem Programming PIC firmware on MR-16
Post by: plaberge 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,
Title: Re: Problem Programming PIC firmware on MR-16
Post by: plaberge on August 06, 2014,
You are not allowed to view links. Register or Login
Have you seen this page?

http://www.diylightanimation.com/wiki/index.php?title=LynxManualChannel

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.
Title: Re: Problem Programming PIC firmware on MR-16
Post by: rrowan on August 06, 2014,
You could try this page instead of the page you did use

http://www.diylightanimation.com/wiki/index.php?title=Pickit_Pic18f1220

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 http://www.diylightanimation.com/wiki/index.php?title=FAQ#PIC_.28micro-controller.29

Rick R.
Title: Re: Problem Programming PIC firmware on MR-16
Post by: plaberge 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

http://www.diylightanimation.com/wiki/index.php?title=Pickit_Pic18f1220

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 http://www.diylightanimation.com/wiki/index.php?title=FAQ#PIC_.28micro-controller.29

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 :)