ym2612 gets hot

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

ym2612 gets hot

Post by sega16 » Tue May 08, 2012 2:02 am

Hello, I just got a ym2612 off of ebay and then I hocked it up and after a while after getting and trying to rewire the wires and getting no sound I touched the chip and it was hot and I do not know why even when unpluging all the data wires it still gets hot could it be that first I accidentally plug in an 8 ohm speaker to it? I really do hope that the chip still works here is some code I wrote based on this:
http://www.smspower.org/forums/viewtopic.php?t=2450 (bottom post) and
http://www.smspower.org/maxim/Documents ... estprogram
this runs on my arduino uno

Code: Select all

//ym2612
#define wr_pin 10
#define a0_pin 11
#define a1_pin 12
#define d7 9
#define clock_pin A0
#define cs_pin A1
#define led_pin 13
unsigned char clock;
ISR(TIMER1_COMPA_vect)
{
  digitalWrite(clock_pin,clock);
  clock=clock^HIGH;
}
void writetTo(unsigned char address,unsigned char data)
{
  digitalWrite(led_pin,HIGH);
 //first send address to d0-d7
  DDRD = DDRD | B11111100; //0-7
  DDRB = DDRB | B00111111; //8-13
 digitalWrite(a0_pin,LOW);
 digitalWrite(a1_pin,LOW);
 delay(2);
  PORTD |= (address<<2);
 PORTB |= (address>>6);
 digitalWrite(a0_pin,HIGH);
 digitalWrite(a1_pin,LOW);
 PORTD |= (data<<2);
 PORTB |= (data>>6);
 delay(2);
 digitalWrite(wr_pin,LOW);
 delay(5);
 digitalWrite(wr_pin,HIGH);
 digitalWrite(led_pin,LOW);
}
void setup()
{
 clock=LOW;
 //DDRC = 0xFF;
 pinMode(wr_pin, OUTPUT);
 pinMode(cs_pin, OUTPUT);
 pinMode(a0_pin, OUTPUT);
 pinMode(a1_pin, OUTPUT);
 pinMode(led_pin, OUTPUT);
 pinMode(clock_pin, OUTPUT);
 digitalWrite(cs_pin,LOW);
  // Set up Timer 1 to send a sample every interrupt.

    cli();

    // Set CTC mode (Clear Timer on Compare Match) (p.133)
    // Have to set OCR1A *after*, otherwise it gets reset to 0!
    TCCR1B = (TCCR1B & ~_BV(WGM13)) | _BV(WGM12);
    TCCR1A = TCCR1A & ~(_BV(WGM11) | _BV(WGM10));

    // No prescaler (p.134)
    TCCR1B = (TCCR1B & ~(_BV(CS12) | _BV(CS11))) | _BV(CS10);

    // Set the compare register (OCR1A).
    // OCR1A is a 16-bit register, so we have to do this with
    // interrupts disabled to be safe.
    OCR1A = F_CPU / 8000000;    // 16e6 / 8000 = 2000

    // Enable interrupt when TCNT1 == OCR1A (p.136)
    TIMSK1 |= _BV(OCIE1A);

    sei();
 
}
void loop()
{
 // digitalWrite(led_pin,LOW);
      writetTo(0x22,0);
    writetTo(0x27,0);
    writetTo(0x28,0);
    writetTo(0x2B,0);
    writetTo(0x30,0x71);
    writetTo(0x34,0x0D);
    writetTo(0x38,0x33);
    writetTo(0x3C,0x01);
    writetTo(0x40,0x23);
    writetTo(0x44,0x2D);
    writetTo(0x48,0x26);
    writetTo(0x4C,0x00);
    writetTo(0x50,0x5F);
    writetTo(0x54,0x99);
    writetTo(0x58,0x5F);
    writetTo(0x5C,0x94);
    writetTo(0x60,0x05);
    writetTo(0x64,0x05);
    writetTo(0x68,0x05);
    writetTo(0x6C,0x07);
    writetTo(0x70,0x02);
    writetTo(0x74,0x02);
    writetTo(0x78,0x02);
    writetTo(0x7C,0x02);
    writetTo(0x80,0x11);
    writetTo(0x84,0x11);
    writetTo(0x88,0x11);
    writetTo(0x8c,0xa6);
    writetTo(0x90,0x00);
    writetTo(0x94,0x00);
    writetTo(0x98,0x00);
    writetTo(0x9c,0x00);
    writetTo(0xB0,0x32);
    writetTo(0xB4,0xC0);
    writetTo(0x28,0x00);
    writetTo(0xA4,0x22);
    writetTo(0xA0,0x69);
    writetTo(0x28,0xF0);
   // digitalWrite(led_pin,HIGH);
    delay(100);
    writetTo(0x28,0x00);
}

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Tue May 08, 2012 3:00 am

Careful, I fried a few YM2612's doing similar things. The DAC's got cooked. I think there's a minimum load requirement on the audio output pins as I recall. If you run the chip with too little resistance on the audio output, it damages the chip. That's what I think the problem was anyway. There are some people here with more experience with this sort of stuff that should be able to offer some more insight.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue May 08, 2012 7:14 am

8ohms probably fried the output of the chip. You definitely want a pullup resistor on the output (it does not sink current, as mentioned in die shots thread), and then an opamp to buffer or amp things and then you can think of speakers.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Tue May 08, 2012 2:15 pm

TmEE co.(TM) wrote:8ohms probably fried the output of the chip. You definitely want a pullup resistor on the output (it does not sink current, as mentioned in die shots thread), and then an opamp to buffer or amp things and then you can think of speakers.
Pulldown, not pullup.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue May 08, 2012 10:46 pm

Ok once I get another one I will either use an oscilloscope or a resistor then my lm368 amplifier then speaker and or another thing that I pretty much ruled out does it have an oven to stabilize the chip? I don't think so as it was a consumer product and not that precision was needed.

sigMate
Interested
Posts: 21
Joined: Sun Mar 25, 2012 2:28 pm
Location: Paris, France
Contact:

Post by sigMate » Wed May 09, 2012 6:35 pm

Same thing happened to me first time I used an YM2612. Actually, the chip didn't fried but it sounded awful after that. Maybe yours isn't totally dead ? To check mine, I unsoldered the YM2612 from a real Genesis and I put a DIP socket instead to switch between chips more easily. It was almost fun to listen to a damaged YM2612 ! I also observed a very strange behavior with fresh and still unused YMs : the DAC on channel 6 doesn't fire up instantly ! It needs some seconds to "go out from stasis" :)

Anyway, you do have to use a load resistor (something like 2.2k) on the analog output of the chip ! I also put a decoupling capacitor after that. Then I simply use an M-Audio preamp to do the rest.

Good luck !

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Thu May 10, 2012 12:30 am

Ok Mabey later I will do more experimenting with it to see if I can get any output from it.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Wed May 30, 2012 11:55 pm

I got another one and I don't think it is reciving writes at all as far as I am aware to write data to the ym2612 you:
1.RD and WR high
2.A0 and a1 low
3.write address
4.wr low
5.WR high
6.A0 high
7.write data
8.WR low
is that correct?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu May 31, 2012 1:18 pm

you need to pull !CE low too, or keep it low all times. On my LPT port dongle the !CE is always low and the chip does not complain.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Thu May 31, 2012 5:32 pm

!CE is low during the whole time also does it matter that not all the bits are written at the same time due to port limitations on my arduino uno I could not write them in one go I don't see why that would make a difference but you never know.
Also the reason I know it is not receiving writes is because when doing this

Code: Select all

all_input(); //d0-d7 are set as inputs every thing else is still output
  digitalWrite(A0_pin,LOW);
  digitalWrite(RD,LOW);
  digitalWrite(WR,HIGH);
  delayMicroseconds(5);
  Serial.println(read_byte());
I just get the byte I wrote meaning that the chip did not drive the statue bit to zero
I looked up ym2612 lpt and found this
EDIT: won't work can't find anywere to by the amp have to come up with something else.
http://sblive.narod.ru/ZX-Spectrum/YM26 ... Device.htm
Should I make my own lpt ym2612 board to see if the chip is bad or my software? I have an old computer with windows 98 that could run the dos software posted on the link.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Thu May 31, 2012 10:30 pm

One thing I did when I was doing my YM2612 testing is de-solder the YM2612 from a Mega Drive and install a socket in its place, so I could easily remove/swap the chip, and attach test hooks when I wanted to. If you have a spare Mega Drive or two, and the equipment to properly de-solder a chip like this, that could be another way to go, that way you'd also have another YM2612 you could test in your hardware, and you could test your YM2612 in the Mega Drive. That'd tell you quickly if one chip was giving different behaviour than the other.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Thu May 31, 2012 11:58 pm

Unfortunately I only have a MD2 va1 and a va1.8 (my VA1 is broken) both of which have the ym3438 built into the ASIC is there a way I could solder wires to the right pins? Also another possibility is that I got a fake both the old chip and the new one have the same data code I hope they are not just a fake.

Post Reply