Har sökt info om servona (Aristo-Craft HS-300CW) på Google men inte hittat någon användbar info.
Kablarna är tre till antal. En svart, en röd, och en gul. De flesta små RC-servon verkar för det mesta ha röd till plus och svart till minus (3-6 V) samt puls in på gul och så har jag kopplat. (5V till röd och svart, gul direkt till PORT RC1).
Pulslängd verkar vara någonstans i häradet 0,6 till 2.4 mS därefter paustid 20 mS. Paustiden säjs inte vara så kritisk. Har provat med lite olika värden på tiderna men servona rör sig inte ur fläcken. Däremot blev dom lite småvarma efter en stund.
Vad gör jag för fel?
Kod: Markera allt
// Glcd module connections
char GLCD_DataPort at PORTD;
sbit GLCD_CS2 at RB0_bit;
sbit GLCD_CS1 at RB1_bit;
sbit GLCD_RS at RB2_bit;
sbit GLCD_RW at RB3_bit;
sbit GLCD_EN at RB4_bit;
sbit GLCD_RST at RB5_bit;
sbit GLCD_CS2_Direction at TRISB0_bit;
sbit GLCD_CS1_Direction at TRISB1_bit;
sbit GLCD_RS_Direction at TRISB2_bit;
sbit GLCD_RW_Direction at TRISB3_bit;
sbit GLCD_EN_Direction at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections
void main() {
ANSEL = 0;
ANSELH = 0;
C1ON_bit = 0;
C2ON_bit = 0;
TRISA = 0;
PORTA = 0;
TRISB = 0;
PORTB = 0;
TRISC = 0;
PORTC = 0;
//************* Graphic LCD ********************
Glcd_Init(); // Initialize GLCD
Glcd_Fill(0x00); // Clear GLCD
Glcd_Set_Font(Font_Glcd_Character8x7, 8, 7, 32); //font
Glcd_Write_Text("Test RC_Servo", 0, 0, 2); // Write string
//**************** PWM **************************
do {
RC1_bit = 1;
Delay_uS(600) ;
RC1_bit = 0;
Delay_mS(20);
}while (1) ;
}