Go Down

Topic: NEW Core for ATTINY 26 (Read 2594 times) previous topic - next topic

spycatcher2k

Nov 30, 2011, 03:35 pm Last Edit: Dec 09, 2011, 05:58 pm by spycatcher2k Reason: 1
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
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

pwillard

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

spycatcher2k

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

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

Coding Badly


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?

KirAsh4

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

spycatcher2k

#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.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

KirAsh4

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

Coding Badly

#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.

spycatcher2k

#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!!
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Coding Badly


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

spycatcher2k

Done - I managed that one quite easily :

Code: [Select]

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: [Select]
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.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

spycatcher2k

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.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Coding Badly


Thanks.  I'll give it a look.

Go Up