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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Oliver Sedlacek
04/25/13 02:48
Read: 1020 times
Uk


 
#189700 - How I would think of it
Responding to: Robert Bowen'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      Robert Bowen      04/24/13 14:48      
   after each count I sent to the DAC it would it would examine      Jan Waclawek      04/24/13 22:36      
   How I would think of it      Oliver Sedlacek      04/25/13 02:48      
      UART C vs ASM - Interrupts      Robert Bowen      04/25/13 05:26      

Back to Subject List