6

I'm using a DSP to control a sensorless brushless DC motor, The DSP is on a board which has a parallel port and 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

Ayeayeron
  • 419
  • 4
  • 18

2 Answers2

6

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.

RHaguiuda
  • 2,981
  • 9
  • 34
  • 53
2

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.

Paul R
  • 195,989
  • 32
  • 353
  • 519
  • Parallel port communication is very difficult on Windows NT based operating systems. I used to use the parallel port for all my microcontroller projects, but switched over to serial a few years back because of this. – Optimal Cynic Jun 30 '11 at 09:26
  • @Optimal: there are solutions for this e.g. http://logix4u.net/Legacy_Ports/Parallel_Port/Inpout32.dll_for_Windows_98/2000/NT/XP.html – Paul R Jun 30 '11 at 10:48
  • That's true, and I've used that very DLL in the past. It doesn't work so well with USB/LPT adaptors though, and it's getting harder to find PCs with parallel ports (especially laptops). – Optimal Cynic Jun 30 '11 at 11:31
  • @Optimal: yes, USB seems to be the more modern alternative, and there are quite a few USB hobbyist interfacing boards available these days – Paul R Jun 30 '11 at 12:23
  • I believe most of those are the guts of a USB to serial adaptor, at least the TTL side of it. – Optimal Cynic Jul 01 '11 at 19:57