Go Down

Topic: Chiptune Project don't work on Mega? (Read 1 time) previous topic - next topic

ryanteck

Well after coming across an arduino port of an chiptune I like I then uploaded it to my Mega and plugged in speakers wired up to PWM 3 and ground.

Nothing plays at all :C

The original post for this was @ http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265488118 and all tutorials / posts online are using the Uno.

Does anyone know how to get this to work on the Mega (1280)?

Thanks - Ryan

dxw00d

Quote
plugged in speakers


What sort of speakers? Connecting 8ohm, or even worse, 4ohm speakers directly to an Arduino isn't a good idea.

ryanteck

I wired up an jack to one of my monitors (I don't know how many ohms)
I then tried just wiring up an LED to see if there was any output at all.

Grumpy_Mike

Quote
I then tried just wiring up an LED to see if there was any output at all.

LED and resistor I hope.

The arduino output suffers damage if you try and pull more than 40mA from it. That translates to a 100 ohms load. I suspect your monitor is less that that so you will have damaged the arduino pin.


ryanteck

Nope, No resistor it was just to quickly see if there was output.

Theres lots of videos of this project. Theres even an tutorial at http://www.instructables.com/id/Arduino-Chiptunes/, An quick youtube search shows lots aswell.

I think it might be something to do with it being an mega. I remember having to use different pins for the WiiChuck lib aswell.

Grumpy_Mike

Quote
Nope, No resistor it was just to quickly see if there was output.

Determined to wreck your arduino then.

ryanteck

Its not like I was going to leave it in there. What use is it seeing an LED fade.

I also have tried an small speaker setup how the tone sketch shows using pin 3 instead of 8. Still nothing

The tutorial code has an slight variation which also outputs to pins 10 and 12 for LEDS. Nothing come out of these (these two with resistors)

stimmer

change DDRD=0xff; to DDRH=0xff; then output should be on pin 9.

And don't connect it directly to a speaker or led without a resistor :)

ryanteck

#8
Apr 29, 2012, 09:25 pm Last Edit: Apr 29, 2012, 09:38 pm by ryanteck Reason: 1
Thanks it works now :D

And yes an resistor is now on it :3

Edit: In the end to be super safe I used an H bridge chip and an separate power source for the speakers. Its working great :D

Go Up