Discussione: servo
Visualizza messaggio singolo
Vecchio 25 marzo 05, 18:34   #14 (permalink)  Top
chip_
User
 
Data registr.: 31-01-2005
Messaggi: 3
Citazione:
Originally posted by estense@25 marzo 2005, 00:33
sto facendo ipotesi, perché non conosco il picbasicpro

secondo me dovrebbe essere

pulsout= 0,7
pause=2-pulsout
pause=18

ma se il pulsout non varia da 0,5 a 1,5 il servo parte, ma poi resta fermo alla posizione 0,7

non so che comandi corrispondano (se esistono) a "per pulsout che va da 0,5 a 1,5 ..... ecc." e se c'é un incremento automatico o no tipo "step" o qualcosa di simile.

Ragazzi sono 15÷20 anni che ho mollato il basic !!!!!


vediamo se ci riesco,dal manuale del PicBasicPro:

PULSOUT

PULSOUT Pin,Period

Generates a pulse on Pin of specified Period. The pulse is generated by toggling the pin twice, thus the initial state of the pin determines the polarity of the pulse. Pin is automatically made an output. Pin may be a constant, 0 - 15, or a variable that contains a number 0 - 15 (e.g. B0) or a pin name (e.g. PORTA.0).

The resolution of PULSOUT is dependent upon the oscillator frequency. If a 4MHz oscillator is used, the Period of the generated pulse will be in 10us increments. If a 20MHz oscillator is used, Period will have a 2us resolution. Defining an OSC value has no effect on PULSOUT. The resolution always changes with the actual oscillator speed.

' Send a pulse 1mSec long (at 4MHz) to Pin5
PULSOUT PORTB.5,100
PWM
chip_ non è collegato   Rispondi citando