Posts

Showing posts from August, 2022

Interfacing 4x4 Matrix Keypad | AT89C51

Image
I am using the AT89C51 to interface the 4x4 Matrix Keypad and display the Input on a 16x2 LCD Display. The tools I will be using are : Keil uVision 5 Proteus 8 Professional The LCD is operated in 8 bit mode to display the key that is pressed. The keypad is connected to  Port-1 and the LCD is connected to Port-2 [Data Pins : D0-D7].  Initially the keypad is connected such that Row pins are LOW [ 0 ] and Column pins are HIGH [ 1 ]. Whenever a key is pressed, it will short the circuit and gives the Column a LOW. Then a function is called to check which ROW that key belongs to. For this purpose, we use four user defined functions to determine the ROW number. NOTE : Here the key should be pressed down for 2 seconds to display the input on the screen. This can be debugged along the way. _______________________________________________________________________________ Code : Embedded C IDE : Keil uVision 5 Simulator : Proteus 8 Professional uController : AT89C51 /* Created  by mbedsyst */ #incl

Interfacing 16x2 LCD | AT89C51

Image
I am using the AT89C51 to interface the 16x2 LCD Display. It will be a minimal display message. The tools I will be using are : Keil uVision 5 Proteus 8 Professional The LCD is operated in 8 bit mode to display two lines of messages under 16 characters. When interfacing with an LCD screen only, it doesn't matter the communication mode. When incorporating other modules and shields, we require other port pins for various usage. There I will be demonstrating the 4-bit mode. In this article, I will be demonstrating two operations : Static 2 line message display Scrolling 2 line message display The circuit will be the same for all modes and there will be minor changes in the code. I will be adding the Scrolling Text mode in the LCD screen in the coming days. ___________________________________________________________________________________ STATIC MESSAGE DISPLAY ON 16x2 LCD SCREEN ___________________________________________________________________________________ Code : Embedded C IDE