Go Down

Topic: Trinket bootloading problem (Read 70 times) previous topic - next topic

boni_4ever

Hello, fisrts of all is that I am Spanish, so my english could be quite poor.

My problem is that I can't upload my codes to my Adafruit Trinket 5V. I have installed all the drivers from Adafruit but is impossible, t gives me error mensage, and the same when I try to repair it ussing my Genuino Uno Board.

Has someone had the same problems, what am I doing bad?

Thanks.

The erros Message:

Quote
Arduino:1.8.2 (Windows 10), Tarjeta:"Adafruit Trinket 8MHz"

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp: In function 'void __vector_3()':

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp:82:44: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint16_t* {aka volatile unsigned int*}' for argument '2' to 'void handle_interrupts(timer16_Sequence_t, volatile uint16_t*, volatile uint16_t*)'

   handle_interrupts(_timer1, &TCNT1, &OCR1A);

                                            ^

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp: In function 'void initISR(timer16_Sequence_t)':

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp:129:5: error: 'TCCR1B' was not declared in this scope

     TCCR1B = _BV(CS11);     // set prescaler of 8

     ^

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp:136:5: error: 'TIFR1' was not declared in this scope

     TIFR1 |= _BV(OCF1A);     // clear any pending interrupts;

     ^

D:\____Programas Instalados____\ARDUINO\libraries\Servo\src\avr\Servo.cpp:137:5: error: 'TIMSK1' was not declared in this scope

     TIMSK1 |=  _BV(OCIE1A) ; // enable the output compare interrupt

     ^

exit status 1
Error compilando para la tarjeta Adafruit Trinket 8MHz.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

CrossRoads

Those aren't "upload" errors, those are code compiling errors.
Something with your Servo.h library is not working correctly, you need to fix that.
Post your whole code using the </> button. Make sure have the Servo library in the correct place.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

boni_4ever

Ok thanks, but the code works on the Genuino UNO.

Code: [Select]
#include <Servo.h>

Servo servo;

void setup() {
  // put your setup code here, to run once:
servo.attach (1);
servo.write (0);
delay (50);
}

void loop() {
  // put your main code here, to run repeatedly:
servo.write (120);
delay (50);
servo.write (0);
delay(5000);

}

nyphot


westfw

There are two types of Adafruit Trinket.   There are the "Trinket Pro" boards, which have an ATmega328p chip are are "very compatible" with an Arduino Uno, and there are the "Trinket Mini" boards, which have an ATtiny85 chip, and thus are much less compatible...

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy