Go to Post Woodie once said he wanted to make our brains hurt. And I *don't* think he was talking about getting beaned by 198 grams of foam.... - Ken Patton [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
  #10   Spotlight this post!  
Unread 07-03-2004, 00:07
Daniel Daniel is offline
Daniel Katanski
#0240
Team Role: Mentor
 
Join Date: Feb 2004
Location: Monroe, MI
Posts: 32
Daniel is on a distinguished road
Re: Interrupt timer, executing code asap?

Real time programming requires the use of a "state machine", which is a programming technique where one state starts the motors, for example, and the second state monitors for a certain amount of time to pass before proceeding to the third state.

The second state can be entered multiple times without causing any problems. So the second state checks the time, then reutrns to the code where the data packets can be handled. Then the same fuction is called to execute the seconds state which looks at the time again.

State machines are best implemented using the C "switch" statement, and some long hard thinking.
 


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
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12
Interrupts Questions mightywombat Programming 0 03-01-2004 14:50
EDU Demo Code: Serial Data Transmitter Using a State-Machine Kevin Watson Programming 3 28-12-2003 22:56
EDU Interrupt and Timer Template Code Kevin Watson Programming 8 22-12-2003 14:11
EDU Demo Code: Real-Time Clock Using a Timer Kevin Watson Programming 1 17-12-2003 15:14


All times are GMT -5. The time now is 09:01.

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