English 中文(简体)
How could I represent a interrupt (for microcontrollers) in a flowchart? [closed]
原标题:
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 5 years ago.

Does anyone have any visual examples?

问题回答

You would have to have a separate flow chart for the interrupt processing. Flowcharts are meant for showing flow of control, and interrupts, by their very nature, are a break in control flow.

Typically interrupts communicate with your "main" function (or other interrupts for that matter) through the use of "shared" global variables in C-based embedded systems. I think a sensible way to represent this in a flow chart is to use a dashed line between processing blocks where such "communications" impact program flow.

I would set up a finite state diagram that represents the normal states of control and the interrupt states; each state would be a block-level element that contained a flowcharty kind of diagram.

Depending on flowchart structure, it would probably make most sense to have the interrupt originate from a node/box that doesn t derive from another, since, by definition, an interrupt doesn t spring from normal software flow (unless it s a software-triggered interrupt). It might make sense to have it on a separate flow chart, or to show it with the rest of the flowchart depending on whether it might trigger behavior in the main flow of the chart.

Usually, without a tasking OS or library, the interrupts just flag a variable that then effects the flow. I think @JustJeff has it right.





相关问题
Logback tutorial [closed]

Where can I find a Logback tutorial and/or sample projects? Something similar with this "Log4j Tutorial" would be nice. Note: I am aware of the documentation available on the official Logback website ...

How to document the Main method? [closed]

Okay, so I ve got a .NET console application with it s Main method, contained in a Program class. You know, the usual: class Program { static void Main(string[] args) { // Do ...

javadoc: show also descriptions of methods from parent class

Is there a way to produce javadoc so that all methods accessible from the class are listed with their full description? Usually only the methods defined in that class are listed and the rest are only ...

Is there a list of known web crawlers? [closed]

I m trying to get accurate download numbers for some files on a web server. I look at the user agents and some are clearly bots or web crawlers, but many for many I m not sure, they may or may not be ...

热门标签