Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

servo with pic16f877a

Status
Not open for further replies.

luvuslim

Junior Member level 1
Joined
Sep 21, 2010
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,393
I have a dys0213 servo motor interfaced to port a of pic16f877a . Below is the code
Code:
#include<16f877a.h>
#use delay(clock=20000000)
void main()
{
  setup_adc_ports(NO_ANALOGS);
set_tris_a(0x00);
output_a(0x00);
while(1)
 {
output_high(PIN_A1);
 delay_us (1345);
  output_LOW(PIN_A1);
 delay_ms (18 );
}
}
[\code]
this code works perfect in proteus but actual motor never moves it just vibrates as soon as it is turned on...plz help
 

It sounds like your duty cycle is not set up correctly. Disconnect the motor from the PIC, grab an oscilloscope and look at the signal on the output pin. Verify that your pulse timing is correct for the servo you are driving. Then reconnect the motor, and look at the signal on the output pin again. Make sure that the signal still looks correct, and it's not being loaded down by something on your attached circuit.
 
I had this solution in mind but i don't have an oscilloscope.Thanx anyways..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top