|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
|
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 |