Go to Post Ahem, a climbing xerox machine. Also known as the scariest type of xerox machine this Earth has ever seen. - itsjustjon [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 06-08-2003, 09:48
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Okay i called innovation first and they said it uses standard RC signals with a period of 1-2ms sent every 17 ms, not a true PWM pulse like i previously thought. If you send a 1ms pulse, that will be full backward, a 1.5 millisecond pulse, still, a 2ms pulse full forward etc. The 1-2ms part will be easy. It will not be easy however to do this exctly every 17 ms. Usually (at least with servos the 17 ms is not all that critical though and there may be some leeway). you may or may not be able to acheive acceptable spacing without any external hardware. below is an example of the type of pulsout command you need. In a few minutes i will post more.

Pulsout 1,1000
'on a BS2 this would send a 2ms pulse out on pin 1. note: the period paramater of the pulsout command is in units of 2microsconds. (ie: 1000 = 2milliseconds)

======== The rest i promised ==============
Here is some code that will take two numbers from 0 to 255 (First style) and send the appropriate pulses. This code obviously does not handdle the spacing between the pulses. This code will only work for a BS2 or BS2E.

'put this stuff at the beginning of your code.
Temp var word
L_pin con 0 'pin tio send left pulses too
R_pin con 1 'pin to send right pulses too
Pause_time con 17 'adjust this accordingly to acheove 17 ms spacing. I put 17 ms only as an example and you will have to play with this. You may not need a dalay you program may already take more than 17 ms. In this case you need to do some optimizing to the rest of you program.

beginning:

'code to read joysticks or whatever and assign values to
r _speed and L_speed goes here

'put this at the end of your code.
temp2 = L_speed * 256
temp2 = (temp / 32) + 2000
PULSOUT L_Pin,Temp
temp2 = R_speed * 256
temp2 = (temp / 32) + 2000
PULSOUT R_pin,Temp
pause pause_time
goto beginning

Note: the forums messed up the spacing and i am too lazy to fix it so it may be a bit hard to read .
__________________
1139 Alumni

Last edited by Rickertsen2 : 06-08-2003 at 10:18.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Battlebots I.Q.- A serious threat to FIRST or a half thought up cheep copy? Joe Matt General Forum 75 17-10-2005 20:43
switch speed control wayne 05 Programming 6 01-10-2003 09:35
A DEAD reckoning program rcubes85 Programming 5 19-03-2003 14:21
last years speed controllers..... archiver 2001 9 23-06-2002 23:44
Speed Controllers archiver 2000 1 23-06-2002 23:01


All times are GMT -5. The time now is 05:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi