[ Log In ]
Image of the Atmega324p


Serial to USB converter with Micro USB cable

USB to Serial Converter

Thumbnail: Crystal Oscillator 18.432 MHz for UART

18.432 MHz Crystal Oscillator 18pf 30ppm

Thumbnail: 22 pF Capacitor

22 pF Multilayer Ceramic Capacitor

Thumbnail: Quartz crystal oscillator - 16 MHz

16 MHz Crystal Oscillator 20 pF Through Hole

Thumbnail: 4x4 keypad top view.

4x4 Keypad with Adhesive Backing

Thumbnail: quad buffer line driver 74HC126E

Quad Buffer Line Driver (Through Hole)

USB AVR programmer

USB AVR Programmer

3 pin slide switch

SPDT Slide Switch 3 pin 30V

Handheld auto range multimeter

Handheld Auto Ranging Digital Multimeter


On Paper: How to Output a PWM (Pulse Width Modulation) Signal on Any Pin of the Microcontroller

In this case, a Hitec hobby servo is controlled using the PWM signal, but any device could be controlled using this method with a change to the ICR value to conform to the device's PWM frequency requirement. The 19,999 (20,000 indexed from 0) is used because this translates to a 50 Hz frequency, or 20 ms period that the Hitec servo requires.

The TCNT1 will be used to bring the pin low within the period for the specific pin. The TCNT1 is a timer/counter that holds the value of the clock.

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.


Code (optional):