Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Start

Disable Time Interrupt

Initialization

Disable Sensor Interrupt

No Save Main Program Registers to be affected Save Main Program Registers to be affected

Wait for Start Key

Increment Seconds Time counter

Is the Start Key Pressed?

Increment Distance Meters counter

Is 60 Seconds Reached?

Yes

Is 100 Meters Reached?

Yes

Yes

No

Yes

Increment Cost due to Minute Time No Reset Seconds Counter

Update Display

Increment Cost due to 100 Meters Distance No Reset 100 Meters Counter

Check Keypad Status for Pressed Key

Is the Stop Key Pressed? Restore Main Program Registers Restore Main Program Registers

Enable Time Counter Interrupt

Return

Enable Sensor Interrupt

You might also like