Pages: 1 [2] 3 4 5   Go Down
Author Topic: Attiny85 tone issue  (Read 12016 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found this:

attiny85arduinoisp.name=ATtiny85 (w/ Arduino as ISP)
attiny85arduinoisp.upload.using=arduino:arduinoisp
attiny85arduinoisp.upload.maximum_size=8192
attiny85arduinoisp.build.mcu=attiny85
attiny85arduinoisp.build.f_cpu=1000000L
attiny85arduinoisp.build.core=attiny45_85

Still the same error message
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
ATtiny85 (w/ Arduino as ISP)

...is that the board you are using?  That you have selected when you upload?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No sorry I copied the wrong one, I need to be using this one:

# attiny85at8.upload.using=arduino:arduinoisp

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I added this:

attiny85at8.name=ATtiny85 @ 8 MHz  (internal oscillator; BOD disabled)
attiny85at8.upload.using=arduino:arduinoisp
attiny85at8.upload.maximum_size=8192
attiny85at8.build.mcu=attiny85
attiny85at8.build.f_cpu=8000000L
attiny85at8.build.core=tiny

it matches the other board.txt formats but still same error message
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well somehow it worked itself out and now my tiny is fully programmed. smiley-mr-green
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent!  Enjoy!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just wanted to thank you for your Tiny core that supports Tone. It took me a while to figure out that I needed to download the code under the Featured heading in the left pane, I was looking at the stuff in the larger area.

Anyway, I'm using my ATTiny85 with the Tone function and I appreciate your efforts.

Lazy Glen
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just wanted to thank you for your Tiny core that supports Tone.

You are welcome.

Does the HLT core not support Tone?


Quote
It took me a while to figure out that I needed to download the code under the Featured heading in the left pane, I was looking at the stuff in the larger area.

Link added to the larger area.  Thanks for the feedback.
Logged

Philadelphia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, I'm jumping in on this topic with a quick question. I did everything I could to figure this out on my own and even have searched other sites for the answer but found nothing. Basically, I have a sketch that uses the tone() funcion to play a noise. It works swimmingly with the Arduino UNO and breadboard prototype but when I try to load it on to the ATtiny85, I get this message:

avrdude: usbdev_open(): did not find any USB device "usb"

I haven't seen that message mentioned here so I'm wondering if there are any changes I need to make to the boards.txt file that are different from the ones that fotokid had to make.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


What are you using for a programmer?
Logged

Philadelphia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, just started using this stuff so I'm not sure exactly what you're asking. Everything I'm doing is the same exact setup as fotokid, as far as I know - same Arduino UNO SMD board, same ATtiny85 chip, and I'm using the same board setting from the core file, which was ATtiny85 @ 8 MHz (internal oscillator; BOD disabled). Using Arduino 1.0 as the IDE. Here's my sketch if it helps:

Code:
#include "pitches.h"

int melody[] = {
  NOTE_CS4, 0, NOTE_CS8, 0, NOTE_CS4, 0, NOTE_CS8, 0, NOTE_EE, 0, NOTE_DS8, 0, NOTE_EE, 0, NOTE_DS8, 0,
  NOTE_CS4, 0, NOTE_CS8, 0, NOTE_CS4, 0, NOTE_CS8, 0, NOTE_EE, 0, NOTE_DS8, 0, NOTE_EE, 0, NOTE_DS8, 0,
      NOTE_DS7, 0, NOTE_DS8, 0, NOTE_DS7, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0,
      NOTE_DS7, 0, NOTE_DS8, 0, NOTE_DS7, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0,
          NOTE_CS5, 0, NOTE_DS8, 0, NOTE_CS5, 0, NOTE_DS8, 0, NOTE_GG, 0, NOTE_DS8, 0, NOTE_GG, 0, NOTE_DS8, 0,
          NOTE_CS5, 0, NOTE_DS8, 0, NOTE_CS5, 0, NOTE_DS8, 0, NOTE_GG, 0, NOTE_DS8, 0, NOTE_GG, 0, NOTE_DS8, 0,
      NOTE_DS7, 0, NOTE_DS8, 0, NOTE_DS7, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0,
      NOTE_DS7, 0, NOTE_DS8, 0, NOTE_DS7, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0, NOTE_FF, 0, NOTE_DS8, 0, };

int noteDurations[] = {
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80,
  30, 80, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, };

void setup() {
}

void loop() {
  for (int thisNote = 0; thisNote < 128; thisNote++) {

    int noteDuration = 100/noteDurations[thisNote];
    tone(0, melody[thisNote],noteDuration);

    int pauseBetweenNotes = noteDuration * 1.20;
    delay(pauseBetweenNotes);

    noTone(0);
  }
}

Everything compiles fine, then I get that error about the USB.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Sorry, just started using this stuff so I'm not sure exactly what you're asking.

No problem.  Is your Uno connected to the ATtiny85?
Logged

Philadelphia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I followed the tutorial on High Low Tech for the proper setup. However, I also get that same error message even if the Uno is not hooked up to the the ATtiny85.
Logged

Philadelphia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just figured out what you were asking (I think). I had it on the "AVRISP mkII" setting for programmer. I tried it as well with the "Arduino as ISP" setting and got this error message:

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync


From what I understand, the first two lines are not a problem. I'm also assuming that despite the fact that I am indeed attempting to use the Arduino as an ISP for programming the ATtiny85, that is not the correct setting...
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are you using Arduino IDE 1.0?
Logged

Pages: 1 [2] 3 4 5   Go Up
Jump to: