Questions in programming the chips

Discussions related to MegaDrum Hardware

Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 4:10 am

Hi guys,
Almost there!

I'm having some issues with programming the chips. I had some errors that I discovered after first trying to program the Atmega. I finally got the chip to program successfully, but when I did, it had the "spien" option checked off and grayed out though the Screen shot n the documentation shows it as not grayed out:
Image

is that a problem?

OK, so then I moved on to programming the pic18f2550. I wasn't sure which frequency to use...I tried them all :lol: but I kept getting a failed reading. I finally realized I had the wire to pin 3 actually going to pin 2. DOH!!

Anyway, so I fixed that, and I disconnected and reconnected the usb cable (before burning the pic-mind you) of course the windows message came up saying there was an unrecognized usb device.

So then, I programmed the pic and halfway through the programming, the device was all the sudden recognised (great!) but then winpic said the programming failed!?!

So basically, I'm not sure if I have a working device here or not and whether I should go forward with trying to install the firmware...also, I'm very unsure whether I have chosen the right frequency. Per the parts list for Dmitri's boards, I have a 20mhz and a 12 Mhz crystal...

Sorry for all the questions! It's been a big day, but I'm getting close now!
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 4:21 am

I should say that what is happening right now is:
If I plug in the usb cable, the lcd backlight comes on. Nothing happens unless I push the left button (on the rotary). Then I get the message ""FW updater down ok, up clock. then it goes to "send sysex now"

The contrast is such that I can only read the lcd from an extreme angle.
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 6:56 am

Just discovered that the momentary switches I put in are normally closed-DOH! Let me change that and see what happens...
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby Firelord » Fri Aug 14, 2009 7:25 am

mbira wrote:is that a problem?
Probably not.
mbira wrote:but then winpic said the programming failed!?!
If you're using the WinPic recommended in the documentation (not WinPic800), then this is most likely normal behavior.
mbira wrote:I'm very unsure whether I have chosen the right frequency
Based on what you wrote, 12MHz for PIC and 20MHz for ATMega.
mbira wrote:Then I get the message ""FW updater down ok, up clock. then it goes to "send sysex now"
It should go into the 'Send sysex now' mode only when you press the DOWN key.

You can control your board functionality as follows: when the FW Updater menu comes on, press UP until you get your ATMega's crystal frequency (most likely 20 MHz in your case). Then you can turn MIDI OX on, check whether there is a MIDI USB Device on the MIDI I/O page and if it's there select it for both input and output. Then go see MIDI OX' monitor. If everything on the board is working properly, and you chose the right crystal frequency, upon pressing the LEFT key in the 'FW Updater Down Ok, up clock' menu (NOT in 'Send sysex now' mode) a MIDI message should appear in MIDI OX' monitor.
mbira wrote:Just discovered that the momentary switches I put in are normally closed
What momentary switches?
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 7:35 am

Well after a 16 hour day, I seem to have it working! Not sure what the problem was, but I wasn't getting the usb audio device to show up in midi-ox. I plugged into my other computer and got it to show up. I then did the firmware through midi-ox and it worked out. I can scroll through the messages, etc.

Tomorrow I'll get some triggers put together and wired up and see if I can't finally make some music!
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 7:37 am

All four of those switches are momentary-IE you push them and they make contact, you release them they stop making contact. My problem was I accidentally had two switches that we always connected UNLESS you pushed them.
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby Firelord » Fri Aug 14, 2009 7:41 am

mbira wrote:always connected UNLESS you pushed them.

All right, that's an ON-(OFF) type.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Questions in programming the chips

Postby mbira » Fri Aug 14, 2009 7:49 am

Yes-also known as a momentary NC. (Normally Closed). :mrgreen:
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Questions in programming the chips

Postby dmitri » Sat Aug 15, 2009 10:23 am

Are you using Atmega32-16PU? If yes, be warned that it is rated for 16MHz maximum.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: Questions in programming the chips

Postby mbira » Sat Aug 15, 2009 11:07 pm

I'm using the 324.
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Next

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 109 guests