Go Down

Topic: core13: An Arduino core for the Attiny13 *testers wanted* (Read 155735 times) previous topic - next topic

hansibull

I add attiny13 install file for 1.6.4 IDE :
ATTiny13 for 1.6.4
Since the pins_arduino.h is blank, does someone know the exact pin configuration for the Attiny13? I added a dummy below :)

Code: [Select]

// ATMEL ATTINY13 - ARDUINO
//
//                  +-\/-+
// AinX (D X) PB5  1|    |8  Vcc
// AinX (D X) PB3  2|    |7  PB2 (D X)  AinX
// AinX (D X) PB4  3|    |6  PB1 (D X) PWM
//            GND  4|    |5  PB0 (D X) PWM
//                  +----+

MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

nicnac

Since there is a difference between version 1.6.3 and 1.6.4 in relation to the earlier 1.6.x versions, i decided to make the installation file for 1.6.4 (1.6.3) version only.
Just unpack file in ...\sketchbook\hardware folder.

Boards included :



I added some GCC Flags ( can be used from IDE menu - choose default if you do not like to use extra optimisation flags ) :



And i added millis() , micros(),  delayMicroseconds() and set ADC clock for 16 KHz ( it is not set for 16 kHz originally )

If you use 128 KHz - default_bitclock must be slow down to -B50 and for 16 KHz to -B250 ( USBTinyISP)

Thanks for that brilliant setup!
One thing that is not really streamlined is the categories. I changed that. So now it is ATtiny13 with all the clock speed and all compiler options (only listed once for all speeds of course). Only 9.6MHz tested.


common_ground


smeezekitty

Since the pins_arduino.h is blank, does someone know the exact pin configuration for the Attiny13? I added a dummy below :)

Code: [Select]

// ATMEL ATTINY13 - ARDUINO
//
//                  +-\/-+
// AinX (D X) PB5  1|    |8  Vcc
// AinX (D X) PB3  2|    |7  PB2 (D X)  AinX
// AinX (D X) PB4  3|    |6  PB1 (D X) PWM
//            GND  4|    |5  PB0 (D X) PWM
//                  +----+



The pins are internally converted hence no need for pins_arduino. If you don't mind, I can add this to the next release for reference purposes. After I check it for accuracy at least
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

hansibull

The pins are internally converted hence no need for pins_arduino. If you don't mind, I can add this to the next release for reference purposes. After I check it for accuracy at least
Yes, please add the pinout to the next core13 version :)
Buy why have you just uploaded the core files, and not a complete set of folders, including boards.txt?
The setup would be much simpler if you wouldn't need to dig through the whole forum post to find the correct files :)
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

smeezekitty

Buy why have you just uploaded the core files, and not a complete set of folders, including boards.txt?
The setup would be much simpler if you wouldn't need to dig through the whole forum post to find the correct files :)
Because it is a royal pain in the BUTT to work with the *.txt that Arduino uses. When I wrote it, I couldn't figure it out myself. I kind of have it figured now but there are already working boards.txt out there.

Quote
Please help me out. I was expecting neoPixel lib to be able to handle 9.6MHz but looks like its not.
The neopixel code is unportable (it calls internal core functions rather than just the external ones)
It would need to be rewritten.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

sudhirkhamari

Thanks for the reply. WS2812 based need 800Khz to work. ATtiny13A has internal source for 4.8 & 9.6Mhz. Is it possible to get 800Khz out of tiny13a without external clock source? is it possible to do sort of bit-banging to get the neopixel working? Any suggestion how?

evildave_666

#352
May 19, 2015, 08:56 am Last Edit: May 19, 2015, 09:06 am by evildave_666
There is a non-arduino avr-gcc library for ws2812b out there. It works fine on t13.

https://github.com/cpldcpu/light_ws2812

I doubt you'd be able to shoehorn any arduino worldsemi library onto a t13.

sudhirkhamari

Thanks, I am using the same library as you pointed. But the pixel are just shining once when they get the power and than go blank. That is why I was trying to use neoPixel library. I'l do some tests and check it once again.

evildave_666

I've run a strip of 10 off of a t13 without any problem with the light_ws2812 library.  Are you sure you aren't having power problems?

sudhirkhamari

#355
May 24, 2015, 07:43 pm Last Edit: May 27, 2015, 10:32 am by sudhirkhamari
Thanks, Power was not an issue. But the sample blinky program from ws2812 library is working now, I don't really know the cause why it was not working. What I did is, I just replaced the light_2812 library with the one you suggested and uploaded the program to tiny13A. Thanks.

Here is the program with a push button connected to PB3, WS2812 to PB4. A fixed set of 8 color matrix will cycle with each push of the button.
https://youtu.be/y-Fuz-sQf5w

sudhirkhamari

Hi All,
   Has anyone tried using an IR receiver with attiny13?? I am planning to hook up an IR sensor to attiny13 so that I can choose/control the color of the ws2812 RGB LED through a remote. if you have any code/diagram then it will really help.

  The code need to be really small to fit in 1KB.

Ed1960

Have been using the attiny13 core for some time with much pleasure.
However, the core already uses the TIM0_OVF_vect, therefore making it impossible to use it for own applications

jlx78520

I added 8, 16 and 20 MHz for arduino ide 1.6.5 they are not very well tested (tested on attiny13a-pu 8MHz, by chip number it should be 20 MHz but delay(1000) says it is ~8 MHz), so be aware that it could not work on your attiny13a or worse... And 20 MHz micros will not work as expected, you can fix it by editing wiring.c line 102 for 20000000 Hz. Instalation is thesame, put folder "tiny13" from zip to Documents\Arduino\hardware folder.

smeezekitty

Have been using the attiny13 core for some time with much pleasure.
However, the core already uses the TIM0_OVF_vect, therefore making it impossible to use it for own applications
There is only one timer in the t13. I don't know what else can be done.
Quote
I added 8, 16 and 20 MHz for arduino ide 1.6.5 they are not very well tested (tested on attiny13a-pu 8MHz, by chip number it should be 20 MHz but delay(1000) says it is ~8 MHz), so be aware that it could not work on your attiny13a or worse... And 20 MHz micros will not work as expected, you can fix it by editing wiring.c line 102 for 20000000 Hz. Instalation is thesame, put folder "tiny13" from zip to Documents\Arduino\hardware folder.
Sorry. I don't understand. Are you using an external clock gen?
The Attiny13 do not support 8 or 20MHz on the internal clock.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Go Up