serial comm directly with hardware

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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



Re: serial comm directly with hardware

Quoted text here. Click to load it

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.)


Re: serial comm directly with hardware
Quoted text here. Click to load it

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



Re: serial comm directly with hardware
Hi, there are lots of terminal programs for the pc, like hyperlink.

Re: serial comm directly with hardware
Hi,

Quoted text here. Click to load it

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
(http://hawthorn.csse.monash.edu.au/~njh/electronics/pic-tricks /) 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.

Re: serial comm directly with hardware
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

Quoted text here. Click to load it
usable
specifics
the
to

might be
picture
serial
is
the
with a
and



Re: serial comm directly with hardware

Quoted text here. Click to load it

You might prefer to look at the pyserial package
http://pyserial.sourceforge.net/ .  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.






Quoted text here. Click to load it



Re: serial comm directly with hardware
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.

wrote:
Quoted text here. Click to load it


Re: serial comm directly with hardware
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

Quoted text here. Click to load it
address
The
registers
the



Re: serial comm directly with hardware
Quoted text here. Click to load it

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.  http://www.marshallsoft.com/ I have
no qualms whatsoever about recommending their products, without reservation.
They are definitely one of the Good Guys.

Quoted text here. Click to load it

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



Re: serial comm directly with hardware

Quoted text here. Click to load it
could boot a
Quoted text here. Click to load it
hardware.  There
Quoted text here. Click to load it
weekend
I have
reservation.

John -

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

http://www.viddata.com /

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



Re: serial comm directly with hardware
Quoted text here. Click to load it

Thank you VERY much for posting that link.



Re: serial comm directly with hardware
Quoted text here. Click to load it

If you are looking for that sort of thing, you might like to try out
realterm  http://realterm.sourceforge.net/ .  It's free (open source), with
all sorts of capture and conversion functions.





Re: serial comm directly with hardware
Quoted text here. Click to load it
with

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

Thanks.



Re: serial comm directly with hardware
Quoted text here. Click to load it

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

TERM232

from www.industrologic.com

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



Site Timeline