Here is the source files of my PWM project. Both Assembly and HEX files.
Hope you find it helpful. It offers full 10-bits resolution of the PWM designed to be used with servo motors.
http://users.ntua.gr/mc03003/My_PWM_Stergios.rar
20.10.09
PIC servo controller
Finally i managed to drive my SG5010 digital servo using a PIC (pic16f887)
Here is my code in Mikrobasic:
Here are the files of this project.
Ελληνικό post: http://www.hlektronika.gr/forum/showthread.php?p=328745#post328745
Here is my code in Mikrobasic:
program MyPWM_numca ' * Description ' PWM library was unable to drive the SG5010 digital servo, so i am writing ' my own program. It will read Analog from PORTA.0 and it will create pulse ' of apropriate width every 20ms in PORTC.2 ' ' * Test configuration ' MCU: P16F887 ' Dev.Board: 44pin demo board ' Oscillator: internal 4Mhz dim temp as word sub procedure WAIT(dim temp10 as word) dim i as word i = 0 for i = 0 to temp10 delay_us(1) next i end sub main: ANSEL = 000001 ' Configure AN0 pin as analog TRISA = 000001 ' PORTA is input TRISC = 000000 ' PORTC is output for pulses TRISD = 000000 ' PORTD is output for temp while true temp = ADC_READ(0) PORTD = temp PORTC = 000100 delay_us(400) WAIT(temp div %1000) PORTC = 000000 WAIT(1000-temp) delay_us(18600) wend end.
Here are the files of this project.
Ελληνικό post: http://www.hlektronika.gr/forum/showthread.php?p=328745#post328745
9.10.09
Elevator Trim Wheel added.
Saitek's X52 was fitted a multiturn elevator trim wheel. I used LEGO gears and a large LEGO motoX wheel with the tyre, to give a aircraft-like look. (click on photos for larger view)
Pedals upgrade! v1.3
I just finished upgrading my rudder pedals. They are now using pneumatic rods for centering.
(click on photos for larger view).
Subscribe to:
Posts (Atom)