Go to Post No! I will not be an enabler for this madness. Go outside. See a movie. Read a book. LIVE!!!! - Herodotus [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
  #1   Spotlight this post!  
Unread 07-03-2006, 01:59
ericand's Avatar
ericand ericand is offline
Registered User
AKA: Eric Anderson
FRC #3765 (Terrabots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: St. Paul, MN
Posts: 148
ericand is a jewel in the roughericand is a jewel in the roughericand is a jewel in the rough
Time available between NEW_SPI_DATA and Putdata

It is well documented that we need to send data back to the master microprocessor every 26.2 ms and that the data from the master is signaled by the setting of the NEW_SPI_DATA flag.

I would like to know how much time is available between the time the NEW_SPI_DATA flag is set and the Putdata is called, before the Master flags a code error.

The default code says:

Getdata(&rxdata); /* Get fresh data from the master microprocessor. */

Default_Routine(); /* Optional. See below. */

/* Add your own code here. */

Putdata(&txdata); /* DO NOT CHANGE! */

But there is no indication of how much time can be taken prior to calling Putdata().

My concern is that NEW_SPI_DATA may become active imidiately following the check for NEW_SPI_DATA. This means that one fast loop execution time may pass before we notice that it is set. Thus we may have more or less time to execute in Process_Data_From_Master_uP() before we are too late to call Putdata().

I think that this is related to our robot seeing intermittant code error conditions. I think that knowing exactly how much time we take (maximum) in our fast and slow loops, we can do a better job of time management and avoid the code error.
 


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
Encoders and putdata theycallhimtom Programming 3 09-02-2006 19:24
Parallel Processor rohandalvi Kit & Additional Hardware 25 27-10-2004 20:21
interrupts and putdata() doy Programming 4 23-02-2004 22:45


All times are GMT -5. The time now is 07:03.

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