Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1182 Discussions

Read data from an Ax-12 actual

Honored Contributor II

Hi everyone, 


I'm using this servo: 


Using a DE2 and a few modules I wrote in VHDL, I send it commands (called an instruction packet) and it sends back it's status (called a return packet). It's all in pages 10-11.  

I was wondering, how could I see the data that it sends? Is it possible to send the data I receive from the servo to a computer and use a program to read it? 

One solution would be to use the LEDs on the DE2 but that would be a problem if I send it consecutive commands (the rate is 1Mbps). 

Is there maybe some other idea? 


0 Kudos
1 Reply
Honored Contributor II

Hello nettek, 


What you are trying to do is not so easy to get a reliable result. 


My first tip would be: use small steps to get where you want to go. 

You might start by connecting the data ttl output of your fpga to the input.  

Then you can send your own messages, 1 by one and read your own output back in. (you can even start with 1 character and make longer messages as you go) 

This you can do even with lower baud rates and at your own pace; you trigger 1 message, send it and read it back in, and then stop for analysis of the result. 

Now as far as displaying your input messages: there are 7-Segment displays on your DE2. You could read the input data into an VHDL/VERILOG array of bytes and then display the message 1 byte at a time on this display. With the available press-buttons you could scroll through the message byte by byte.  

The first 2 digits of the 7-seg could show the address (index in array), the other ones could show the received data bytes. 

What is also a good way to proceed is to use a counter to see how many bytes (or bits) were sent and how many were received. 

By using the switches on your DE2 you could display the counters or the data in the array. 

Sending 1 Mbps to a PC is possible, but it might result in a more complex task than the task you are trying to do at this time.  

There is also a RS232C port on your DE2, you can use it to send your messages at a lower baud rate to a pc, let the PC play the roll of your device while it registers all input and output to a file. This is a way I would do it but it has something to do with my experience in writing PC communication protocols.  

Good luck, 

0 Kudos