PS2 Keyboard interface runs smoothly in Active-HDL simulator, but not working on Nexys2 Board - vhdl

I have to make a PS2 Keyboard Controller project at the university and i encountered a few problems when trying to test the system on the FPGA board.
It had worked perfectly in the simulator of Active-HDL, but i am not sure what it might be that stops it from working on the board, because when i try to program the board, the .bit file gets uploaded, but it does not react when i plug the PS/2 Keyboard in it and try to press a key.
I thought that probably a problem might be related to the PS/2 Keyboard protocol or the way it is synthesized for the board, but i really do not know.
The source code is here https://wetransfer.com/downloads/1d000a9feb241ff84693fca2084b0e9a20180513165005/8f7ca4 and the top level is called "ps2_top_src".
I am sorry for the way of uploading the code, but i couldn`t make it upload anywhere else.

Related

Can't connect to D1 Mini with Micropython after running a program

I'm using D1 Mini with micropython
It happens a lot that I upload some code that has a main loop in it, and afterwards I lose connection to the board
I can see the console output, but can't see the files, can't burn a new firmware, can't stop the code from running, anything...
If I press ctrl+c or ctrl+d it holds for a second, then continues
I'm using a raspberry pi and Thonny for the development
Same from esptool and ampy
Tried looking for an answer online, but couldn't find anything relevant
What can I do?
What I do in my apps- I add time.sleep(3) at the beginning of my application. And when I wish to do code upload, I connect to the board, press CTRL+D for soft reset and CTRL+C to kill code. Then do upload required code. This approach works best for me.
Moved from pi to windows, I was able to delete and write the firmware again using esptool
The only thing is that now I have to press the reset button while connecting the USB so the computer will recognize the controller

st link utility cannot stay connected to the device

So, I'm trying to connect to a custom board using ST-Link. My board uses STM32 Microcontroller and I use ST link utility software to see if I can connect to it.
Right now, If I press connect on utility software and press reset on my board at the same time, the connection is successful. But as soon as I remove my finger from the reset button the connection to the device is lost. Is this expected? And how can I make it stay connected without me keeping the reset button pressed!
Also, assuming I keep pressing it, the utility software gives me an internal command error when I try to erase chip. this happens when I try to program the chip as well.
Any suggestions are appreciated.
So the way to resolve the issue was to pull-up the NRST pin on the board and st link and disconnect it after pressing the reset button.
I still have not found a solution for erasing the chip but I believe the flash is protected. When I try to change the Option Bytes in st link utility, it disconnects from the board saying:
Could not set Option bytes!
Please reset the target and retry!
And then disconnects from the device.
Any clues how I can change the options bytes? That might actually solve the problem!
Thanks
By my experience all of such this problems come from bad assembling one way that may help you to find out first put a light in the back of your PCB right under your micro-controller and see if any pin is outside of footprint if it is aligned correctly,gently press your micro to the PCB and and test if it is disconnecting if it solves your problem then some of pins are not soldered correctly

Unity Game View support Touch Events?

I would like to buy me a Microsoft Surfacebook. But bevore I would like to know if Unity IDE support Touch Events in the Game View of the Editor? Or only if a real device is connect? But the monitor itselft is a touch device.
Thanks for help!
Regards,
Markus
Few days, there was a similar question about touch detection in Unity using Windows tablets.
There is no support for the touch. Input.touches and Input.GetTouch will not work in the Editor Game View. It will only work when you deploy the Game.
For some reason, touches are treated as mouse input.
This shouldn't be a problem at-all because Input.mousePosition and OnMouseDown will work on it so you can use pre-processor to detect when in Editor mode then use input.mousePosition and OnMouseDown and then be able to test your app without having to build it.
Everything else should be fine. Remember, it is not a real computer. It is a mobile computer and is weaker than a real computer. Don't expect a 4K texture game to run smoothly on this device.

USB device opens Applications, then types in text field

I got a letter in the mail that contained a small USB device. Here is what it loks like: http://imgur.com/a/VEtNK
When I plug it into my computer it seems to hover over the programs in my Dock and then opens one. It then types a link into a text field that is available. I originally had Skype in the dock and it defaulted to that one, strange. I removed Skype from the dock and now it opens to System Preferences.
Here's a video of what happens as I plug it in: https://www.dropbox.com/s/yuw6ggvo77rkvwh/Test1MysteryDevice.mov
Also, it does not appear like a memory stick does on my computer. I can't seem to locate it when it's plugged in. It would be cool if I could find it somehow. It would be even cooler if I could program it to do something I wanted.
Thanks, and if anyone can help out that's awesome or if you could point me to a forum/anywhere that might be able to help out, that'd be great!
Probably it self-identifies as a HID (Human Interface Device), specifically a keyboard. As soon as it is accepted as a keyboard by the OS it can send any sequence of keystrokes, and the OS will assume that it is input from a human user.
Scripting such behavior is easy using Applescript.
However automatically running a program from a USB stick when it is inserted is supposed to be impossible on OS X, as auto-run is a security risk.
Of course at the very least a custom USB device could be made to act like a mouse and keyboard, so even without autorun it's a risk to plug strange devices into your computer.
To get more info on the device you can go to System Profiler and look for the device on the USB bus.
If it is a custom device pretending to be a keyboard then it's probably hardwired to do what it does, and you probably won't be able to reprogram it; you'd need to find a manufacturer that will sell you customized devices.

How do I go about writing a windows driver for a bluetooth device?

I am looking for some advice/input on writing a device driver. I have never written one for windows before, let alone for bluetooth.
Can you recommend a book or website or something to get me started? I have the windows driver kit, and the examples therein but with out some place to start I am dead in the water.
The specifics: My friend gave me his mac Magic Mouse. I have a windows 7 machine. With the mouse set up as just a generic HID device it works ok as a two button mouse with no scroll, the motion is smooth and the acceleration what you expect in a windows mouse.
The mouse actually has a fairly good lpi resolution, making it pretty sensitive. There are mac drivers available, extracted from bootcamp. They kind of work. The cursor will randomly freeze or stop responding to the mouse's movement, which is buffered, and then leap once whatever has caused the stall stops. As an added touch the mac drivers make the cursor move like it would on a mac, with that logarithmic acceleration, that will completely throw off any windows user. With the driers you get vertical and horizontal scroll, but that's it. There is no multi touch functionality, and you can't change any of the behaviors, like acceleration. There isn't multiclutch for windows, or other 3rd party software for a multi touch mouse.
So I figured I would endeavor to make my own drivers and multi touch functionality in windows for this thing. I know mac will never support it properly under windows and windows won't write there own drivers until there is a reason.
Also if any one knows of any one else trying to do the same or similar things, point me to them.

Resources