Society of Robots - Robot Forum
General Misc => Misc => Topic started by: krockhouse on January 16, 2010, 02:15:12 PM
-
I am making a robotic turret that can shoot an airsoft gun. Our goal is to make it autonomous but for now I wanted to use a keyboard. So I got a PS2 P-mod to attach to the FPGA and I have no knowledge of UART and am finding it pretty hard to understand. Is there anyone who has used UART and could give me a short description of how I could use it to control my turret's servos?
-
Hi krockhouse,
I have used UART and controlled servos, but I have a few questions before I could help you any further;
1. Why do you need to use UART? Is it because thats the way to talk to the keyboard? (I've never interfaced to a keyboard before).
2. You need PWM, not UART to control servos. Unless if you are using a servo controller module that receives instructions through UART / serial. So are you going to connect the servos directly to your FPGA or use something in between?
I'm sure there are sites that explains UART / serial comm all over the internet. Google it up.
-
The servos are controlled using the FPGA and I was going to code the FPGA to recieve the signals from the keyboard and change the servo timing which in turn moves the servos. I wrote code that controls the servos by way of buttons and switches that are already on the FPGA board so the servo control aspect is down I just need to figure out how to recieve the signals from the keyboard and implement them in the control part, possibly through a counter of some sort that counts the keyhits of the arrowkeys and increases or decreases the angle of the servos.
-
Hi krockhouse,
So what you need now is the keyboard to FPGA interface ya? Hmm... I've never done this before, but upon googling around, I now understand why you need UART.
Unfortunately, I dont think I could help you any further. I have no idea on implementing UART on an FPGA. I suppose you will need to make your own UART code / bit-banging. But considering the fact that UART are very widely used, I'm sure there are pre-built modules for it, either by the FPGA developer or somewhere on the net.
If you ever think of using a PIC instead, then I should be of more help :)