Pages: [1]   Go Down
Author Topic: NEW Core for ATTINY 26  (Read 2370 times)
0 Members and 1 Guest are viewing this topic.
Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I've got my hands on a quite a few ATTiny26(l) chips. Anyone got the boards.txt settings and core files for this? Any help would be appreciated.

Thanks all.

Drew
« Last Edit: December 09, 2011, 11:58:08 am by spycatcher2k » Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1663
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have some of these as well...   it would be nice to know this is a possible addition.
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - Managed to find this : http://www.avr-developers.com/corefiles/index.html.

Hope this helps others.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

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


For what it's worth, the 26 is on the list of processors the Tiny Core will eventually support.  Unfortunately, at this point in time, it's last on the list.

I'm curious ... how did each of you end up with 26s?
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The AVR Developers link that spycatcher2k posted has a core for the tiny26 ...
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

#Coding Badly - I got mine from our local college - They miss ordered them, got 40 of them for 10p each. At that price I was not going to turn them down.

#KirAsh4 - The core they have is so incomplete it is unusable on the 26s - I am using BASCOM at the moment to write firmware with, but I'd rather use the Arduino IDE.

I looked at modifying the tiny45_85 core, but don't know where to start, I have a VB programming background. A lot of 'C' is still beyond my knowledge.  If someone could give me some ideas on what to modify, I would be willing to try and modify a core to work.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah. I've never actually tried that core. I've only used the tiny84v so far.
Logged

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

#Coding Badly - I got mine from our local college - They miss ordered them, got 40 of them for 10p each. At that price I was not going to turn them down.

Are they in a PDIP-20 package?

Quote
I looked at modifying the tiny45_85 core, but don't know where to start, I have a VB programming background. A lot of 'C' is still beyond my knowledge.  If someone could give me some ideas on what to modify, I would be willing to try and modify a core to work.

It's really a question of what features you want.  If all you want is basic digital functions than modifying any existing core is easy.  If you want PWM, time functions, analog-to-digital conversion, etcetera, it can become difficult.
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

#Coding Badly - For the main, Digital I/O & Timer Would be sufficient for most projects I have in mind - PWM I can pseudo emulate or use Digital Pots. I THINK I can work out the pin mapping -> port names from the other Core files I have, A Timer for delay and delayMicroseconds would be a BIG advantage, but I don't even know where to start!!
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

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


Start with an entry in boards.txt.  If you need help, let me know.
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Done - I managed that one quite easily :

Code:
arduino_tiny26.name=Arduino-ATtiny26 @ 8Mhz exp
arduino_tiny26.upload.using=arduino:usbtinyisp
arduino_tiny26.upload.maximum_size=2048
arduino_tiny26.bootloader.low_fuses=0xdf
arduino_tiny26.bootloader.high_fuses=0xca
arduino_tiny26.bootloader.path=attiny26
arduino_tiny26.bootloader.file=attinyblank.hex
arduino_tiny26.bootloader.unlock_bits=0x3F
arduino_tiny26.bootloader.lock_bits=0x0F

arduino_tiny26.build.mcu=attiny26
arduino_tiny26.build.f_cpu=8000000L
arduino_tiny26.build.core=tiny26

When I try to verify code i get :

Code:
In file included from C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\wiring.c:31:
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetToPowerup':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: 'TCCR0B' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: (Each undeclared identifier is reported only once
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: for each function it appears in.)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: 'FOC0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: 'FOC0B' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:72: error: 'WGM02' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:73: error: 'TCCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:73: error: 'COM0A1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:73: error: 'COM0A0' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:73: error: 'COM0B1' undeclared (first use in this function)
/snip
snip/
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_ClockSelect':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:120: error: 'TCCR0B' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetWaveformGenerationMode':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:138: error: 'TCCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:138: error: 'WGM01' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:138: error: 'WGM00' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:139: error: 'TCCR0B' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:139: error: 'WGM02' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetCompareOutputModeA':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:153: error: 'TCCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:153: error: 'COM0A1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:153: error: 'COM0A0' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetCompareOutputModeB':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:158: error: 'TCCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:158: error: 'COM0B1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:158: error: 'COM0B0' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_DisconnectOutputs':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:163: error: 'TCCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:163: error: 'COM0A1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:163: error: 'COM0A0' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:163: error: 'COM0B1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:163: error: 'COM0B0' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetOutputCompareMatchAndClear':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:174: error: 'OCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetOutputCompareMatchA':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:179: error: 'OCR0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_SetOutputCompareMatchB':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:184: error: 'OCR0B' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer0_EnableOutputCompareInterruptA':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:189: error: 'OCIE0A' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer1_SetToPowerup':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:221: error: 'ICNC1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:221: error: 'ICES1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:221: error: 'WGM13' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:221: error: 'WGM12' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:223: error: 'WGM11' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:223: error: 'WGM10' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:232: error: 'ICIE1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:234: error: 'ICF1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer1_InterruptsOff':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:239: error: 'ICIE1' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h: In function 'Timer1_SetWaveformGenerationMode':
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:298: error: 'WGM11' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:298: error: 'WGM10' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:299: error: 'WGM13' undeclared (first use in this function)
C:\Users\Drew\Documents\Arduino\hardware\attiny26\cores\tiny\/core_timers.h:299: error: 'WGM12' undeclared (first use in this function)

All to do with the timer(s) - I have the data sheet,if you can point me in the right direction, I'll TRY to modify the core.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1353
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've found a core (sort of) - its called arduino-lite http://www.robopeak.net/blog/?p=185

I've #defined the analogWrite, digitalRead,digitalWrite & pinMode commands, and built up a core with it.

The core looks like it covers most things, Plus brings some extras as well e.g. PWM commands.

Hope you get some use out of this.

* attiny26.zip (245.54 KB - downloaded 19 times.)
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

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


Thanks.  I'll give it a look.
Logged

Pages: [1]   Go Up
Jump to: