Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] control servo motor

Re: [AVR-Chat] control servo motor

2008-11-10 by Muhammad Amiruddin

i'm sorry mas, i can't help if you are using code vision, i used to playing avr with assembler
language and use avr studio , so if you are using assembler language, you can change the registry per bit inside.
 
to control servo motor so you can use the avr facilities timer as a PWM generator, you can use timer 0,1,2. it can generate the pwm over and over, if you initiate as a interupt timer.
 
may be i cant give on another email the source code and hex file about that..
 
the simple algoritm example to drive servo motor is like this:
 
def motor  equ pa.1 ( just example he he he he ) 
 
drivermotor:
sbi motor
rcall delay ; depend on circling degree that you want ( from datasheet )
cli motor
rcall delay
ret
 
if you want move your motor just call this routine, this routine can produce one cycle of PWM, yah try lah. InsyaAllah succes. if i'm not mistake of course.
 
ok friend good luck thanks for yaour attention .


--- On Sun, 11/9/08, wiyawan <wwn_st3@yahoo.co.id> wrote:
Show quoted textHide quoted text
From: wiyawan <wwn_st3@yahoo.co.id>
Subject: [AVR-Chat] control servo motor
To: AVR-Chat@yahoogroups.com
Date: Sunday, November 9, 2008, 11:55 PM






hello, can you help me programing AVR to control servo motor ?, i
using atmega8535 and compiler use code vision. thx

 














      

[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.