serial comm directly with hardware

I googled the cae archives and couldn't find exactly what I'm looking for. I need a Windows PC to communicate directly with an FPGA in a hardware system. There is no embedded CPU to talk to. I will define a simple protocol that will consist of 4-byte commands (24 bits of address plus one byte that defines read or write and a transfer byte count). The requirement is to allow the PC to read and write FPGA internal registers and a couple of SRAMs connected to the FPGA. We'd like to be able to communicate interactively one command at a time and also do batch transfers to/from files.

Is there an app that is customizable enough to do this (like ZOC or Procomm)? If not, what's the best/easiest way to develop an app on the PC? Will Perl or Tcl work?

Any help much appreciated. (Have mercy, I'm a hardware guy.)

Robert

Reply to
Robert Sefton
Loading thread data ...

Before you can begin discussing the app, you have to define how this FPGA is to be installed into the PC. The easiest would be to make an ISA board (if you can still get a PC with an ISA bus). The next easiest is to make a PCI board, but then you have to get into the details of plug-n-play. In either case you have to decide if the new hardware is going to appear as I/O or memory. Then you have to consider if the Windows PC is Win95/98 or Win2000/NT/XP. Win95/98 allows direct access to hardware by application programs. Win2000/NT/XP allows access only through drivers, which are a lot harder to write than application programs.

-Robert Scott Ypsilanti, Michigan (Reply through newsgroups, not by direct e-mail, as automatic reply address is fake.)

Reply to
Robert Scott

I guess I wasn't clear enough. The FPGA is part of a much larger multi-PCB system. The system sits in its own chassis and the PC must communicate through an RS-232 serial link. My question was how to buy/find/create an app on the PC to handle the communication.

Robert

Reply to
Robert Sefton

Hi, there are lots of terminal programs for the pc, like hyperlink.

Reply to
CBarn24050

I'm not sure about pre-existing applications which could be customised to suit your requirements.

Perl, Tcl, Python or any other scripting language would probably be usable to generate a small GUI and communicate with a serial port. The specifics on how this is done will obviously be language specific.

If you could possibly be interested in using Python, then the web page

formatting link
might be of interest. Under a heading of "Servo with a vengence", there is a picture which once clicked will show the source of a Python script which has a scroll bar. Whenever the scroll bar is dragged it's emitting to a serial port a byte to update a PIC based servo controller. The entire script is only about 20 lines long, it's definatly a lot quicker than writing the equivalent in C.

It would probably be the quickest route to produce something similiar with a text box or two etc which would allow you to exercise your FPGA design and display the results.

Thanks, Christopher Fairbairn.

Reply to
Christopher Fairbairn

Hi Christopher -

I grabbed your little Python script and will try to learn from it. I agree that a scripting language could be just the ticket.

Thanks,

Robert

usable

specifics

the

to

might be

picture

serial

is

the

with a

and

Reply to
Robert Sefton

If you are interested I have Visual Basic 6 code that you can use to setup your own serial communication. You would just have to add the specific commands that you need....easy to modify, like output = "Cmd1" if you are using ASCII commands

If you don't have Visual Basic but have Excel, I also have an Excel spreadsheet that uses the MSComm Control from Visual Basic that would allow you to do the same thing using Excel Macros in VBA. You'd have to download the MSComm Control from the Internet (its available).

I use these methods all the time to talk to MicroChip PICs.

Reply to
g9u5dd43_nospam

I'm definitely interested. That's exactly the kind of thing I'm looking for. My email address is rsefton*@*nextstate.com (take out the *s).

Thanks for the help!

Robert

address

The

registers

the

Reply to
Robert Sefton

I did something similar in 1995, but I had it easier than you do: I could boot a PC into raw MS-DOS, which lets the software get directly to the hardware. There were any number of third-party COM port libraries around; I used the Marshallsoft library with Microsoft C 6.0, and had it working over a weekend (and it WASN'T a full-time hack, either).

Marshallsoft is apparently still around.

formatting link
I have no qualms whatsoever about recommending their products, without reservation. They are definitely one of the Good Guys.

This is probably one of those times where you want to bring in a software guy who knows what he's doing.

Reply to
John R. Strohm

could boot a

hardware. There

weekend

I have

reservation.

John -

Great link, thanks. The libraries look great, but MarshallSoft also had a link to Virtual Integrated Design.

formatting link

They sell a tool called "RS232 Hex Com Tool" that looks perfect for what I need. It supports logging Rx data to a file and scripts to control Tx data. Hard to beat at $39.95.

Robert

Reply to
Robert Sefton

Thank you VERY much for posting that link.

Reply to
John R. Strohm

You might prefer to look at the pyserial package

formatting link
. It's basically a wrapper around serial access functions, so that the same python script can be used on windows, linux, bsd (and maybe Mac's and other *nix).

You might also want to look at other sorts of guis - direct GTK is fine in the linux world, but it is a little bit more awkward in windows. I'd recommend Tkinter as the easiest way to make simple guis, and then look at something more powerful (such as wx.Python or gtk) when you need it.

Reply to
David Brown

If you are looking for that sort of thing, you might like to try out realterm

formatting link
. It's free (open source), with all sorts of capture and conversion functions.

Reply to
David Brown

with

Wow, I've gotten some great information out of this post. God bless whoever dreamed up usenet!

Thanks.

Reply to
Robert Sefton

"Robert Sefton" ha scritto nel messaggio news:bplhcs$1pdl6n$ snipped-for-privacy@ID-212988.news.uni-berlin.de...

For that kind of works, I either write some Builder app myself, or use this:

TERM232

from

formatting link

It's free; you can display / log traffic in hex; you can setup some function keys to send precise hex sequences.

Reply to
Antonio Pasini

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.