Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melvinmo/otp-hardware-token-device
This repository contains code for an OTP token device using an ATmega32 microcontroller for generating one-time passwords as the final project of the undergraduate microprocessor course.
https://github.com/melvinmo/otp-hardware-token-device
atmega32 atmel-studio microcontroller microprocessor proteus
Last synced: 4 days ago
JSON representation
This repository contains code for an OTP token device using an ATmega32 microcontroller for generating one-time passwords as the final project of the undergraduate microprocessor course.
- Host: GitHub
- URL: https://github.com/melvinmo/otp-hardware-token-device
- Owner: MelvinMo
- Created: 2023-09-02T14:44:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-02T14:55:05.000Z (about 1 year ago)
- Last Synced: 2023-09-03T18:29:24.132Z (about 1 year ago)
- Topics: atmega32, atmel-studio, microcontroller, microprocessor, proteus
- Language: C
- Homepage:
- Size: 3.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OTP-Hardware-Token-Device
This project involved developing an OTP (one-time password) token device with the Proteus Design Suite and Atmel Studio app and physically with the required hardware devices using an ATmega32 microcontroller.The key components of the system include:
- LCD display with 16x2 characters to show menus, messages, and one-time passwords.
- Matrix keypad for user input and navigation.
- Custom PCB with microcontroller, LCD, keypad, and other components soldered on.The system has multiple menus:
- Generate One-Time Password: User enters a PIN code, which is validated against the stored PIN. If correct, a 9-digit one-time password is randomly generated and displayed. This can be used for authentication.
- Change PIN Code: User enters current PIN code, which is validated. If correct, user can enter a new PIN code which is stored.
- Disable Card: Allows user to permanently disable the device if needed.
- Turn Display On/Off: To save power, display can be turned off, and turned back on with a keypress.An ATmega32 microcontroller runs the main program loop, handles user input, controls the LCD display, generates random passwords, and manages other logic. Some key functions I have implemented include:
- Custom LCD driver functions for initialization, sending commands and data, going to specific positions, etc.
- Keypad scanning routine to detect button presses.
- Password verification functions.
- Random password generation using srand and rand functions.
- Menu system and overall program flow control.
- Timer interrupt to turn display off after set timeout.