Go Down

Topic: help with programming ATTINY13a (Read 23382 times) previous topic - next topic

gaggenau

How was your problem solved? because i have run in to a similar problem.

when im trying to upload the blink sketch i get the the following error:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny13
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny13

then the led on the attiny goes high but does not blink.

i am confident that my connections from the arduino(duemilanove with 328) i correct

parts and software used:

arduino duemilanove with 328p proccessor
10uf capacitor between reset and ground
arduino isp sketch loaded
arduino IDE 1.0.1 on OSX10.8.2
core 13 attiny13 core


there where no hardware folder i my arduino folder so i had to create one. and the core13 is now placed in /Users/gaggenau/Documents/Arduino/hardware/Core13/cores/
the boards.txt is placed in:
/Users/gaggenau/Documents/Arduino/hardware/Core13/

i guees the fact that i can choose attiny13 and compile the sketch in the IDE means that the placement is correct?

strykeroz

Hi

Quote
when im trying to upload the blink sketch i get the the following error:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny13
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny13

This indicates no problem - your ATTiny has been programmed successfully at that stage and it confirms your connections were good.

What LED on the ATTiny goes high?

Geoff
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

gaggenau

#32
Nov 01, 2012, 12:38 pm Last Edit: Nov 01, 2012, 12:41 pm by gaggenau Reason: 1
oh sorry I mean a led is connected to output 0 on the attiny.
actually i have tried different outputs on the attiny and the result i the same.

what could i possibly have done wrong if i am using the blink example sketch and upploading is not the problem?
i have a light from the led but no blink. that must indicate that i hav e chosen the right output in the sketch.

strykeroz

Just clarifying: which blink example sketch are you using?  If it's the Arduino one it blinks D13, and an ATTiny doesn't have one of those...  Or have you got it blinking D0 and you've got the LED connected to leg 5?
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

gaggenau

yes its connected to to D0 at legfive.

Code: [Select]
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/


// give it a name:
int led = 0;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


seems like it´s getting stuck in the first line of the code in the loop. because when change the code to start with low it the led is dark. It´s the same on the other digital pins.

spcomputing

What happens when you switch pins?

Code: [Select]
// give it a name:
int led = 4;

gaggenau

the same thing happens when i switch pins. tried them all.

could have something to do with the core? maybe that the delay is not supprted? I´m guessing wild now. :D

gaggenau

one thing i noticed is that in som versions of the boards.txt differs slightly.


###############################################################

attiny13.name=ATtiny13 @ 9.6MHz (interne 9.6 MHz clock)
attiny13.upload.using=arduino:arduinoisp
attiny13.bootloader.low_fuses=0x7a
attiny13.bootloader.high_fuses=0xff
attiny13.upload.maximum_size=1024
attiny13.build.mcu=attiny13
attiny13.build.f_cpu=1200000                                               in some versions of this its 9600000 or 100000L
attiny13.build.core=core13
###############################################################

I have understand that this is the setup of the internal clockspeed, nothing else.

spcomputing

#38
Nov 01, 2012, 07:55 pm Last Edit: Nov 02, 2012, 01:05 am by spcomputing Reason: 1
The core is fine.  As I stated in this topic earlier, I used everything posted with no changes and it worked "out of box".  Since there is no pin mapping with this core, I do not think pin 0 will work.  I will verify this afternoon.

I tried setting the LED to 0 and it did not work.  Try hooking pin 3 2 on the tiny and change int led = 0 to int led = 4.

--- EDIT ---

Never-mind.  All digitals (PCINT0-4) "blink" except for PCINT5/RESET.

PCINT5 - VCC
PCINT4 - PCINT2
PCINT3 - PCINT1
GND     - PCINT0



strykeroz

If you swap make that first line a write to LOW is the LED still lit or does it correctly respond?
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

gaggenau

yes i have tried change the first line to low with the result that the led is not lit.
thats why i get a feeling that the loop gets stuck after the first line.

and i have tried using int led=4.

still not working

now im going to try a another attiny.

strykeroz

"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

gaggenau

well now i have tried another attiny and i have the same problem.
tried a uno as programer instead of the duemilanove.....no luck

I disassembled everything and restarted over . but i got the same result just won´t blink just stay in its status is has on the first line in the loop.



this is starting to get a little bit frustrating now. any more suggestions?

strykeroz


this is starting to get a little bit frustrating now. any more suggestions?
Perhaps a silly question but not sure if you've covered it: did you do the "burn bootloader" step to make sure it's running at that clock speed?
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

spcomputing

Also, you can try what That1Guy99 did to fix it by installing another copy of Arduino IDE (say, 1.0) and reinstalling the core files and modifying the boards.txt with everything in the beginning of this Topic.

@strykeroz - I found the "burn bootloader" isn't necessary with core13 for setting the clockspeed because the high and low fuses come from the boards.txt.  I just select the 128kHz board and upload the sketch (Don't even have to select Upload via Programmer).

Go Up