Andrrr27 0 January 13 Posted January 13 · Report post Уважаемые знатоки, дали задание на лабораторную работу. Нужно подключить usb мышь на плату de2-115 и сделать подобие счётчика, при нажатии лкм +1, при нажатии пкм -1, вообще никак не могу понять как именно это сделать, уже перечитал все статьи. Можете помочь, пожалуйста, может кто-нибудь занимался этим ради прикола...:insane: Quote Share this post Link to post Share on other sites More sharing options...
makc 312 January 13 Posted January 13 · Report post Для начала почитайте документацию, там описан пример, который содержит 99.999% решения вашей задачи: Цитата 6. 3 USB Paintbrush USB port is widely used in many multimedia products. The DE2-115 board provides a complete USB solution for both host and device applications. In this demonstration, we implement a Paintbrush application by using a USB mouse as the input device. This demonstration uses the device port of the Cypress CY7C67200 chip and the Nios II processor to implement a USB mouse movement detector. We also implemented a video frame buffer with a VGA controller to perform the real-time image storage and display. Figure 6-3 shows the block diagram of the circuit, which allows the user to draw lines on the VGA display screen using the USB mouse. The VGA Controller block is integrated into the Altera Avalon bus so that it can be controlled by the Nios II processor. Once the program runs, the Nios II processor is started as it will detect the existence of the USB mouse connected to DE2-115 board. When the mouse moves, the Nios II processor is able to keep track of the movement and record it in a frame buffer memory. The VGA Controller will overlap the data stored in the frame buffer with a default image pattern and display the overlapped image on the VGA display. Quote Share this post Link to post Share on other sites More sharing options...