Electronics > Microcontrollers

Arduino interrupts.

(1/5) > >>

Is there a hardware interrupt for serial rx?

I know PIC chips have such an interrupt but i have not seen any ref regarding it for Arduinos.


AVRs have 3 serial interrupts, (RX Complete, TX Complete and Data Register empty) , so the hardware does.
It would be pretty stupid if the Arduino platform didn't use them so they must be there somewhere.
I'm not sure what Arduino call them though, (sorry, i'm not an Arduino expert).

Ya can't really compare a PIC with an Arduino.
The Arduino platform is an extra layer on top of an ATmega AVR designed to simplify things and make it easier for people with little programming ability to write code. As a result some things have been hidden away.
I find people seem to be forgetting that an AVR is a great MCU by itself without any Arduino layer on top of it. :)



--- Quote ---http://www.arduino.cc/en/Reference/Interrupts
--- End quote ---

I have looked over all the Arduino docs. No mention of Serial Interrupts at all. I guess it must have to be done manually.
Anyone know of a way to set these up within Arduino?


I think the expectation would be to use the Arduino serial communications library rather than handling the serial comms directly.

If that is not suitable, I suppose you would have to write raw AVR code as a function/library of your own and call it from your Arduino code.

I don't know much about Arduino and have just recently been curious about its capabilities. I can tell you that comparing a raw AVR program with a typical Arduino program is like night and day. Larry Wall wrote that three virtues of a programmer are Laziness, Impatience and Hubris. Arduino programming certainly supports the first two of those.

Presuming you can't (or don't want to) use the high level Arduino facilities then you could always use the Arduino hardware platform and program the AVR directly at the hardware level.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version