-------------------------------------------- CONPROSYS Script sample programs No. 008 -------------------------------------------- Process name: Anti-chattering Circuit Date of creation: February 22, 2016 Processing content: Anti-chattering ciucuits of DI0 to DI3 digital inputs. A 4-digit up / down counter is used as an application example. [Signals] DI0 to DI3 - The digital inputs that are applied an anti-chattering function respectively by software. * Meanings of reference circuit signals DI0 - Count up signal DI1 - Count down signal DO0 to DO3 - numeric part of 7-segment display DO4 to DO7 - strobe part of 7-segment display [Operation] 1. Process the input signals of DI 0 to DI 3 separately by delay processing and set them to the lower 4 bits of TAG 10. 2. As an application example, a 4-digit counter circuit is created. The DI0 is used as a count up input and the DI1 is used as a count down input. [Description] This sample program has the following tasks. A 4-digit up / down counter. The count value is stored in TAG90. A strobe type 7-segment display (four digits) driven subroutine. Anti-chattering function. The off delayed results of DI0 to DI3 are set to TAG10. 10 msec measurement process. It is a 10 msec measurement process to accurately measure off delay time as much as possible. Every 10 msec, set the value of TAG19 to one.