borfo Posted February 23, 2019 Report Share Posted February 23, 2019 (edited) I'm trying to program four PIC18f4685's for my MB-6582 from scratch, and I'm having problems... I seem to have at least sort of successfully flashed the bootloader using a Pickit 2 and MPLAB X, but I can't flash MIOS to the SID over MIDI in MIOS Studio. I can query the core, and it says the bootloader is running, but whenever I try to flash any .HEX, MIOS Studio times out and says "no response from the core after 16 attempts. The Core is sending out these messages (which I guess is the upload request) about 120 times a second all the time the SID is powered on... From other forum posts, it seems this is way too fast - should these messages be sent that often, or is there something wrong with the clock speed on the PIC or something? Anyone have any thoughts? Voltages seem fine on the PIC... [25442.111] f0 00 00 7e 40 00 01 f7 [25442.120] f0 00 00 7e 40 00 01 f7 [25442.128] f0 00 00 7e 40 00 01 f7 [25442.136] f0 00 00 7e 40 00 01 f7 [25442.145] f0 00 00 7e 40 00 01 f7 [25442.153] f0 00 00 7e 40 00 01 f7 I've never used MPLAB or flashed a PIC before, so it is possible I didn't flash the PICs correctly... (although MPLAB said the flashes were successful) Is it possible that flashing the bootloader in an incorrect way in MPLAB could somehow make the PIC's clock go way too fast? Or, is it possible that the circuit I used to connect the PIC physically to the PICKIT 2 could have been incorrect in a way that could make the clock speed go way too fast? (there is a pcb with the PICKIT that fits smaller PICS and connects to the PICKIT - I just connected the appropriate pins on that pcb to the pins on my PIC18F4685s via breadboard leads.) ...even thought MIOS Studio reports that the bootloader is running when it queries the core? Is there a complete HEX of the MB-6582 PICs that I could try flashing in MPLAB so I don't have to install MIOS via MIDI? Any help or pointers would be much appreciated. Edited March 13, 2019 by borfo Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted February 24, 2019 Report Share Posted February 24, 2019 (edited) Try this prog for flashing with pickit2 http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit%202%20v2.61.00%20Setup%20A.zip. Or look here https://www.auelectronics.com/Q3.htm More Info and Schematic: ucapps.de/index.html?page=mios_bootstrap_experts.html Edited February 24, 2019 by Noise-Generator Quote Link to comment Share on other sites More sharing options...
borfo Posted February 24, 2019 Author Report Share Posted February 24, 2019 (edited) Thanks - I tried the linux 1.2 version of pk2cmd, and it really seems to be working ok to flash the bootloader to the PIC... I'm inclined to think it's probably some kind of problem with my MB-6582 core board. Can anyone confirm that those "f0 00 00 7e 40 00 01 f7" upload request messages coming 120 times per second from the bootloader-flashed PIC is way faster than they should be sent? ...and if so, does anyone have any idea what might be wrong with my core board to make that happen? Any ideas what I should be looking at? All the voltages on the PIC seem right - just below 5v. Edited February 24, 2019 by borfo Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted February 24, 2019 Report Share Posted February 24, 2019 I can´t confirm this, because I don´t have this board but the Cores should operate the same way. Normally this happens 1 time in a few seconds. Maybe it´s a wrong component? Have you proove the values? I dunno, still learning, every day. Quote Link to comment Share on other sites More sharing options...
borfo Posted February 28, 2019 Author Report Share Posted February 28, 2019 I'm reading 4.62v on the 5v rail, 8.83v on the 9v rail and 11.76v on the 12v rail - can anyone confirm whether those numbers are ok? I just tried flashing the bootloader under a WinXP Virtual Machine, with the same result... "upload request" messages about 120 times per second, and I can't upload via midi. Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 2, 2019 Report Share Posted March 2, 2019 (edited) The voltages seems a bit low, especially the 5v rail, but if your pic work, than it's ok. The more I think about your problem, I don't think it's the pic. But as I said, I'm not a pro and it's a pity that no one - maybe also don't have an answer - can say some more. I know how frustrating it is to stuck and start ordering things which might help, but it is like it is. What you could do by your own is to build a minimal core setup with a breadboard, so you can exclude connection or wiring mistakes and you also learn what does this and that and so on. It's not as hard as it seems to build the core with midi by your own. Edited March 2, 2019 by Noise-Generator Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 2, 2019 Report Share Posted March 2, 2019 I´ve got a theory. I think the PIC permanently restarts, thats why you get the upload request. Maybe it´s because of the 4,62v, the PIC can start, but breaks down because it needs constant 5v, so starts again... I must correct what I said about the upload request first, may there is a upload request every seconds BUT you don´t see this. The message:[1355.224] f0 00 00 7e 40 00 0f 00 00 f7 just appears by booting, rebooting the PIC. Quote Link to comment Share on other sites More sharing options...
latigid on Posted March 2, 2019 Report Share Posted March 2, 2019 Could be your MIDI interface (check the blacklist on the wiki? Do you have the MIDI circuit installed, including the optocoupler chips? Photos? Quote Link to comment Share on other sites More sharing options...
jaytee Posted March 2, 2019 Report Share Posted March 2, 2019 4.6V might be a little low. How are you getting that 5V rail, pretty sure a 7805 should do better than that. If you can, can’t hurt to try different cables, interface, computer, etc. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 5, 2019 Author Report Share Posted March 5, 2019 Thanks everyone - I was thinking it might be restarting over and over again as well. The MIDI circuit seems fine (I've tested it in a variety of ways, and I do get communication back and forth from the core including confirmation in MIOS Studio that the bootloader is running). Power is coming from a C64 PSU, so the 5v rail is regulated within the PSU. Unfortunate if it's not working properly, since this is the second one I've bought (AC on the first one was broken), and they're not cheap. I suppose building a minimal core on a breadboard is probably the sensible next step, and then if it is the PSU I guess I'll power it some other way, since the C64 PSUs seem a bit unreliable. Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 5, 2019 Report Share Posted March 5, 2019 That's not normal, a C64 PSU has 5.20V. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 5, 2019 Author Report Share Posted March 5, 2019 (edited) Argh. Looks like that's it right there. I just read directly from the PSU pins and I'm only getting 4v (not sure why I didn't read straight from the PSU before, I guess because the SID board was already wired up and I read 4.6v on the 5v rail there). Frustrating - this is the second one I've bought. I guess they're all pretty old and deteriorating at this point... I guess I'll work on another power solution. Thanks a lot for the help, Noise Generator. Edited March 5, 2019 by borfo Quote Link to comment Share on other sites More sharing options...
borfo Posted March 5, 2019 Author Report Share Posted March 5, 2019 (edited) Could I use separate power supplies (a 9vac PSU and a 5vdc PSU) plugged into the same mains power source? Would that work, or would I have to worry about the possibility that they'd have different ground references (and potentially unexpected voltage differentials) despite being plugged into the same mains power source/ground? ...I've got one C64 psu with working 9vAC and broken 5vDC, and another with working 5vDC and broken 9vAC... Edited March 5, 2019 by borfo Quote Link to comment Share on other sites More sharing options...
latigid on Posted March 5, 2019 Report Share Posted March 5, 2019 You should never connect two power supplies together. If you really need to use two different rails, then the DC sides must be common (connected together) at 0V. I recommend buying the RECOM switching +5V Vreg and using a decent single-rail 9V PSU. @jaytee was the last to do it I think. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 5, 2019 Author Report Share Posted March 5, 2019 Yeah, probably should just bite the bullet and do PSU option E. I've got both 12v and 9v SIDs in this thing, so that'll be two switching regulators, unfortunately. At this rate I'm going to wind up spending more on power supplies than on the whole device... haha. Quote Link to comment Share on other sites More sharing options...
jaytee Posted March 5, 2019 Report Share Posted March 5, 2019 You may be able to get away with a linear regulator for the 9V rail, especially if you use a heatsink. (It may also depend on how many SIDs are drawing current on that 9V rail.) Just be aware that the linear reg will generate more heat, which may or may not be an issue. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 5, 2019 Author Report Share Posted March 5, 2019 Just got in touch with the person who sold me this PSU - they're going to send me another for shipping cost, so hopefully third time lucky! haha. If that doesn't work, I'll go the PSU option E route. Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 6, 2019 Report Share Posted March 6, 2019 Well, would be better he also paid the shipping if he sells broken psus, but maybe you can get some bucks for the broken one. May you also have seen that there is a polish company selling new c64 psus on ebay (maybe not in usa), but those are really expensive. It's unusal that they deliever less volts than 5, normally, if the 5v rail is broken (regulator), it delievers more than that and kills everything inside the c64 what needs just 5v. (rip sid) Thats why c64 users today building "crowbar" protection stuff inside their psus and the community is still fighting each others solutions. As far as I read the last times... For a c64, a combination of a 9vac and 5v psu is an alternative and usual but I don't want to contradict latigid on, in case of a midibox you generate 20v ac by a magic act of mixing dc and ac, therefore this solution is profen exclusively at this psus. I do have some c64 psus but try not to use them. They may have the best noise ratio, Thorsten wrote, but I want to use a Laptop psu with a 12v and usb 5v rail, it's smaller and you get them for 17€. I can't recommend them at this point, I still did not tested em in mixed mode but 12 for the sid and 5v for the core, works (yeah, why shouldn't...). The question is still what happens by using the 12v for the old sid and transform this rail to 9 for the new sid. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 6, 2019 Author Report Share Posted March 6, 2019 Yeah, but better to pay shipping than to pay full price I guess. Hm... The laptop PSU option is interesting... I have a Surface Pro power supply here that puts out 12v and has a USB charging port. Do you just wire your laptop power supply directly into the 5v and 12v rails? Or do you run it through linear voltage regulators? Are laptop power supplies internally regulated? What PSU are you using? Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 7, 2019 Report Share Posted March 7, 2019 This one https://www.ebay.com/itm/120W-Universal-Power-Adapter-for-Notebook-Laptop-In-Car-DC-Charger-EU-Plug-bvg/303062986910?hash=item468ff6309e:g:w-UAAOSw-1ZcZmcc Pretty much overpowered, but just 1A at the 5v. I also have an old psu which offers 12/5 (0,75/1A), which does more fit the needed power (could be a lil bit underpowered), it's the psu for an Iomega Jaz drive. At ebay someone is selling them in germany but with shipping 30€ As I wrote, I can't recommend those psus at this point because I did not tested it in all ways for a mixed sid setup, I just powered the core and one sid module. Yes, I use the 5v directly to feed the core and the 12v for the sid. So the only thing what is to do, is to regulate the 12v to 9. Should be also no problem, but can't say this for sure. I read a thread a few days before here, where smashTV, I guess, has written some words about that there are newer voltage regulators out there in case of having more psu options, today and also describes which capacitors can be removed/changed. Can't find this thread again but just looked inside the sid section. Quote Link to comment Share on other sites More sharing options...
borfo Posted March 13, 2019 Author Report Share Posted March 13, 2019 Solved - it was the power supply, and presumably a repeated rebooting of the PICs due to undervoltage. Got a new C64 PSU and everything worked fine - flashed MIOS and then the SID application... Thanks for the help everyone. 1 Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted March 17, 2019 Report Share Posted March 17, 2019 Nice. I tested the PSUs now in case of noise ratio. I can NOT recommend this cheap China PSU it makes a really loud high noise output but the JAZ PSU doesn't do this, it's pretty damn good, I couldn't recognize that the MbSID is powered with earplugs, just after sending some midi note. Next I will test the power consumption with 1Core LCD and CS stuff, a slave Core and 4 SIDs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.