Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/30/06 14:56
Read: times


 
#108721 - Divide into modules
Responding to: ???'s previous message
I thought I should keep my code in modules so I did. But soon I found it difficult to be reused again. Here in this application, the code can be divided into three parts: the Servo motion control, the ADC interface & data processing and the IR remote control receive routine.

Here is the problem: I wrote the IRRC receive code some days ago and kept it as a module. When I join it with the servo motion code, the MPU just hang somewhere in the middle (I don't know where). Both the IRRC receive code and the Servo control code are time-critical. The IR command can arrive anytime. I have to take data lost into account because sometimes the IR command sent is invalid or imcomplete (being blocked) etc. When data lost occurs, the IRRC routine may keep waiting (due to some "JNB IR,$").

Debuggin these control code are really time-consumptive...

Stanley

List of 27 messages in thread
TopicAuthorDate
Servomotor head version III            01/01/70 00:00      
   Nice Work            01/01/70 00:00      
   Manageing code and debugging            01/01/70 00:00      
      Divide into modules            01/01/70 00:00      
         multi tasking            01/01/70 00:00      
            IRRC routine are much longer            01/01/70 00:00      
               No waiting for IR            01/01/70 00:00      
                  two mcu            01/01/70 00:00      
         Maybe this will help you            01/01/70 00:00      
            this is not IRQ save            01/01/70 00:00      
            RS232            01/01/70 00:00      
         Design First            01/01/70 00:00      
            Design            01/01/70 00:00      
               Pardon            01/01/70 00:00      
   Well done!            01/01/70 00:00      
      The "3.0"            01/01/70 00:00      
         Smart!            01/01/70 00:00      
         hardware            01/01/70 00:00      
            Mainland China            01/01/70 00:00      
      And Well done Kai!            01/01/70 00:00      
   My experinece            01/01/70 00:00      
      very impressive            01/01/70 00:00      
         Program and Code Structure            01/01/70 00:00      
            Spaghetti anyone ?            01/01/70 00:00      
      manually interpret machine code?            01/01/70 00:00      
         hand coded mechine language            01/01/70 00:00      
   Keep up the good work            01/01/70 00:00      

Back to Subject List