Pages: [1] 2   Go Down
Author Topic: Attiny 45/85 on arduino, will intterrupt work?  (Read 4997 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i was reading on this site http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585

on how to work attiny 45/85 with arduino board,

so my question is, will interrupt work as atmel328 do?
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

seems like...

seen the datasheet: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATTINY45-20PI-ND ?

-arne
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes but does arduino support it?
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oh - hum...

since millis() works, interrupts will work, 2...

maybe some register addresses r different...
my arduino IDE doesnt know the attiny45...
does urs?

-arne
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here it shows how can arduino read it
http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oh - i c - the IDE can be upgraded... cool!  8-)
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so can anyone help me on how can i make interupt work?
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

could u specify what doesnt work?

according to ur URL millis() will work...
so interrupts work...

or not?

-arne
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i tried interrupt and it doesnt work
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

how did u try it? -arne
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

  attachInterrupt(1, blink, CHANGE); and  attachInterrupt(0, blink, CHANGE);

but it seems it can't understand witch one is 1 or 0 interrupt
« Last Edit: October 09, 2010, 09:19:57 am by acmilangr » Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any idea please?
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

did u test if millis() works? -arne
Logged

-Arne

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

nop, why?
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

why dont u do that first:
Code:
void setup() { pinMode(2,OUTPUT); }
void loop() {
  digitalWrite(2,HIGH);
  delay(100);
  digitalWrite(2,LOW);
  delay(2000);
}
(with a led in series with 10kR at digital pin 2)?

my idea is: if delay+millis dont work, then ur URL is wrong...
if they do work, then ur sketch is wrong...

-arne
« Last Edit: October 09, 2010, 02:02:13 pm by RIDDICK » Logged

-Arne

Pages: [1] 2   Go Up
Jump to: