Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

config servos=2

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Robotics
View previous topic :: View next topic  
Author Message
discovery

Bascom Member



Joined: 09 Nov 2007
Posts: 1

vietnam.gif
PostPosted: Sun Jan 27, 2008 4:24 pm    Post subject: config servos=2 Reply with quote

Hi !
I new use AVR and Bascom !
I have some problem with BC and AVR!
I use ATMega 32. I config servo on pinb.0 and pinb.1 (it is timer0 and timer 1). Can I config servo on other pin? and is out put in pin of servo PWM ?
please help me !
my English isn't very bed ! (^^)

_________________
discovery!
Back to top
View user's profile Yahoo Messenger
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Thu Oct 09, 2008 3:08 pm    Post subject: Reply with quote

Hi,
It a long time to answers

1) yes you can I did it :

Config Pinc.6 = Output ' drop
Config Pinc.5 = Output ' lid
Config Servos = 2 , Servo1 = Portc.5 , Servo2 = Portc.6 , Reload = 20

' the step
Const Openlid = 70
Const Closelid = 24
Const Opendrop = 40
Const Closedrop = 20

dim Nombre As Byte

' use:
Nombre = Openlid 'you can't use a const directly
Servo(1) = Nombre
Wait 3
Nombre = Closelid 'you can't use a const directly
Servo(1) = Nombre
Wait 1
Nombre = Closedrop
Servo(2) = Nombre

bon courage
JP
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Robotics All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum