Monday, 3 March 2014

Simple Program to interface a motor with Atmega 16/32 :

#include<compat/deprecated.h> /* some softwares don't run well with newer versions of operating systems. using this header file will automatically resolve conflicts that may arise due to higher versions. */

void main()
 DDRD = 0xff; // set D as output port
 sbi(PORTD,4); // set EN1 of motor driver
  _delay_ms(1000); // syntax to give delay. (In milli seconds ofcourse).

No comments:

Post a Comment

Powered by Blogger.