ReinerS Posted November 26, 2004 Report Share Posted November 26, 2004 Hi,I have just got a new PIC (remember, I put one in the wrong way and thought it was killed) and programmed it with IC-Prog with the Midimerger1.04.hex file. ICprog says device programmed ok with verify after each step and after programming on.I still dont get any sign of life out of the merger! I built it on a prototyping board (didn't seem efficient to make a board for that simple thing) and double and triple checked everything.Questions:a) does the midi-merger send out anything after bootup, or is it completely quiet until it receives input?b) what checks (measurements) can be done with a multimeter other than checking the supply voltage?c) I connected the "plus" side of the midi-outs of the other devices to the 220Ohm resistor connected with pin2 of the optocoupler and the "signal"-side with pin3 of the coupler, is that correct?What else can I check?Is there a simple programI could flash into the pic that just sends out messages to check wehter the PIC is alive?GreetingsReiner Quote Link to comment Share on other sites More sharing options...
ReinerS Posted November 26, 2004 Author Report Share Posted November 26, 2004 Some more info on my problem:I have tried two more things:1) put the PIC18F... from my Midio128 (with the midio128 program loaded) into the midi-merger to see what happens, and it produces some output, so the quarz is working and the midi-out is wired correctly.2) with the PIC18F... in the Midio128 board, put LEDs across the midi-ins of the merger and yes, they are flickering both when the keyboard midi-encoder is active and when the midio128 sends messages, so the midi-ins are also correctly wired.So what else remains:a) Can programming the pic (16F...) fail in such a way that icprog reports verified code but the PIC is not correctly programmed?b) Is there a bug in the Midimerger hex file (latest version from www.ucapps.de)?3) In addition to the midimerger-hex file, is there anything else I need for programming the merger?Hope that someone can help me!GreetingsReiner Quote Link to comment Share on other sites More sharing options...
js Posted November 26, 2004 Report Share Posted November 26, 2004 do you know that you need to use a 20MHz with the PIC16F and a 10 MHz with the PIC 18F, if not im pretty sure that´s the problem...good luck!!js Quote Link to comment Share on other sites More sharing options...
ReinerS Posted November 26, 2004 Author Report Share Posted November 26, 2004 thanks for your input, but its not the problem. I use the 20MHz quarz for the PIC16 in the midimerger (and of course 10Mhz for the midio128 with the PIC18), but funny enough the PIC18 also runs with the 20MHz quarz (I did that just for checking the correct wiring of midi-out).GreetingsReiner Quote Link to comment Share on other sites More sharing options...
moebius Posted November 26, 2004 Report Share Posted November 26, 2004 Hi, ya ----msg1a. I think midimerger is passive and dead silent 'till it has data processed to output.b. Probably nothing usefulc. Correct (at least so it seems t me)In midi troubleshooting page: http://www.ucapps.de/howto_debug_midi_pic16f.html there are some test applications.msg22. So, this is midi test - post optocoupler?! Flickering suggests that input circuit is functional.. 3. NopeBye, Moebiusp.s. Hmm.. Just wondering if you have overclocked 18f452 to 80MHz ;) Quote Link to comment Share on other sites More sharing options...
ReinerS Posted November 27, 2004 Author Report Share Posted November 27, 2004 Hi Moebius,thanks for the link with the test programs! I could verify correct working of the output quickly, but the Testrxtx failed. After a lot of measunreing and trying I finally found out that both oprocouplers were killed by my previously inserting the PIC the wrong way (which the PIC survived)!(I could verify by using the optocoupler from the midio128).SInce I am merging signals from inside the same "box" (a midified organ) I decided to not use optocouplers and just bridged pin 3 and 6.Now the thing wokrs perfectly!Thanks a lot!GreetingsReiner Quote Link to comment Share on other sites More sharing options...
moebius Posted November 27, 2004 Report Share Posted November 27, 2004 Excellent!After a lot of measunreing and trying I finally found out that both oprocouplers were killed by my previously inserting the PIC the wrong way (which the PIC survived)!From what I have read I understood that optos are pretty sensitive - at least to reversed polarity input. But it's strange that PIC survives and optos die. (Pic had it's supply lines reversed - but optos were connected to same pins they connect in normal operation, just in mirror)Bye, Moebius Quote Link to comment Share on other sites More sharing options...
goyousalukis Posted November 27, 2004 Report Share Posted November 27, 2004 Yeah - I have been repeatedly amazed at the toughness of my PIC's. I'd mention some of the things I've done, but I'd probably get banned from the forum for mistreatment.Justin Quote Link to comment Share on other sites More sharing options...
ReinerS Posted November 27, 2004 Author Report Share Posted November 27, 2004 Hi,I thought a bit more about what might have happened. My assumption:The PIC must have protection diodes on its input pins. When inserted the wrong way, these were connected to +5V instead to ground, so the protection diodes and the darlingtons of the optocoupler were connected in series between +5V and ground without any resistor. The first input signal then openend the darlington and the weaker element (fortunately the cheaper one ;)) burned through.ANyone knows if the PIC really has protection diodes? I can't really come up with any other idea why the optos burned through.Thanks againGreetingsReiner Quote Link to comment Share on other sites More sharing options...
moebius Posted November 27, 2004 Report Share Posted November 27, 2004 Hi Reiner,Oh yes, looking at the datasheet - PIC has variable amount of diode protection on I/O pins (Rx pin has diodes to both VSS and VDD - RA4 only to VSS)..Justin - You just would be promoted to the forum "Quality assurance technician" ;DBye ya, Moebius 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.