[ Log In ]
3 Foot USB Cable Type A to USB Cable Type A

USB Cable Type A Male to USB Type A Male - 3 FT

$2.65
Qty:
USB 2.0 Cable 10 Foot Type A Male to Type B Male

USB 2.0 Cable Type A Male to Type B Male - 10 FT

$4.80
Qty:
84 oz-in NEMA 17 Stepping motors (also called stepper motor)
Image of the Atmega324p

Atmega324P

$8.50
Qty:

10K timmer potentiometer

10K Trimmer Potentiometer (Through Hole)

$0.85
Qty:
16x2 LCD (Liquid Crystal Display)

16x2 LCD (Liquid Crystal Display)

$12.50
Qty:
White prototyping breadboard with 30 tie strips and two power rails on each side.

White Prototyping Breadboard (2x30 columns of tie strips and 2x2 rows of power strips)

$7.95
Qty:
Clear Semi Transparent Breadboard

Clear Prototyping Breadboard (2x30 columns of tie strips and 2x2 rows of power strips)

$8.50
Qty:
Red Through Hole LED (Light emitting diode)

Single Red Through Hole LED (Light Emitting Diode)

$0.34
Qty:

Programming: Timer/Counter Interrupt Specifics

To use the interrupt for the Timer/Counter, an ISR (Interrupt Service Routine) must be written.

Specifically relating to enabling the interrupt for the Timer/Counter, the WGM12 (Waveform Generation Mode) in the TCCR1B must be set so the TCNT1 CTCs (Clears on Timer Compare). The Timer Mask TIMSK must set the OCIE1A (Output Compare Interrupt Enable). This bit is related to the OCR1A. Alternatively, the OCIE1B and OCR1B could be used.

The OCR1A must be equal to the count that will invoke the interrupt.
The function that resides outside of the main function is the interrupt service routine.
ISR(TIMER1_COMP_vect)
{
Do something when the timer interrupt hits.
}

Comments and Additional Information

Have some code to share? Or additional information? Respond here:

You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.

Description:

Code (optional):