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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/25/13 08:48
Read: times


 
#189700 - How I would think of it
Responding to: ???'s previous message
Stepping back a bit, I see that you have two tasks that need to run simultaneously. The first task is the command handler that interprets the characters received through the comms port. The second task is a ramp task that is turned on and off through commands (or when the ramp has run to completion).

In your old assembler implementation the UART receive ISR contained a bit of the ramp task functionality in that it checked the command character and set signal to the ramp task (which was also your main task) to abort.

You can put this functionality in your C UART receive ISR or you can figure out some way to multitask the ramp with the command interpreter. If your command interpreter is really simple, you could put all of it into the ISR and just continually run the ramp functionality in the main loop. I suspect you have omitted other functionality for clarity, so this wouldn't be recommended for a more complex system.

List of 4 messages in thread
TopicAuthorDate
UART C vs ASM - Interrupts            01/01/70 00:00      
   after each count I sent to the DAC it would it would examine            01/01/70 00:00      
   How I would think of it            01/01/70 00:00      
      UART C vs ASM - Interrupts            01/01/70 00:00      

Back to Subject List