| Author |
Message |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Fri Feb 01, 2013 9:35 pm Post subject:
Problems with MIDI to CV 628 Subject description: *modified* |
 |
|
Hello. I'm finishing my http://m.bareille.free.fr/mcv628/mcv628.html
The last thing to do is program the pic. But i have no programmer, so i'll go to my electronic components supplier and let them upload the .hex file to the pic. Thing is, the midi 628 is progammed for the pic 16f628. Here i could only get 16f628A... everyone says they're *almost* the same. The .asm file #includes <p16F628>
. Should i change that to <p16F628A> ? Or it'll work either way? If i had a programmer i'd do tests, but i'm a casual pic user so no need to... and i'm not interested yet, so many things.
thanks Last edited by capicoso on Sat Feb 02, 2013 11:56 pm; edited 1 time in total |
|
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 19580 Location: The Netherlands, Enschede
Audio files: 116
G2 patch files: 317
|
Posted: Sat Feb 02, 2013 5:59 am Post subject:
|
 |
|
I ran a diff on the include files for the PIC16F628 and the PIC16F628A.
They are identical, except that the A version has some more configuration options for the clock mode and the brown out detector, but it is backwards compatible in that the shared options are all the same.
All internal register addresses are the same.
The flash config registers are at the same address too .
Some minor textual differences too of course the PIC16F628.inc has some A's less ;-)
So it should work without a recompile. _________________ Jan |
|
|
Back to top
|
|
 |
wmonk
Joined: Sep 15, 2008 Posts: 483 Location: Enschede, the Netherlands
Audio files: 12
|
Posted: Sat Feb 02, 2013 6:04 am Post subject:
|
 |
|
The part 16F628A is upwards compatible with the 16F628. So it should work 'as is', without modifications to the code.
Edit: ah, Jan was just a bit faster.  _________________ Weblog!
Kits for synthesiser modules in Europe |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Sat Feb 02, 2013 7:27 am Post subject:
|
 |
|
| thanks guys |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Sat Feb 02, 2013 11:17 pm Post subject:
|
 |
|
So i'm having problems, and i'll post here to keep the forum clean.
Someone gave me a cheap JDM programmer... it's serial port( who the *** has serial port?) I had a P3 machine lying around, without HDD, but with serial port. So i ran Puppy Linux on it(loaded on RAM) put the programmer with the pic, downloaded PikLab, read the pic, it was empty, good. Then i program the code, it uploaded it pretty fast, then verified, "verifying successfull!", read the pic again, and the code was there... sooo i belive i got it right?
Now onto the pcb. Everything is right where it belongs, i used a TL431 with a trim and some resistors instead of REF01. That was the first part i tested, i get 10v in the out, so it's allright.
When i power the circuit, the led doesn't do anything. This means pic is failing? I think the led in the component placement diagram is inverted, so i tried both ways, nothing.
Now this is weird, CV1 is always at 13.70V, no matter if i adjust the trimmer, CV2 is at 0.03v, this is right i think? Although trimmer doesn't affect it either... Cv1 problem may be a bad solder joint or some bad wiring. (OH, i put the trimmers backwards, but that doesn't matter right? It means i'll just be the inverse when adjusting)
Gate is always at 0.3v. Pin 6 from the opto 6n136 is always at ~5v.
I still didn't check for bad wiring, or bad solder joints, wrong components, etc. Because i still don't know if it would be a bad programmed pic... but i'm getting on it now.
I just started making things months ago... so i'm still new, but even more with the DACs and PIC, i don't know how to tell if it works or anything.
Piklab programmed it right and the verify was successfull so i don't know... but the fact that the LED doesn't blink three times at startup means that pic is bad... soo could i have a little help from my friends?  |
|
|
Back to top
|
|
 |
wmonk
Joined: Sep 15, 2008 Posts: 483 Location: Enschede, the Netherlands
Audio files: 12
|
Posted: Sun Feb 03, 2013 4:28 am Post subject:
|
 |
|
| capicoso wrote: |
Now this is weird, CV1 is always at 13.70V, no matter if i adjust the trimmer, CV2 is at 0.03v, this is right i think? Although trimmer doesn't affect it either... Cv1 problem may be a bad solder joint or some bad wiring. (OH, i put the trimmers backwards, but that doesn't matter right? It means i'll just be the inverse when adjusting)
|
Correct, in each way its a linear potentiometer.
c
Gate is always at 0.3v. Pin 6 from the opto 6n136 is always at ~5v.
I still didn't check for bad wiring, or bad solder joints, wrong components, etc. Because i still don't know if it would be a bad programmed pic... but i'm getting on it now.
[/quote]
You'll most probably never read a different signal on the 6N136, as MIDI is way too fast for a digital multimeter, and there is a pullup resistor.
| capicoso wrote: |
I just started making things months ago... so i'm still new, but even more with the DACs and PIC, i don't know how to tell if it works or anything.
Piklab programmed it right and the verify was successfull so i don't know... but the fact that the LED doesn't blink three times at startup means that pic is bad... soo could i have a little help from my friends?  |
Check your wiring and solder joints first. PICs are sensitive to electrostatic discharge, but are pretty sturdy. _________________ Weblog!
Kits for synthesiser modules in Europe |
|
|
Back to top
|
|
 |
Sebo

Joined: Apr 27, 2007 Posts: 517 Location: Argentina
|
Posted: Sun Feb 03, 2013 11:05 am Post subject:
|
 |
|
Hola:
First take out the DACs, and the optocoupler (I asume you used sockets), then check that the tracks between the PIC and the LED are right (no shorts or track cuts) also check the wiring of the LED (in some of the files the LED are inverted, so get sure is right). Check that the PIC is getting 5V and there is no shorts around it.
Now power up the circuit, if the PIC is right the LED must flash 3 times and then will stay off. If the LED does nothing is likely the PIC isn't right. If the LED flashes, move into the next step of troubleshooting, check all tracks of the PCB for shorts or cuts. Check the optocoupler (is prone to dead).
Hope you get it right. _________________ Sebo
---------------------------------------
My Music:
www.cosaquitosenglobo.com.ar
www.myspace.com/cosaquitosenglobo |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Sun Feb 03, 2013 9:33 pm Post subject:
|
 |
|
Hello.
@wmonk , yes i'm kind of blind here without a scope. I was about to get one, this would be a good moment...
@sebo
Hola.
I took out the DACs, and also the opto. I checked the traces from RB0 to GATE and it's fine, it's also fine at the 390R resistor(just right before the led). So i believe that the PIC should make it to the LED. Btw, remember i said that CV1 gave me always 13v? and CV2 was normal i think. Now that i took the DACs out, both CVs give me 13v.
I checked and both VDD and MCLR are getting 5.04v.
The DACs are also getting 5.04v.
The LED didn't flash, as expected... To make sure that it's not a bad connection problem(although i rechecked many times) i put my DVM on RB0, to see if there was any variation in voltage on the startup, but it's always at 0v. So i suppose it's something with the PIC... I'll buy another one tomorrow.
When i tried to program it with wine+icprog, it did the program and then the verify, and my X server crashed(icprog crashed also). Could this have burned the PIC? But i uploaded it fine later with PikLab... so i dunno. I uploaded it with the defaults options(if needed i post here)
thanks again |
|
|
Back to top
|
|
 |
elmegil

Joined: Mar 20, 2012 Posts: 983 Location: Chicago
Audio files: 14
|
Posted: Sun Feb 03, 2013 9:51 pm Post subject:
|
 |
|
| I would say, if taking out the DACs causes both outputs to behave the same way the bad one did before, I think maybe the DAC itself might be bad? Do you have spares to try that? |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Sun Feb 03, 2013 10:03 pm Post subject:
|
 |
|
| elmegil wrote: | | I would say, if taking out the DACs causes both outputs to behave the same way the bad one did before, I think maybe the DAC itself might be bad? Do you have spares to try that? |
Yes i thought the same. No i don't have, and i hope they're both fine because they're a bit expensive. I could swap them and see if the outputs behaviour gets swapped too.
edit: Well i don't know , I swapped and it's the same... maybe a broken OPA? The CV2 is at ~0.4 again. It goes from 0.4 to 0.65v with the whole range of the trimpot.
IO1 from the DACs are at 0v
D1,D2,D3..., D7 of the DACs gets ~2.36V from RB3, RB4, RB5, RB7.(RB6 is the LED and it still outputs 0v) RA1, RA2 and RA0.
WR1 from DAC U3 is at 5v comingfrom RA3
edit: Swapped the opas and it's the same. |
|
|
Back to top
|
|
 |
Sebo

Joined: Apr 27, 2007 Posts: 517 Location: Argentina
|
Posted: Mon Feb 04, 2013 4:02 am Post subject:
|
 |
|
An advice: don't try to troubleshoot all problems at the same time. Try to solve them one by one. First try to get the PIC working. Keep the DAC off the circuit because as they are expensive if better to not risk them. _________________ Sebo
---------------------------------------
My Music:
www.cosaquitosenglobo.com.ar
www.myspace.com/cosaquitosenglobo |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Mon Feb 04, 2013 7:45 pm Post subject:
|
 |
|
Advice taken. I need to be more patient.
Changed the pic and the leds blinks! So i'll move to next step
EDIT: SO after many tries( my led wasn't blinking at midi notes) i figured out it was a bad MIDI cable, fixed it, and then it worked! Gate at around 5v good... My previous lm358 OPAS were broken i think, so i bought new ones. Placed the DACs, then the operationals, and after few minutes, i smell like something was getting burnt... The amplifiers were HOT, couldn't touch them for more than 1 sec, i took them out. And when i looked closer, they were lm386 and not lm358(my electronic supplier gave me wrong parts, thanks!) i checked the datasheet and the pins are all differents. But then i touched the DACs and they were hot... not as hot as the opas but... couldn't touch them for more than 5 secs or so... Could the wrong amplifiers burn my DACs? |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Thu Feb 07, 2013 12:08 am Post subject:
|
 |
|
| I'm closer but not yet. Weird things are happening in the DACs and OPAs section. Well, i changed both lm358 and dac 0830. IO1 outputs from the DACs give me 0v, both. I'm already sending midi notes with velocity 100. They're getting the 10v REF at pin 8, that's just right. OPAs final output give me at CV1 -15v?? and CV2 10.30v. A shortcut or anything you think? I'm checking it again and again and can't find anything wrong. If the DACs are giving me 0v at pin 11 output, there's something wrong in this part right? Before the OPAs. They're getting 5v from various pins of the PIC, i can't see pulses though(no scope). I'll keep checking though, but if there's an advice, tell me it please. |
|
|
Back to top
|
|
 |
elmegil

Joined: Mar 20, 2012 Posts: 983 Location: Chicago
Audio files: 14
|
Posted: Thu Feb 07, 2013 6:36 am Post subject:
|
 |
|
| Yes, if the amps were shorting something and pulling too much current, it could affect your DACs. |
|
|
Back to top
|
|
 |
capicoso
Joined: Nov 19, 2012 Posts: 56 Location: Argentina
|
Posted: Fri Feb 08, 2013 12:46 am Post subject:
|
 |
|
I'm almost there... First in my head i had aux cv and note cv swapped.
I downloaded the program to send sysex, ran with wine. I sent velocity to aux cv... nothing, (i'm sending midi messages with puredata), then i touched the trimpot, moved it a bit, and velocity worked! it seems like a bad solder eh? Didn't fix it yet, but at least i know aux cv works... Now only note cv is left...I sent either 1v/oct and the note table to test... NOW at least it's responding to midi notes, but the 127 note, the max voltage is 7v, this means, that the lowest is note 44 = 0v. A huge offset, why could this be?
EDIT
Ewww i think i got it, i can't believe it!
Note-ref was at 0, i don't know what this means, but i put it at C-2 and now i can reach note 0. I will fine tune it now... Oh one thing, GATE output is not 5v... it's something like ~4.7v is that right?
thanks guys
tuned it! perfect 1v/oct tracking! |
|
|
Back to top
|
|
 |
elmegil

Joined: Mar 20, 2012 Posts: 983 Location: Chicago
Audio files: 14
|
Posted: Fri Feb 08, 2013 6:18 am Post subject:
|
 |
|
Excellent
4.7 should be close enough to 5 for gate purposes. |
|
|
Back to top
|
|
 |
|