Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Help with my TX_v1.4 mod software
#11

Hi,

I don't know specifically about the Atmel/Arduino processor, but Internal interrupts are what they say they are, i.e. internal to the chip. Typically they are for internal timer events, communications (RS232, I2C, SPI, etc.) and perhaps "exception" handling (program "errors" such as overflow or division by zero, etc.).

However, the attacments appear to suggest that (external) interrupts can be generated by ANY pin, but only at the PORT level. That means that lots of "custom" interrupt code may be required to identify and process the signals for individual pins.

But it's largely irrelevant because a basic quadrature encoder cannot be used for a wind vane type of function, even if interrupts are available. Interrupts are often/usally "latched" to report that an interrupt has occurred, but not when it occurred. For example it's irrelevant whether a "rain tip" occurs before or after a "wind pulse" (but vital to determine whether a clockwise or anticlockwise encoder rotation occurred).

Interrupts are usually prioritised and maskable so you must know what ALL the library routines are actually doing. Also, even if a rain or wind pulse is "lost" (triggered again before the previous flag was processed/cleared), it's not a "fatal" error. It would just cause a minor, short-term under-read of the value in exceptional circumstances (e.g. hurricane or torrential rain).

Quadrature Encoders are intended to detect the speed and direction of rotation, but NOT an absolute direction. Applications where an absolute direction is required will either indicate the direction on a secondary display, or use an auxiliary "calibration" function such as one or more limit switches on a lead screw (lathe or printer, etc.). Simple applications self-calibrate themselves, for example a "volume control" will "lock" at the minimum or maximum values if the encoder is rotated past those positions. Volume control software is designed NOT to wrap around from zero to maximum volume !. Wink

Cheers, Alan.
Reply




Users browsing this thread: 1 Guest(s)