Pages: [1]   Go Down
Author Topic: Chiptune Project don't work on Mega?  (Read 1073 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
plugged in speakers

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Nope, No resistor it was just to quickly see if there was output.
Determined to wreck your arduino then.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks it works now smiley-grin

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 smiley-grin
« Last Edit: April 29, 2012, 02:38:51 pm by ryanteck » Logged

Pages: [1]   Go Up
Jump to: