Programming the ICs

Discussions related to MegaDrum Hardware

Programming the ICs

Postby gastric » Wed Sep 17, 2008 8:40 pm

I'm having difficulty finding concise information on how to program the ICs. Synthex mentioned they can all be done on board with his boards, but I thought at least one IC had to first be programmed off-board with a bootloader. Can someone either link me to an existing thread that has a concise list of directions for this task or post them here?
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby Synthex » Wed Sep 17, 2008 11:52 pm

You can program the two ICs on board with two cables.

ISP (for Atmega) and ICSP (for PIC18F2550) programming cables :
http://www.megadrum.info/img/programming_cables_kicad.png

An example to program the firmware :
http://www.megadrum.info/faqs.php#Firmware

Once programmed with a bootloader using a cable, the Atmega firmware can be upgraded over USB/MIDI.
The PIC 18F2550 firmware will never change.
Synthex
 
Posts: 1471
Joined: Fri Oct 12, 2007 6:06 am
Location: France

Re: Programming the ICs

Postby gastric » Fri Oct 31, 2008 3:03 pm

Do I specifically need the LCD or the jacks connected to program the ICs? I'm missing the headers for those two connections at the moment but would like to proceed with programming the IC while awaiting shipment.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby gastric » Fri Oct 31, 2008 6:47 pm

I'm working on answering my own questions via more forum searches/reading.

To program the PIC for USB.

1. Connect USB cable to USB port on MegaDrum (which requires me to connect USB from Jacks board to main board)
2. On same computer connect DB9/ISCP cable on MegaDrum
3. Use WinPic.
4. Options tab->Programmer options check the first 6 boxes
5. choose "JDM (2) for serial port" in the "Interface" tab
6. select PIC18F2550 in the "Device Config" tab.
7. open the hex file with the MIDI firmware and then select "Device->Program (CODE+DATA+CONFIG)" in the menu.

If programming succeeds you'll see "Programming finished. no errors" at the bottom in the status bar.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby bobnickelson » Sat Nov 01, 2008 5:05 am

I think when programming the ICs it would be better to leave the LCD unplugged. When i first attempted programing the PIC18f2550 winpic didnt recgonize the pic, and did not auto detect it, and i had to use an external usb power supply for it to. It reported that it programmed without any problem, However I cannot get my PIC18f2550 to operate appropriately, and am interested in how yours goes (since we used the same parts order and pcb). I managed to program the Atmega flawlessly,(tested with a sensor and the led lights up) and Winpic says the PIC18 programs successfully, but is still not recognized under usb by my pc.

Also the ICSP cable can be made out of an extra 40 pin ide cable and a db9 female adapter from radio shack, (along with the extra resistors from mouser, four 10k i think for the PIC). That what I used, and the winpic recognized it, and programed it.
bobnickelson
 
Posts: 9
Joined: Sat Oct 04, 2008 8:40 pm

Re: Programming the ICs

Postby gastric » Sat Nov 01, 2008 12:42 pm

I'll try to complete my board and program the ICs later this week and will keep you posted.

I believe these are the Mouser.com parts you'd need to construct both of the programming cables, with the exception of the actual wire. I haven't ordered the HD-14 connectors yet, but I believe they are the appropriate part and can crimp onto the cable, hopefully without any special tools.

Listed in the format: Description Part Number Quantity

ISP CABLE
DB25 Male to construct ISP cable 601-40-9725M 1
220 resistor 71-CCF07220RJKE36 4
5 contact connector for HE-14 headers 571-3-640440-5 1

ISCP CABLE Note the board has a 6 pin header but 2 of the pins are power via the USB/external power so I opted for a 4 pin connector
DB9 Female to construct ICSP cable 601-40-9709S 1
4 contact connector for HE-14 headers 571-3-640440-4 1
10k resistor 71-CCF0710K0JKE36 3
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby japi » Sun Nov 02, 2008 7:30 pm

The firmware for the PIC18F2550 is the one that is in the downloads section ? File name MegaDrum USB MIDI Firmware 18F2550 12MHz V2.hex ?
japi
 
Posts: 180
Joined: Tue Oct 07, 2008 2:03 pm
Location: Buenos Aires, Argentina

Re: Programming the ICs

Postby dmitri » Sun Nov 02, 2008 8:09 pm

Yes
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Programming the ICs

Postby japi » Sun Nov 02, 2008 11:30 pm

dmitri wrote:Yes


Thanks :)
japi
 
Posts: 180
Joined: Tue Oct 07, 2008 2:03 pm
Location: Buenos Aires, Argentina

Re: Programming the ICs

Postby gastric » Fri Nov 07, 2008 3:06 am

I have the board completed. I have not installed any of the ICs at all - none are in their sockets. I'm ready to program.

Can someone detail the specific order of things to do. Do I install just the PIC and program it? Then install the remainder of the ICs and program the Atmega? Install all ICs, program PIC, then program Atmega? Install all ICs, program Atmega, then PIC last?

If there is a concise step-by-step instruction somewhere on exactly how to program both the PIC and Atmega that info would be great as well. The short little list I posted about about the PIC was the only info I could easily locate in the forums. And I'm not confident it's totally complete and accurate.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Next

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Google [Bot] and 115 guests