hi , im doing a simple project using lcd and keypad with a PIC16F877A, i m planning to check password, so if there is wrong password, how can i make a alert sound ???.
( one of my friend suggested me to use a buzzer )
You will be using conditional statements(if.. else) for checking the passwords... then in false block use any one of the pin of the port(A,B,C,D mostly which one unused) as the switch signal...
that will be give pulse to the transistor connected to the buzzer and buzzer works whenever false block executes for timing purpose use any one of the interrupt to reset microcontroller... sry for my bad english...
Use a small Buzzzer ....you can get it anywhere in a electronics shop..
connect the a not gate output where the IC gives 0 signal upon entering a wrong password further connect the buzzer with that NOT gate IC.
one terminal of buzzer is at IC output and other is grounded
Use comparator to check the password, if the password does not matches it will make AeqB pin low, now connect the NOT gate at AeqB pin and connect the output of NOT gate to the buzzer.
you didn't mention the type of Programmer you're using!!! you already have an answer for C programming, but for MPLAB you just send a voltage(bsf PORT...) to the buzzer using an output port IF WRONG PASSWORD IS PRESSED!!!