EmbDev.net

Forum: FPGA, VHDL & Verilog Basic Codes to display on LCD of Altera DE2 Board


von Afkar O. (Company: nanyang polytechnic) (afkarsosman)


Rate this post
useful
not useful
Hi,

My name is Afkarosman, I'm a third-year student in a Polytechnic doing 
Electronics, Computer and Communications. Currently on my last lap of 
doing FYP(Final Year Project).

I was tasked to design a module to display numbers, characters and also 
user-defined patterns on the LCD of Altera DE2 Board. I was told to do 
ModelSim to start off.

I am having some troubles starting the codes, as I have never done 
anything in VHDL, so this is basically my first time. I have read on 
some article but I'm still lost and clueless as what is to be done.

If any of you guys could help me design a basic code to display a number 
to the LCD would really give me a jumpstart. It would be much 
appreciated thank you.

Regards,
Afkarosman

von Theor (Guest)


Rate this post
useful
not useful
The main objective here in the forum is to "help someone to help 
himself". This requires at least a grade of knowledge which covers the 
issue at a level which allows one to lay a ground. Another case are 
issues, where one is quite educated regarding an issue but misses a 
single detail.
Though, often people answer to questions like yours by posting code.

But, - I am sorry -, the fact that you where assigned a project without 
having any experience or knowledge, is at least in need of an 
explanation.

It could, for instance, mean that your task definitely includes 
acquiring knowledge about VHDL, in which case, simply posting code is a 
kind of help you cheating or that you, for whatever reason, missed the 
courses.

However, I wish you success.

von Afkar O. (Company: nanyang polytechnic) (afkarsosman)


Rate this post
useful
not useful
Hi Theor,

Im glad you replied, well the thing is in this country I'm in, we 
third-year students in Polytechnic will have 3 months of FYP, either in 
development of a project or simply a new project to work on. It's a 
weird practice, but we are supposed to learn on our own the basics of a 
new language. To well give us the 'feeling' of how learning on your own 
feels.

Some are needed to learn how to program using Arduino, some using 
Raspberry Pi. As for me, I have some knowledge of C languages as I have 
learned it since the start of year 1 but in alternate semesters.

So a student being given a project that he/she has little or no 
knowledge of for their FYP is the norm here. I'm just 'lucky' to get a 
project to work on VHDL. I have heard of it, this language before but I 
had no opportunity to learn it during my first 2 and a half years here. 
They have given me some articles to read up on, but they did only little 
to help me.

Why I asked for basic codes to just display to LCD is because I can 
maybe read up and reverse engineer on them and have the basic skeleton 
up the least. I too will be needing help from professionals like you 
guys to clarify some of my doubts if I have some.

Nonetheless, I thank you for your time in reading this and also your 
doubts. I hope I got them clarified.

Regards,
Afkarosman

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Afkar O. wrote:
> I have never done anything in VHDL, so this is basically my first time.
Ouch, then it is a very tricky and very steep start...

> If any of you guys could help me design a basic code to display a number
> to the LCD would really give me a jumpstart. It would be much
> appreciated thank you.
I would say, you should start very earlier: with a simple and stupid 
blinking LED.

But if you simple want to copy some code you can try to adapt this here 
to your board:
Beitrag "Re: EA DOG-M initialisieren"
Its designed for a LCD with 4-bit interface on a Xilinx eval board, but 
with a little thinking its easily adapted to an 8-bit interface.

One you must keep in mind: without any knowledge about the toolchain 
and the design process it is like driving a formula 1 car blindfolded...

von Afkar O. (Company: nanyang polytechnic) (afkarsosman)


Attached files:

Rate this post
useful
not useful
Hi Lothar Miller,

Thank you for your speedy reply.
Yeah I do know that I'm going on about this blind. Nonetheless, thank 
you for the sources. I appreciate it.

I did some snooping around of the previous student documents, managed to 
find her codes though. Maybe I can start from there?

It would be much appreciated if you guys can check it out. She did a 
24hour format clock. And only much I know of the codes, tried to get 
ahold of her but she seems to be overseas.

Please tell me what I can use and what I cannot use from her codes? It 
might help me get to the next step.

Regards,
Afkarosman

von Theor (Guest)


Rate this post
useful
not useful
Hi Afkar, (if not Osman is your first name),

i appreciate your politeness and understanding of my motives.

However, I am not convinced of your course of action.

Even in case you where presented a code, you will not understand it nor 
being able to "reverse engineer" it if you do not have any knowledge and 
experience, at least with simple singleton cases. On the other hand, is 
a code describing output some characters on a LC-Display not very far 
away from, resp. "only" a special case, of some basic structures and 
description paradigms.

It's natural that, in the beginning, the amount of details seems 
overwhelming and unmanageable. And using a hardware description language 
needs a profound, or at least non-trivial knowledge and experience in 
digital electronics as well. Hope, thats the case with you, as otherwise 
the learning curve would be steeper.

But I am quite sure, that a project like yours may be finished within 3 
months starting from a point I mentioned above, assumed that VHDL is the 
only new matter to you.


A good survey about FPGAs at all may be found at 
https://www.altera.com/en_US/pdfs/literature/misc/FPGAs_For_Dummies_eBook.pdf 
but that does not cover VHDL.

I searched for "VHDL for Dummies" which, among other hits, led me to: 
https://www.nandland.com/vhdl/tutorials/tutorial-introduction-to-vhdl-for-beginners.html
As far as I can see at a glance, it covers most important basic details, 
which shall enable you to realize common digital combinatorial and basic 
sequential logic.

You also seem to need, to get into the state machine paradigm and how it 
is realized in VHDL.

Thats, what I expect you to need for the project. Some combinatorial 
logic which may sum up to some amount and at least one state machine 
(probably a combination of state machines is more appropriate to that 
project).
You didnt mention the receiving part of the project (the part, which 
receives the information to be displayed) but if one assumes that being 
a simple rs232-interface for instance with some protocol, a state 
machine for byte decoding and line handling and another one for the 
protocol will suffice.

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Afkar O. wrote:
> Maybe I can start from there?
Pls. post the files once more with file extension *.vhd instead of *.bak
Then its able to have a look at that code.

> Maybe I can start from there?
Is it for the same hadrware platform?
If so, then get that design to work. Then you can decide whether you can 
use it or not. But as I said: if you don't start with much more simple 
things you will be at loose ends every hour...

von Afkar O. (Company: nanyang polytechnic) (afkarsosman)



Rate this post
useful
not useful
Hi Lothar Miller,

Here are the files you requested.
Thank you for taking the time to look into it.

Regards,
Afkarosman

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.