Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am trying to work on LCD display using VHDL. I want to display the word “TECH”

ID: 2291868 • Letter: I

Question

I am trying to work on LCD display using VHDL. I want to display the word “TECH” and make it blink on LCD. I need the complete source code (If anyone helps me and the code works I will offer bonus cash for it ) I am trying to work on LCD display using VHDL. I want to display the word “TECH” and make it blink on LCD. I need the complete source code (If anyone helps me and the code works I will offer bonus cash for it ) I want to display the word “TECH” and make it blink on LCD. I need the complete source code (If anyone helps me and the code works I will offer bonus cash for it )

Explanation / Answer

#include <windows.h>

HANDLE hComm;

void OpenComm()

{

DCB dcb;

hComm = CreateFile("COM1:", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );

if(hComm==INVALID_HANDLE_VALUE) exit(1);

if(!SetupComm(hComm, 4096, 4096)) exit(1);

if(!GetCommState(hComm, &dcb)) exit(1);

dcb.BaudRate = 115200;

dcb.ByteSize = 8;

dcb.Parity = NOPARITY;

dcb.StopBits = 0;

if(!SetCommState(hComm, &dcb)) exit(1);

}

void CloseComm()

{

CloseHandle(hComm);

}

DWORD WriteComm(char* buf, int len)

{

DWORD nSend;

if(!WriteFile(hComm, buf, len, &nSend, NULL)) exit(1);

return nSend;

}

void WriteCommByte(BYTE b)

{

WriteComm(&b, 1);

}

DWORD ReadComm(char *buf, int len)

{

DWORD nRec;

if(!ReadFile(hComm, buf, len, &nRec, NULL)) exit(1);

return nRec;

}

void main()

{

OpenComm();

// Initialize LCD 16x2

WriteCommByte(0x38);   // Used to select 8 bit mode

WriteCommByte(0x0F); // When display On cursor will be on

WriteCommByte(0x01);   // Clear the content of display

Sleep(2);

// Program for displaying "TECH" word

WriteCommByte('T'+0x80);

WriteCommByte('E'+0x80);

WriteCommByte('C'+0x80);

WriteCommByte('H'+0x80);

CloseComm();

}

//END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote