Comments on: Handling external Interrupts with Arduino http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/ so much time, so little to do. Tue, 30 Nov 2010 21:05:12 +0000 hourly 1 http://wordpress.org/?v=3.0.1 By: Dave’s Auduino | Prodical's Blog http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-2550 Dave’s Auduino | Prodical's Blog Sat, 06 Nov 2010 16:31:57 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-2550 [...] switching on – replacing the main (grain repetition) frequency pot on a switch (using an external interrupt) with an LED indicator when it’s active which also dims according to the LDR value (if a bit [...] [...] switching on – replacing the main (grain repetition) frequency pot on a switch (using an external interrupt) with an LED indicator when it’s active which also dims according to the LDR value (if a bit [...]

]]>
By: nairdA http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-2416 nairdA Fri, 15 May 2009 02:50:30 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-2416 too much fun... for you atmega168 users, use EIMSK instead of GICR. just search for the INT0 flag in the atmega168 datasheet to find this. too much fun… for you atmega168 users, use EIMSK instead of GICR. just search for the INT0 flag in the atmega168 datasheet to find this.

]]>
By: Odin HG http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-2379 Odin HG Sun, 07 Sep 2008 19:56:07 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-2379 Thanks! Thanks!

]]>
By: Hyo Byun http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-2051 Hyo Byun Wed, 30 Jan 2008 22:20:12 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-2051 Thanks so much!!! I was trying to read a 128 /rotation encoder without interrupts, and I didn't know the Arduino had the ability to do so until I came across this site. Thanks again! Thanks so much!!! I was trying to read a 128 /rotation encoder without interrupts, and I didn’t know the Arduino had the ability to do so until I came across this site.
Thanks again!

]]>
By: Gabriel http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-1948 Gabriel Tue, 11 Dec 2007 13:36:13 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-1948 I need to count the clicks of an external wheel encoder using interrupts. So instead reading the value in the ISR I should increment it if the wheel goes forward and decrement it if the wheel goes backward? I have 32 clicks (16 high and 16 low) for one wheel rotation and 1 rotation per second. Is this doable or should I use the polled method? I need to count the clicks of an external wheel encoder using interrupts. So instead reading the value in the ISR I should increment it if the wheel goes forward and decrement it if the wheel goes backward? I have 32 clicks (16 high and 16 low) for one wheel rotation and 1 rotation per second. Is this doable or should I use the polled method?

]]>
By: md http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-508 md Wed, 27 Dec 2006 10:37:26 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-508 Hi macsimski, the avr prefix just denotes that this header file is in the "avr" subdirectory of the include path of the libraries. Basically, your include path is composed of various paths in the arduino installation. io.h can be found in <arduino>/tools/avr/avr/include. There is a subdirectory avr (again) with a file io.h, so this is the one which will be included. So, if you use the <> brackets in an include statement the compiler will look in its include paths. I saw you use the ""s with your includes - in this case, you instruct the compiler to look in the current path. Regarding the GICR etc. stuff: Read the datasheet of the ATMega8. The AVRlib defines the same symbols as used in the datasheet, which is why the syntax above works. Otherwise, you would have to use something like porta.1=0x05 ;-((</arduino> Hi macsimski,

the avr prefix just denotes that this header file is in the “avr” subdirectory of the include path of the libraries. Basically, your include path is composed of various paths in the arduino installation. io.h can be found in /tools/avr/avr/include. There is a subdirectory avr (again) with a file io.h, so this is the one which will be included. So, if you use the <> brackets in an include statement the compiler will look in its include paths. I saw you use the “”s with your includes – in this case, you instruct the compiler to look in the current path.

Regarding the GICR etc. stuff: Read the datasheet of the ATMega8. The AVRlib defines the same symbols as used in the datasheet, which is why the syntax above works. Otherwise, you would have to use something like porta.1=0×05 ;-((

]]>
By: macsimski http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-495 macsimski Sun, 24 Dec 2006 22:44:01 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-495 And where did you find info on // Global Enable INT0 interrupt GICR |= ( 1 And where did you find info on

// Global Enable INT0 interrupt
GICR |= ( 1

]]>
By: macsimski http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-494 macsimski Sun, 24 Dec 2006 22:04:09 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-494 I see that you include avr/io.h in your scetch. is it not automatically included? and what means the avr/ prefix? do'nt i have to copy the headers to the special arduino libary folders then? I see that you include avr/io.h in your scetch. is it not automatically included? and what means the avr/ prefix? do’nt i have to copy the headers to the special arduino libary folders then?

]]>
By: md http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-475 md Thu, 21 Dec 2006 08:28:31 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-475 max - yes, the parser of wordpress messed around. I added the missing includes. Unfortunately, the intendation is broken ;-(( I will look after it later. Concerning the DCF77 clock - I have a post describing it: http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/ max – yes, the parser of wordpress messed around. I added the missing includes. Unfortunately, the intendation is broken ;-(( I will look after it later.

Concerning the DCF77 clock – I have a post describing it: http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/

]]>
By: max http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/comment-page-1/#comment-473 max Thu, 21 Dec 2006 00:27:25 +0000 http://gonium.net/md/2006/12/20/handling-external-interrupts-with-arduino/#comment-473 cool! And I'm the first one to post a reply! erm... isn't there supposed to be something behind the "includes" at the top of the script? and: Any luck with your DCF77 already? I'd be really interested in that. cheers max cool! And I’m the first one to post a reply! erm… isn’t there supposed to be something behind the “includes” at the top of the script?
and: Any luck with your DCF77 already? I’d be really interested in that.
cheers
max

]]>