View Full Version: KEY ENCODER INTERFACING(74922) with parallel port

booksbybibin >>Computer interfacing >>KEY ENCODER INTERFACING(74922) with parallel port


yogi- 07-03-2006
KEY ENCODER INTERFACING(74922) with parallel port
This tutorial is taken from the book MY EXPERIENCE IN PARALLEL PORT INTERFACING. you can download it free from the files section(file:-parallelport(3 files) of yahoo group-booksbybibin http://groups.yahoo.com/group/booksbybibin/ comments about this book on www.booksbybibin.blogspot.com KEY ENCODER INTERFACING(74922) Mostly available keyencoders like 74147,74148 have a problem of key debouncing. So in order to eliminate it we had to use 74922 or 74923 encoders. It costs around Rs.200! And you had to make the keypad. You can use the above keypad for this purpose. Using this we can avoid software burden and the listening of the program for keypad. The encoder has 5 outputs. 4 data and one Data Available. So when a key is pressed Data Avaiable become HIGH and parallel port has to sense this to read the keypad. See the capacitance values properly. I used .01uF as C . The capacitance values should be C and 10C for proper operation otherwise keydebouncing problem won't be eliminated properly. Here I have short circuited X2 and Y1 so the output will be 1. #include"bparlib.c" #define Chip_Select Clear_ControlPort_bit(0) void main() { int a; Chip_Select; while(!Show_DataPort_bit(7)); printf( "\nkey pressed in hexadecimal:%x",Read_DataPort()&0x0F); } The program will wait for a keypress (i.e short circuiting between two pins(x, y)) and print the pressed value.


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.