Question

In: Electrical Engineering

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

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 )

Solutions

Expert Solution

#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


Related Solutions

I am trying to write the code for an 8 bit adder in VHDL so that...
I am trying to write the code for an 8 bit adder in VHDL so that I can program it onto my Elbert V2 Spartan 3A FPGA Development Board, but I keep getting errors. Any ideas what I am doing wrong? library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity adder8bit is Port ( a : in STD_LOGIC_VECTOR(7 downto 0); b : in STD_LOGIC_VECTOR(7 downto 0); cin : in STD_LOGIC; o : out STD_LOGIC_VECTOR(7 downto 0); cout : out STD_LOGIC); end adder8bit; architecture Behavioral...
I am trying to write a program in Java: Pick 4 cards and display the cards...
I am trying to write a program in Java: Pick 4 cards and display the cards and their total value (Ace = 1, King = 13, Queen = 12, and Jack 11...etc. , BUT you should check that no card is a duplicate... there is only one "Ace of Spades" per deck for example. I need to utilize the displayMenu so the program continues to run for the user without breaking. My program is not running correctly. import java.util.Scanner; import...
I am currently pursuing my chemical engineering degree. I want to know, if i want work...
I am currently pursuing my chemical engineering degree. I want to know, if i want work in chemical industry in future, what are the most important Subject (specific topic) / concept which are important from industry perspective (list them). Also list some of most important book that every chemical engineer should have. Thankyou!!
This is Using MATLAB: I am trying to store the solution of this matrix because I...
This is Using MATLAB: I am trying to store the solution of this matrix because I want to do something with the result like find the norm of that answer however I am stuck and cannot seem to be able to. Help would be appreciated! --------------------------------------------- MATLAB CODE: close all clear clc A = [1 -1 2 -1; 2 -2 2 -3; 1 1 1 0; 1 -1 4 5]; b = [-8 -20 -2 4]'; x = gauss_elim(A,b) function...
I am working with LCD HD44780 using pic18F1320. Can some provide me with the initialization code...
I am working with LCD HD44780 using pic18F1320. Can some provide me with the initialization code for LCD. Or the code I have to write to initializied LCD.
PLEASE THIS IS THE THIRD TIME I AM POSTING THIS QUESTION I WANT A COMPLET WORK...
PLEASE THIS IS THE THIRD TIME I AM POSTING THIS QUESTION I WANT A COMPLET WORK SO I CAN GET GOOD GRADES analyze at least three different marketing examples that will help inform marketing plan. 1 What product or service is being marketed 2 What media each uses for marketing the service? 3 How effective the marketing is for you the potential consumer (support why with specifics)? 4 Why is each company marketing and why did they choose the style...
I am trying to implement a search function for a binary search tree. I am trying...
I am trying to implement a search function for a binary search tree. I am trying to get the output to print each element preceding the the target of the search. For example, in the code when I search for 19, the output should be "5-8-9-18-20-19" Please only modify the search function and also please walk me through what I did wrong. I am trying to figure this out. Here is my code: #include<iostream> using namespace std; class node {...
I am trying to make a temperature warning system in LabVIEW. given temperature T, I want...
I am trying to make a temperature warning system in LabVIEW. given temperature T, I want a green light to turn on when temperature is less than 75 degrees. when the temperature is between 75 and 90 degrees, i want a yellow light to turn on. when the temperature is greater than 90 degrees, I want a red light indicator to turn on. how would this case structure look like in LabVIEW?
I am using a Macbook and trying to use the terminal and a VIM editor to...
I am using a Macbook and trying to use the terminal and a VIM editor to create program. This program will allow you to enter the costs of each ingredient and product, then prompt for the amount of each ingredient bought (individually by ingredient) and product sold (also individually), and from there show profit or loss, as well as profit on average for each unit sold. There will be say, 2 ingredients to buy and 3 products to sell. Please...
I am trying to work a statistics problem for decision modeling class. The main question is:...
I am trying to work a statistics problem for decision modeling class. The main question is: Consider the experiment of drawing two cards without replacement from a deck consisting of only the ace through 10 of a single suit (for example, only hearts). Q - Define the event Ai to be the set of outcomes for which the sum of the values of the cards is i (with an ace = 1). List the outcomes associated with Ai for i=...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT