EmbDev.net

Forum: FPGA, VHDL & Verilog Moving a square on VGA monitor VHDL


von Cristina E. (Company: UPB) (elecrocataru)


Rate this post
useful
not useful
Heloo. I managed to generate a square on the monitor, but I want it to 
move alone on the monitor. do you have any idea how I should write the 
process?

von Homework_Service @ Caffeine (Guest)


Rate this post
useful
not useful
- Make the coordinates for your square change over time.
- Bonus: Detect when your square collides with the screen boundaries and 
invert the moving direction of x or y accordingly.

Regards,
gustl

von mUzerO0x2FDD (Guest)


Rate this post
useful
not useful
break down you problem into smaller pieces. don't try to move a square, 
instead try to move a single pixel...

von Lothar M. (lkmiller) (Moderator)


Rate this post
useful
not useful
Cristina E. wrote:
> do you have any idea how I should write the process?
Its not the problem of how to write "the process". Maybe you don't need 
an additional process at all. Or maybe you need 4 more processes. That 
depends on how the code looks now...

> I managed to generate a square on the monitor, but I want it to
> move alone on the monitor.
It goes more to the deep: how do you generate a picture on the screen? 
and how do you generate a square in that picture? And what parameters 
determine the position of the square? And how can you make those 
parameters variable?

: Edited by Moderator

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.