Results 1 to 5 of 5

Thread: Sinh Viên

  1. #1
    Join Date
    Apr 2018
    Posts
    3
    Rep Power
    1

    Default Sinh Viên

    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!

    Attached Images Attached Images
    • File Type: png 1.PNG (12.2 KB, 11 views)
    • File Type: jpg 2.jpg (19.8 KB, 6 views)

  2. #2
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    513
    Rep Power
    1

    Default Re: Sinh Viên

    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?

  3. #3
    Join Date
    Apr 2018
    Posts
    3
    Rep Power
    1

    Default Re: Sinh Viên

    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!

  4. #4
    Join Date
    Apr 2018
    Posts
    3
    Rep Power
    1

    Default Re: Sinh Viên

    [QUOTE = PietervanderStar; 237570] 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]

  5. #5
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    513
    Rep Power
    1

    Default Re: Sinh Viên

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •