Jump to content

I think I killed my PIC


m00dawg

Recommended Posts

So this is just a desperate hope that I might be able to at least figure out what's wrong :) I'm pretty sure I'm screwed but could use a second opinion.

I recently created a C64 Optimized PSU and, while, this part is working, in the process of moving all the stuff back into my case, I must have done something as the PIC no longer outputs anything on the LCD panel, nor does it appear to control the SID. That said, I DOES send out MIDI messages and appears to be able to accept uploads via Sys-Ex just fine. I tried uploading various test scripts (SID Testtone, LCD Test), and while they appeared to upload fine, I did not hear the comforting test tone from teh SID.  The question I have is if there is any way to figure out what is going on? I don't have an oscilioscope or anything - Just MIOS Studio and a Multimeter.

The good news is that I have a working PIC and it appears to control everything fine, but it is a PIC18F452 and, thus, cannot run the SID 2.0 firmware. Which sucks because I was going to showcase all this stuff at a local hardware group meeting on Monday and I wanted to wow everyone with the awesome drum sequencer stuff :) I am guessing there is NO way I can use the SID 2.0 firmware with the PIC18F452 correct? Even if I just have a CORE/SID/LCD/Bank Stick combo?

Link to comment
Share on other sites

it s very unlikely that you ve destroyed the PIC, but given these infos it s not so easy to troubleshoot.

i would firstly check for bad soldering joint where the cables are attached to boards if any, and similar weak points

Simone

Link to comment
Share on other sites

a 452 won't do I'm afraid....

definitely check for physical erros if you can see them. If you could try and re-upload MIOS and then a test app, and paste the logs from MIOS studio, that would be good. Don't forget smart mode/wait for upload request!

It may be worth also trying things with just the core and LCD...but remember, don't make multiple changes inbetween tests.

Link to comment
Share on other sites

Thanks for the suggestions!

I took the advise and tried to re-upload MIOS 1.9f. That seemed to work quite well, so I then tried to upload the LCD and SID tests. Neither worked in isolated cases (ie I just hooked up the LCD and CORE and then hooked up the SID and CORE). I also tried the SID Player, but that did not work either. In the case of the SID test-tone, all I really hear is a really high pitched and soft constant tone. Last I checked the test-tone was much lower in pitch and louder. I did notice, however, say when running the LCD test, I do not hear any noise from the SID. So it seems like it is trying to communicate.

I still think it may be the chip, though since I can simply pop in my 452 into the socket and everything springs to life. It's basically fully functional running MB-SID v1. Which, I mean, it'll work just fine for the local hardware group meeting, but I am bummed since I cannot show a live test of the bassline mode in action.

Link to comment
Share on other sites

I took the advise and tried to re-upload MIOS 1.9f. That seemed to work quite well,

Logs?

What made you think it went well?

Neither worked

What did they do?

I still think it may be the chip, though since I can simply pop in my 452 into the socket

I thought you were using a 452 now? Your first post sounded like you had a working sidv1 and when you changed the PSU it stopped working...was there more to it?

Link to comment
Share on other sites

Logs?

Would be happy to! Here is the output after uploading MIOS 1.9F:

00000000006704 ms | Sysex message: F0 00 00 7E 40 00 01 F7
00000000026498 ms | Sysex message: F0 00 00 7E 40 00 0E 01 00 F7
00000000028804 ms | Sysex message: F0 00 00 7E 40 00 01 F7
00000000030460 ms | Sysex message: F0 00 00 7E 40 00 0F 0E F7
00000000030620 ms | Sysex message: F0 00 00 7E 40 00 0F 6E F7
00000000030774 ms | Sysex message: F0 00 00 7E 40 00 0F 6D F7
00000000030927 ms | Sysex message: F0 00 00 7E 40 00 0F 19 F7
00000000031084 ms | Sysex message: F0 00 00 7E 40 00 0F 4E F7
00000000031241 ms | Sysex message: F0 00 00 7E 40 00 0F 76 F7
00000000031394 ms | Sysex message: F0 00 00 7E 40 00 0F 07 F7
00000000031547 ms | Sysex message: F0 00 00 7E 40 00 0F 79 F7
00000000031700 ms | Sysex message: F0 00 00 7E 40 00 0F 0E F7
00000000031857 ms | Sysex message: F0 00 00 7E 40 00 0F 21 F7
00000000032010 ms | Sysex message: F0 00 00 7E 40 00 0F 77 F7
00000000032164 ms | Sysex message: F0 00 00 7E 40 00 0F 2C F7
00000000032321 ms | Sysex message: F0 00 00 7E 40 00 0F 51 F7
00000000032474 ms | Sysex message: F0 00 00 7E 40 00 0F 4F F7
00000000032628 ms | Sysex message: F0 00 00 7E 40 00 0F 00 F7
00000000032785 ms | Sysex message: F0 00 00 7E 40 00 0F 5A F7
00000000032939 ms | Sysex message: F0 00 00 7E 40 00 0F 2C F7
00000000033092 ms | Sysex message: F0 00 00 7E 40 00 0F 04 F7
00000000033244 ms | Sysex message: F0 00 00 7E 40 00 0F 32 F7
00000000033398 ms | Sysex message: F0 00 00 7E 40 00 0F 68 F7
00000000033553 ms | Sysex message: F0 00 00 7E 40 00 0F 34 F7
00000000033705 ms | Sysex message: F0 00 00 7E 40 00 0F 6B F7
00000000033858 ms | Sysex message: F0 00 00 7E 40 00 0F 74 F7
00000000034014 ms | Sysex message: F0 00 00 7E 40 00 0F 57 F7
00000000034166 ms | Sysex message: F0 00 00 7E 40 00 0F 5A F7
00000000034319 ms | Sysex message: F0 00 00 7E 40 00 0F 01 F7
00000000034471 ms | Sysex message: F0 00 00 7E 40 00 0F 10 F7
00000000034624 ms | Sysex message: F0 00 00 7E 40 00 0F 3A F7
00000000034777 ms | Sysex message: F0 00 00 7E 40 00 0F 79 F7
00000000034930 ms | Sysex message: F0 00 00 7E 40 00 0F 67 F7
00000000035086 ms | Sysex message: F0 00 00 7E 40 00 0F 1A F7
00000000035239 ms | Sysex message: F0 00 00 7E 40 00 0F 22 F7
00000000035392 ms | Sysex message: F0 00 00 7E 40 00 0F 2D F7
00000000035544 ms | Sysex message: F0 00 00 7E 40 00 0F 63 F7
00000000035698 ms | Sysex message: F0 00 00 7E 40 00 0F 16 F7
00000000035851 ms | Sysex message: F0 00 00 7E 40 00 0F 31 F7
00000000036003 ms | Sysex message: F0 00 00 7E 40 00 0F 2C F7
00000000036157 ms | Sysex message: F0 00 00 7E 40 00 0F 2A F7
00000000036309 ms | Sysex message: F0 00 00 7E 40 00 0F 23 F7
00000000036462 ms | Sysex message: F0 00 00 7E 40 00 0F 65 F7
00000000036614 ms | Sysex message: F0 00 00 7E 40 00 0F 2D F7
00000000036768 ms | Sysex message: F0 00 00 7E 40 00 0F 65 F7
00000000036922 ms | Sysex message: F0 00 00 7E 40 00 0F 72 F7
00000000037075 ms | Sysex message: F0 00 00 7E 40 00 0F 7E F7
00000000037229 ms | Sysex message: F0 00 00 7E 40 00 0F 22 F7
00000000037381 ms | Sysex message: F0 00 00 7E 40 00 0F 60 F7
00000000037534 ms | Sysex message: F0 00 00 7E 40 00 0F 40 F7
00000000037687 ms | Sysex message: F0 00 00 7E 40 00 0F 39 F7
00000000037929 ms | Sysex message: F0 00 00 7E 40 00 0F 0E F7
00000000038081 ms | Sysex message: F0 00 00 7E 40 00 0F 22 F7
00000000038234 ms | Sysex message: F0 00 00 7E 40 00 0F 08 F7
00000000038393 ms | Sysex message: F0 00 00 7E 40 00 0F 0B F7
And here is the output from the HEX Upload pane:
Starting upload of mios_v1_9f_pic18f4685.hex
Hex file contains code in MIOS range, forcing reboot!
Received error code 01: Less bytes than expected have been received
This was an expected error - please ignore!
Received Upload Request
Sending block 00000400-000004FF
Received Checksum: 0E - OK
Sending block 00000500-000005FF
Received Checksum: 6E - OK
Sending block 00000600-000006FF
Received Checksum: 6D - OK
Sending block 00000700-000007FF
Received Checksum: 19 - OK
Sending block 00000800-000008FF
Received Checksum: 4E - OK
Sending block 00000900-000009FF
Received Checksum: 76 - OK
Sending block 00000A00-00000AFF
Received Checksum: 07 - OK
Sending block 00000B00-00000BFF
Received Checksum: 79 - OK
Sending block 00000C00-00000CFF
Received Checksum: 0E - OK
Sending block 00000D00-00000DFF
Received Checksum: 21 - OK
Sending block 00000E00-00000EFF
Received Checksum: 77 - OK
Sending block 00000F00-00000FFF
Received Checksum: 2C - OK
Sending block 00001000-000010FF
Received Checksum: 51 - OK
Sending block 00001100-000011FF
Received Checksum: 4F - OK
Sending block 00001200-000012FF
Received Checksum: 00 - OK
Sending block 00001300-000013FF
Received Checksum: 5A - OK
Sending block 00001400-000014FF
Received Checksum: 2C - OK
Sending block 00001500-000015FF
Received Checksum: 04 - OK
Sending block 00001600-000016FF
Received Checksum: 32 - OK
Sending block 00001700-000017FF
Received Checksum: 68 - OK
Sending block 00001800-000018FF
Received Checksum: 34 - OK
Sending block 00001900-000019FF
Received Checksum: 6B - OK
Sending block 00001A00-00001AFF
Received Checksum: 74 - OK
Sending block 00001B00-00001BFF
Received Checksum: 57 - OK
Sending block 00001C00-00001CFF
Received Checksum: 5A - OK
Sending block 00001D00-00001DFF
Received Checksum: 01 - OK
Sending block 00001E00-00001EFF
Received Checksum: 10 - OK
Sending block 00001F00-00001FFF
Received Checksum: 3A - OK
Sending block 00002000-000020FF
Received Checksum: 79 - OK
Sending block 00002100-000021FF
Received Checksum: 67 - OK
Sending block 00002200-000022FF
Received Checksum: 1A - OK
Sending block 00002300-000023FF
Received Checksum: 22 - OK
Sending block 00002400-000024FF
Received Checksum: 2D - OK
Sending block 00002500-000025FF
Received Checksum: 63 - OK
Sending block 00002600-000026FF
Received Checksum: 16 - OK
Sending block 00002700-000027FF
Received Checksum: 31 - OK
Sending block 00002800-000028FF
Received Checksum: 2C - OK
Sending block 00002900-000029FF
Received Checksum: 2A - OK
Sending block 00002A00-00002AFF
Received Checksum: 23 - OK
Sending block 00002B00-00002BFF
Received Checksum: 65 - OK
Sending block 00002C00-00002CFF
Received Checksum: 2D - OK
Sending block 00002D00-00002DFF
Received Checksum: 65 - OK
Sending block 00002E00-00002EFF
Received Checksum: 72 - OK
Sending block 00002F00-00002FFF
Received Checksum: 7E - OK
Sending block 00003000-000030FF
Received Checksum: 22 - OK
Sending block 00003100-000031FF
Received Checksum: 60 - OK
Sending block 00003200-000032FF
Received Checksum: 40 - OK
Sending block 00003300-000033FF
Received Checksum: 39 - OK
Sending block 00007C00-00007CFF
Received Checksum: 0E - OK
Sending block 00007D00-00007DFF
Received Checksum: 22 - OK
Sending block 00007E00-00007EFF
Received Checksum: 08 - OK
Sending block 00007F00-00007FFF
Received Checksum: 0B - OK
Upload process complete

What made you think it went well?

The acknowledgment responses worked in all cases and usually the PIC would reboot itself to apply the new firmware, but otherwise that was really all the feedback I received.

I thought you were using a 452 now? Your first post sounded like you had a working sidv1 and when you changed the PSU it stopped working...was there more to it?

Doh! My apologies for not explaining things better. Here is the sequence of events:

1. Synth works. LCD, SID, Banksticks, etc. Was previously powered by two transformers (1 for core, 1 for SID) CORE stuffed with a PIC 18F4685

2. Built C64 PSU, removed rectifier on CORE, now supplying power via J2

    a. The one exception to the optimized PSU is that I have not yet setup a +5V run for the SID itself - it is using the +5V from CORE still

3. Removed chips, tested connections, all OK. Voltages were +5 and +14V as they should be.

4. Stuffed chips.

5. Made first attempt to power-on. Here is one mistake that may have cost me. I accidentally had the +14V hooked up to CORE, but there was no ground (as per the C64 Optimized PSU diagram). I noticed this quickly, powered off and hooked up the +5V/GND.

6. LCD Shows boot-up screen. All appears well.

5. Celebration :)

6. Set components inside case (did not mount them via screws since I was going to test playback, etc.

7. Hooked up remaining components (SID and Banksticks)

8. Powered on, LCD panel showing blocks on upper row :(

I thought it might have been my +14V mistake, but CORE powered up just fine after that. The only thing I can think of is static discharge or something like that?

9. Tried various I/O tests. I was able to upload the tests to CORE without issue. But running the tests did not produce any discernible results. LCD test still shows black bars across top. SID test-tone, while it produces a very soft and very high pitched noise, does not sound like a standard test tone (it's much too high and too soft).

10. Stuffed CORE with PIC 18F452 with an already working build of MB-SID 1.7

11. LCD shows boot-up screen. Begins to flash BankSticks (audio output beeps can be heard through SID). Fails on patch 67.

12. Removed Chip on bank 0 and swapped with chip on Bank 7. Format succeeds.

13. Loaded up MB-SID v1 patches via MBSIDPatch program, fired up Cubase, played some notes on my keyboard. Sounds normal. Switching patches work (patches sound as they should).

14. Remove PIC 18F452 and tried PIC 18F4685. Same result as before (black bars on LCD, various tests fail).

Anyways those were the steps as I remember them. I hope I wasn't overly explicit but I figure better more information than less :) All signs basically point to the PIC 18F4685 being the culprit. I also found it strange that one of my BankSticks failed on the bad patch with the 452, which leads me to believe static was to blame, or something that otherwise went awry from be testing it on my table to putting it back in my case ("case" is an unfair word - it's a glorified shoebox :).

Now I was able to access the SVN repository. I'm having trouble checking it out via the command-line utilities but the web-interface works fine. I'm going to try and install the build-tools to see if I can build the Sys-Ex test script to see if it tells me anything. Beyond that, I can't think of anything else, other than ordering a new PIC, which I ordered yesterday from SmashTV, but will not be hear for Monday's hardware demonstration. Oh well. At least I didn't break the whole thing :) But I'm certainly open to any further suggestions!

Link to comment
Share on other sites

Hmmm Two things are crossing my mind.... 4-bit mode, but I don't think it's that (was working before) or maybe the BSL could be reburned... If the 14V didn't kill it (and there must have been GND connected somewhere if it powered on) then it's quite possible that the bootloader has been overwritten with junk. Do you have a burner or JDM?

By the way, that is EXACTLY how to do a troubleshooting post! I love those ones! It wasn't too much info, it's just right... leaves me with no questions at all = and a pretty definitive idea of what would have gone wrong. Well, except for what tools are in your lab :)

Link to comment
Share on other sites

Hmmm Two things are crossing my mind.... 4-bit mode, but I don't think it's that (was working before) or maybe the BSL could be reburned... If the 14V didn't kill it (and there must have been GND connected somewhere if it powered on) then it's quite possible that the bootloader has been overwritten with junk. Do you have a burner or JDM?

Yeah, I wired the LCD in 8-bit mode initially so all the pins are connected. I know the docs said that might cause freezing / reboots but it seemed to work fine prior to this change. I can also remove the LCD and am still not able to get any response from the PIC other than by way of the initial boot-up Sys-Ex and the Sys-Ex response commands when I attempt to flash it.

I don't think I...completely...killed it since it did power-on properly after promptly removing the +14V. Although, I mean you never know. I know hardware that works initially fails later. At least that's the way it is with regular 'ole PCs.

As for the bootloader, are you saying, in other words, that, even though the PIC is responding via MIDI and appears to upload the new code, it probably isn't (or isn't doing it right anyway :) ? Is that something that can happen with extreme voltages or static?

I suppose next time around I buy something off SmashTV, I should go ahead and get the JDM :) I might be able to get access to a burner perhaps tomorrow (since there may be some PIC guys at the hardware meet-up). *crossing fingers*

By the way, that is EXACTLY how to do a troubleshooting post! I love those ones! It wasn't too much info, it's just right... leaves me with no questions at all = and a pretty definitive idea of what would have gone wrong. Well, except for what tools are in your lab :)

Awesome! Sorry I didn't post that the first time around - I was a bit panicky and not thinking clearly :) As for tools in my lab, I don't have anything special. No O-scopes or anything like that. Just a soldering station, multimeter, wire strippers, etc. I'm slowing getting the tools as I get deeper into the MidiBox project, though.

Thanks for all your help Stryd! You have been extremely helpful!

Link to comment
Share on other sites

Signs of life!

So I figured out a way to access ucapps.de (I VPN'd into work and magically it seems to work there). So I grabbed all the apps I could. So, I uploaded the revision_id test program and got this:

00000000141100 ms | Sysex message: F0 00 00 7E 40 00 01 F7
00000000288383 ms | Sysex message: F0 00 00 7E 40 00 0F 38 F7
00000000288488 ms | Sysex message: F0 00 00 7E 40 00 0F 60 F7
00000000288597 ms | Sysex message: F0 00 00 7E 40 00 0F 40 F7
00000000288738 ms | Sysex message: F0 00 00 7E 40 00 0F 60 F7
00000000291044 ms | Sysex message: F0 00 00 7E 40 00 01 F7
00000000294648 ms | [B0 27 61] Channel 1: CC LSB 7 (Channel Volume) value: 97

So it IS showing me something at least. Still no LCD and no SID though, but I am going to try some other test apps to see what happens.

Link to comment
Share on other sites

Yeah, I wired the LCD in 8-bit mode initially so all the pins are connected. I know the docs said that might cause freezing / reboots but it seemed to work fine prior to this change. I can also remove the LCD and am still not able to get any response from the PIC other than by way of the initial boot-up Sys-Ex and the Sys-Ex response commands when I attempt to flash it.

Good testing. I would certainly aim to fix up the wiring though, you're asking for trouble leaving it like that.

As for the bootloader, are you saying, in other words, that, even though the PIC is responding via MIDI and appears to upload the new code, it probably isn't (or isn't doing it right anyway :) ?

Mostly that it isn't doing it right.

Is that something that can happen with extreme voltages or static?

It is a possibility. At 14V and somehow not exploding the PIC into a million smokey pieces, in just the right conditions, it's even possible that you've re-burned the pic with garbage :)

I suppose next time around I buy something off SmashTV, I should go ahead and get the JDM :) I might be able to get access to a burner perhaps tomorrow (since there may be some PIC guys at the hardware meet-up). *crossing fingers*

Heh, yes, the tool in your lab I was referring to was a JDM/Burner :)

Provided your PC acts right, the JDM is kickass. Takes all of about 5 minutes to go from a kit to a freshly burned PIC. Definitely take your PIC chip(s) with you tomorrow, and a copy of the bootloader hex file on disc. Ask them to burn it in HVP mode, any HVP capable burner will do, but LVP will not work.

You might do well to take a look at foona's mb64 thread, where he explained how he made an adapter to burn using an ICSP burner, which might be quite common tomorrow. A bit of breadboard and a socket and cap and a bit of wire, and you're good to go.

Good luck!!

Edit: oh, and take some cash with you and buy a new pic if you get the chance! Even if you don't get to burn it, at least you'll have a PIc around which is not as likely to be fried.

Link to comment
Share on other sites

Thanks for all the info! I did solicit some PIC guys on our mailing list, so we'll see what happens. If not it's no huge deal. MB-SID v1 is better than no SID at all and I think it'll get the point across. The only big thing missing is the cool bassline patches, but I was going to let people listen to some of the more awesome stuff with fully realized MidiBox-SIDs anyway (like TKs bassline demos...so sweet!).

Anyways, I had one more question:

Good testing. I would certainly aim to fix up the wiring though, you're asking for trouble leaving it like that.

Fair enough, but I was curious as to if the 4-bit wiring would work on both versions of the MB-SID project? I know for MB-SID v1 8-bit was default but I assume I might be able to change that by simply editing one of the .ASM files? The reason I left it in 8-bit was just in case I had to go back to the old PIC which, oddly enough, is exactly what I had to do :)

Either way, you're right. I should buy up a few extra PICs next time I get the chance and you can bet I'll be getting some sort of burner of some sort. I'll keep your suggestions in mind! Sadly, I don't think I will have time to burn the new image at today's hardware meet-up but you never know!

Thanks again!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...