core13: An Arduino core for the Attiny13 *testers wanted*

As for USBTinyISP programmers, we do not have to change default_bitclock only in avrdude.conf, but we can change the parameters directly from the IDE environment (at least from 1.6.1), without changing avrdude.conf.

Open arduino-1.6.1\hardware\arduino\avr\programmers.txt in some text editor and change usbtiny section with this :

usbtinyisp.name=USBtinyISP -B10 (Default)
usbtinyisp.protocol=usbtiny
usbtinyisp.program.tool=avrdude
usbtinyisp.program.extra_params=

############ > 4.8 MHz ##################

usbtinyisp_2.name=USBtinyISP -B2 (> 4.8 MHz)
usbtinyisp_2.protocol=usbtiny
usbtinyisp_2.program.tool=avrdude
usbtinyisp_2.program.speed=2
usbtinyisp_2.program.extra_params=-B{program.speed}

############ < 4.8 MHz ##################

usbtinyisp_4.name=USBtinyISP -B4 (> 0.6 <= 4.8 MHz)
usbtinyisp_4.protocol=usbtiny
usbtinyisp_4.program.tool=avrdude
usbtinyisp_4.program.speed=4
usbtinyisp_4.program.extra_params=-B{program.speed}

############ 128 KHz ##################

usbtinyisp_50.name=USBtinyISP -B50 (= 128 KHz)
usbtinyisp_50.protocol=usbtiny
usbtinyisp_50.program.tool=avrdude
usbtinyisp_50.program.speed=50
usbtinyisp_50.program.extra_params=-B{program.speed}

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

restart IDE and we have USBTinyISP options for diferrent bitclocks :

I just try some values and this is empirical result ( no upload error ) i get.

2us for > 4.8 MHz
4us for > 0.6 <= 4.8 MHz
10us - default settings for => 0.6 MHz
50us - for 128 KHz

Because i use often usbtiny for ATTINY85 too, upload speed improving the lot, for example :

avrdude: Using SCK period of 10 usec
avrdude: writing flash (8070 bytes):
Writing | ######################################### | 100% 21.05s
Reading | ########################################  | 100% 24.73s

avrdude: Setting SCK period to 2 usec
avrdude: writing flash (8070 bytes):
Writing | ######################################### | 100% 7.33s
Reading | ########################################  | 100% 8.19s

instead of 46 seconds I get the upload for 16 seconds for 8 Kb .hex file on 8 MHz attiny85.