Secure Electronic Lock using PIC 16f628a Microcontroller

Download Full Text
Muhanad Hayder Mohammed
Published Date:
September 21, 2012
Volume 2, Issue 5
43 - 47

electronic lock, embedded system, pic microcontroller
Muhanad Hayder Mohammed, "Secure Electronic Lock using PIC 16f628a Microcontroller". International Journal of Research in Computer Science, 2 (5): pp. 43-47, September 2012. doi:10.7815/ijorcs.25.2012.047 Other Formats


The proposed system implements an electronic embedded lock that provides a great benefit over a traditional lock, which uses only a manual key. If in case, the key is lost or stolen then anyone can open the lock using the key. On the other hand, losing a long and complex password or getting it stolen is harder as compared to a traditional key. Further, a combination of both, the manual key with a computerized password makes the system more secure. A longer password will reduce the possibilities of getting the code broken and opening the lock. Our system comprises of a keypad and HD44780 20x2 LCD along with a PIC16f628a microcontroller. The firmware controls these components in such a way that interaction with keypad is very easy and smooth. The LCD provides user with messages and notifications to inform about the current system state. User can perform operations such as opening and closing the lock, changing the current password in the microcontroller EEPROM and clearing a single digit while entering the password when wrong digit entered (back space). The proposed system’s firmware is developed using assembly language with MPLAB development environment. It is tested and implemented at the actual hardware level with proper functioning of the system and it is completely bug free.

  1. Milan, Verle, “PIC Microcontrollers”, mikroElektronika; 1st edition, 2008.
  2. Nebojsa, Matic, ”PIC Microcontrollers on line”, MikroElektronika, 2000.
  3. Microchip, “PIC16F628x Data Sheet” Microchip.
  4. Hitachi, “LCD HD44780 datasheet”, Hitachi.
  5. Peter, JAKAB, “Electronic Combination Lock based on PIC”, [Online] Available:
  6. DAT, “Simple Combination lock Project with keypad and LCD”, [Online] Available:

  • Januzaj, Ylber, et al. "Real Time Access Control Based on Face Recognition", International Conference on Network security & Computer Science (ICNSCS-15), June 10-11, 2015.