Frequency meter based on AT89S52 single chip