Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Sinh Viên

Altera_Forum
Honored Contributor II
1,010 Views

Dạ em chào các anh chị. Em là sinh viên ngành Điện tử - viễn thông.  

Hiện em đang làm đồ án Hệ thống Nhúng với board De2, đề tài của em là MẠCH ĐẾM SẢN PHẨM bằng xung clock, khi ấn key có xung clock hoặc enable thì sẽ đếm lên 1 và hiển thị ra led 7 đoạn, mạch đếm có reset. 

Em viết ngôn ngữ C trên Eclipse của Quartus. Em có đoạn code này, tuy nhiên nó tự động đếm lên. EM MUỐN THÊM VÀO KHI ẤN KEY HOẶC SWITCH THÌ LED MỚI ĐẾM LÊN 1 ĐƠN VỊ Ạ. 

Anh chị nào biết, xin chỉ dạy cho em với ạ! 

Em chân thành cảm ơn Ad và mọi người! 

 

0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
320 Views

Can you post your questions in English? That'll probably get you an answer sooner. 

I ran it trough a translator and understand you have a problem with detecting keypresses in software? Your assignment however sounds a lot like it is an HDL assignment. What are you trying to do?
0 Kudos
Altera_Forum
Honored Contributor II
320 Views

Thanks sir. I'm a student. My major is electronics and telecommunications egineering. 

I am working on the Embedded System with De2 board, my topic is CIRCUIT COUNTING PRODUCT by clock, when the key is clocked or enable, it will count up 1 and display 7 segment LED, reset. 

I wrote the C language on Eclipse of Quartus. I have this code, but it automatically counted up. YOU WANT TO ADD TO KEY OR SWITCH COMMAND, SO THAT WHEN I PRESS THE KEY OR SWITCH, LED WILL COUNT UP TO 1 UNIT. 

Do you know, please teach me! 

I sincerely thank Ad and everyone!
0 Kudos
Altera_Forum
Honored Contributor II
320 Views

 

--- Quote Start ---  

Bạn có thể đăng câu hỏi của bạn bằng tiếng Anh không? Điều đó có lẽ sẽ giúp bạn có được một câu trả lời sớm hơn.  

Tôi chạy nó trough một dịch giả và hiểu bạn có một vấn đề với việc phát hiện các phím bấm trong phần mềm? Bài tập của bạn tuy nhiên âm thanh rất nhiều như nó là một bài tập HDL. Bạn đang cố gắng làm gì? [/ QUOTE]
0 Kudos
Altera_Forum
Honored Contributor II
320 Views

Connect the switch to your processor on a gpio, then use either an interupt or poll the pin to determine a press. Don't forget to debounce.

0 Kudos
Reply