News:

Forum may be experiencing issues.

Main Menu

Programming Molecular Disruption Device

Started by jghfslk, November 19, 2017, 11:56:56 PM

Previous topic - Next topic

jghfslk

I am attempting to build David Rolo's Molecular Disruption Device.  I have the everything finished and now need to program the EEPROM.  I have an embarrassingly small amount of programming knowledge and am hoping someone can help guide me through it.  I have a Pickit 2 clone that I'll be connecting to the PCB and programming it that way.  When I first plugged the Pickit in to my computer it looked like the drivers were automatically installed.   I have SpinAsm downloaded onto my computer and can open different codes.  When I click the assemble to Program in the SpinAsm software my Pickit busy LED does not flash like I thought it was supposed to.  Am I missing something? 

Also, when I connect my 9V power supply to the PCB the overload indicator LED lights up.  Is this normal?

Any help would be greatly appreciated!

Andlord

Keep in mind that the PickKit works with USB Voltage which is 5V. 9V leeding to the overload indicator to light up is normal an you should avoid it while programming.

Sorry I can't help you with the rest of the Problem :( If you can generate a .hex file with SpinAsm you should be able to use Microchips IDE to programm it into your chip

jghfslk

Thanks for the reply!

When programming the chip, should I not be feeding the pcb 9v?  I thought I read in the build document that the pedal needs to be powered when programming the chip.

selfdestroyer

Quote from: jghfslk on November 20, 2017, 03:12:17 PM
Thanks for the reply!

When programming the chip, should I not be feeding the pcb 9v?  I thought I read in the build document that the pedal needs to be powered when programming the chip.

Yes, the PIC still needs to be powered by the pedal. The pins it uses from the PICKIT is the DATA, CLOCK and GND. So the power/VDD comes from the pedal power.

Cody

jghfslk

Thanks Cody!

I'm still not sure why the overload indicator LED lights up.  It does so whether the pickit is connected to the PCB or not.

I'm not sure if I need additional software or different drivers but I'm thinking that the SpinAsm software doesn't recognize the Pickit.  Here are the steps I've taken when trying to program:

I attach the Pickit to the PCB using the connections David mentions in the build doc.  I plug the Pickit into my computer via USB and power the PCB with 9V.  I then open SpinAsm and open either one of David's files or one from the spin website.  I get something that looks like this: 

http://s1126.photobucket.com/user/jghfslk/media/FV-1%20Code%20Example_zpsnubwmpss.png.html

Then I click Assemble To Program 0 of EEProm.  The pickit does not flash and no code is loaded into the EEPROM. 

If anyone can explain my mistakes or can point me in the direction of coding instructions I would be very grateful!

drolo

Hey there :-)


You can't program the eeprom directly from SpinASM. That feature only works with the actual Spin development kit.
What you need to do is use SpinASM to create a HEX file


Then use the Pickit2 software to load that hex file and flash it to the eeprom


If you check the thread for the the molecular group buy you will find a document that briefly explains these steps


Let us know how it goes ;-)

jghfslk

Thank you David!

I'm having some trouble generating a HEX file with SpinASM.  I'll have a project open and loaded in the project mode but when I click "Build" with the Intel Hex box checked, a new window opens that says nothing but build completed.  Does that mean a hex file was successfully created, and I just need to know where it is saved?

I'm also not positive my pickit 2 clone is working with the software.  If I open the pickit software with nothing plugged in I get a message saying Pickit 2 not found.  When my pickit is plugged in it says Pickit 2 connected but if I click read that changes to no device detected.

Thanks again for the help and for creating and sharing your creations!

drolo

it looks like a hex was created, if you did not change the default working directories they will be under program files/spin .. something
check in the directories menu where the hex file is setup to be saved (check attached pic)




jghfslk

Getting closer I think..  I can find the folder with the hex files.  I now have it so the hex file will be saved to my desktop.  Do I need an additional software for my computer to recognize and open a hex file?  If I just double click to open the file,  I get the "windows can't open this file message".  When trying to import the hex file with the pickit 2 software I get a Device Error - hex file not loaded message.

Thank you again for taking the time to help me with this!

drolo

did you select the correct device in the pickit2 software (eeprom / 24lc32a) ? (in the device family menu)

jghfslk

Success!!

We have effects!  I don't have time now before work to load a program into each slot but will attempt later tonight.  I'll need to check the build document to learn how to load programs into different slots.

I'm really excited for this one.  Thank you so much David!!

drolo


jghfslk

You helped immensely :)

I'm having a little filling all 8 slots with different effects.  With the Project dialog box open in the SpinAsm software do I use the corresponding Prog box that will be used when flashing the EEPROM.  For example, if I want a reverb in prog 4 of the eeprom do I load the reverb into prom 4 of the project dialog box and then build the hex file?  Am I supposed to clear the other programs in the project dialog box out?  Or do I load each prog of the dialog box with the effect that I want, then create the hex file and flash them one at a time in the Pickit software?

I have been unplugging the pickit each time I flash a new program into a new slot.  I trying to make this clear but am not sure if it will be...  Right now I have all 8 slots filled but am getting the same effect on multiple selections of the rotary switch (Prog 0 and 1 are the same, Prog 2 and 3 are the same, Prog 4 and 5 are the same, and Prog 6 and 7 are the same)

Thank you for being patient with me and helping with my extremely novice skills!

drolo

Quote from: jghfslk on December 01, 2017, 04:38:03 AM
You helped immensely :)

I'm having a little filling all 8 slots with different effects.  With the Project dialog box open in the SpinAsm software do I use the corresponding Prog box that will be used when flashing the EEPROM.  For example, if I want a reverb in prog 4 of the eeprom do I load the reverb into prom 4 of the project dialog box and then build the hex file?  Am I supposed to clear the other programs in the project dialog box out?  Or do I load each prog of the dialog box with the effect that I want, then create the hex file and flash them one at a time in the Pickit software?

I have been unplugging the pickit each time I flash a new program into a new slot.  I trying to make this clear but am not sure if it will be...  Right now I have all 8 slots filled but am getting the same effect on multiple selections of the rotary switch (Prog 0 and 1 are the same, Prog 2 and 3 are the same, Prog 4 and 5 are the same, and Prog 6 and 7 are the same)

Thank you for being patient with me and helping with my extremely novice skills!
When you create a hex file, load the 8 effects you would like to have, in the appropriate order, in SpinASM. if you leave some blank these programs will be empty.

jghfslk

Still haven't gotten it 100 percent yet.  Here are the steps I did on my latest attempt.

In SpinAsm I open the project dialog box and load each effect that I want in the corresponding spot.  My the effects I chose are:

Prog 0   MDD Particolay
Prog 1   rom_rev1
Prog 2   rom_fla_rev
Prog 3   rom_trem_rev
Prog 4   MDD Pitch Step Glider
Prog 5   Envelope Phaser
Prog 6   MDD Double Dliaser
Prog 7   key_rev

Then I powered the pedal, connected the Pickit to the PCB which is connected and flashed the chip.  I had the 1P8T rotary set to Prog 0 when flashing the chip.  I then disconnected the pickit from the PCB and set the rotary to Prog 1.  I then did the same steps with Prog 1.  I decided to try the pedal to see if those two settings were properly loaded. 

I still have all 8 slots filled but only 4 effects.  My options for effects are this:

Prog 0   MDD Particolay
Prog 1   MDD Particolay
Prog 2   rom_fla_rev
Prog 3   rom_fla_rev
Prog 4   MDD Pitch Step Glider
Prog 5   MDD Pitch Step Glider
Prog 6   MDD Double Aliaser
Prog 7   MDD Double Aliaser

I thought this was weird since not only do I have doubles of 4 effects, but I did not even load Program 2-7 yet.