Go to Post I think that in general people should worry more about what they are doing, and less about what others are doing. That goes for a lot more than FIRST. - pfreivald [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 08-11-2002, 15:18
Marc P. Marc P. is offline
I fix stuff.
AKA: βetamarc
no team
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Watertown, CT
Posts: 997
Marc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond repute
Send a message via AIM to Marc P.
I believe the output voltage from an analog sensor doesn't go anywhere in particular, it's just used in "if, then" logic sequences within the PBASIC processor, such that "If <condition exists> then <result>, much like the digital sensors, if sw_1 = on, then motor1= off, etc. but rather, if var=127 then pwm1=127, if var=254 then pwm1=254, etc. The changes in voltage are registered as variables in the programming, defined based on the SERIN command upon every program iteration/repetition (which is why it sits at the top of the main program loop). The serin captures whatever the voltage happens to be upon it's execution, whether a sensor (gyrochip) or a potentiometer, and saves it in the program as a variable, until the program loops and it is replaced by the same serin command. This loop cycles anywhere from 50-80 times per second, depending on the length and complexity of the program, resulting in what feels like a real time translation of analog data into action, when really it's cycle based.

Hope that helps.
 


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
How to access other Digital inputs on OI? DougHogg Electrical 2 12-03-2003 13:57
Pre-Autonomous OI Communication Ryan Meador Programming 19 23-01-2003 20:38
Competition Sequence for PBasic ttedrow Programming 12 23-01-2003 08:49
Digital inputs, bandwith, errors? Micah Brodsky Programming 7 20-01-2003 16:08
Serious Controller Ideas archiver 1999 28 23-06-2002 23:01


All times are GMT -5. The time now is 19:02.

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