开发者

Interface between a DSP/Microcontroller and a PC application

开发者 https://www.devze.com 2023-01-03 17:36 出处:网络
I\'m using a DSP to control a sensorless brushless DC motor, The DSP is on a board which has a parallel port and开发者_如何学Python a jtag connection (it\'s an eZdspTMS320F2812). What would be the bes

I'm using a DSP to control a sensorless brushless DC motor, The DSP is on a board which has a parallel port and开发者_如何学Python a jtag connection (it's an eZdspTMS320F2812). What would be the best way to communicate between a PC application and the DSP as it was running? Ideally I'd like to have a GUI program with buttons like start, stop, accelerate, decelerate... but I've never done anything like that before. Which ports and method would be easiest to use? Thanks


You can also use simple RS232 communications. I use always because it`s cheap and easy to implement.

The RS232 transceivers are very cheap (like MAX232 from Maxim-IC), and easy to use. Also they come in many packages like DIP or SOIC for example and can be found almost every electronic shop.

You can use any USART from your microcontroller to link with MAX232. Then, using a PC serial-usb converter (or if your PC does have a serial port it`s easier), you can use serial port programming from any programming language to develop your desktop application.

After that, all you have to do is create a protocol to exchange data between your PC programm and your DSP (some simple commands to start, stop and change motor direction for example).

Good luck in your project.


The parallel port is probably the easiest route. Depending on what OS and programming language you are using you should be able to find example code or libraries to support bi-directional communication via the parallel port. Since you have a small set of commands that you might want to send to the DSP board then you can probably just send a single character to the board for each command, e.g. 'R' = start, 'S' = stop, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消