Keypad wait interrupt

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
paridhi
Posts: 16
Joined: Tue Mar 29, 2016 6:16 pm
Has thanked: 7 times
Contact:

Keypad wait interrupt

Post by paridhi »

I do not want to wait for the input for long time. If the input is there in keypad its fine, else the program must carry on. What should I do make such program?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Keypad wait interrupt

Post by Benj »

Hello,

The Interrupt On Change (IOC) type interrupt can be used to detect a I/O change.

However a keypad is generally raster scanned so probably won't work with the IOC interrupt unless you get the changing voltage to be made present to the micro via your circuitry.

A lot of devices would wait for up to say 30 seconds for input before resuming with what they were doing.

This can be done by incrementing a counter in a loop every time there is no keypress along with a delay. If the counter reaches a certain value then x amount of time has passed and you can drop out of the loop and go back to what you were doing before. By placing this type of code into a macro you can call it in several places in your program without repeating the same code over and over again.

Post Reply