This circuit uses any trigger function according to the associated logic. The circuit is from an Electronics Now. For TTL the 7414 can be used.