Solved

outpw/outport

Posted on 1997-01-28
1
717 Views
Last Modified: 2008-03-10
I am attempting to access a card on the ISA bus using Borland C++ 3.1's outpw() and outport() commands, but in both cases the I/O write line goes low (active low) twice while the address is still valid causing the wrong values to be latched because the data is no longer valid on the second strobe. However, that only happens when I attempt to do 16 bit transfers, eight bit transfers work like a charm. Am I doing something wrong or is this simply how the two byte transfer works and I simply have to design around it. Please reply by email.
0
Comment
Question by:robertsb110896
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
michaelf earned 50 total points
ID: 1162204
Hi.
Actually it is not about C++ or borland, but
just about ISA bus. ISA bus designed to work
with old style 8-bit devices as well as 16-bit
devices. And I/O device (slave) must tell
CPU (master) wether it is capable to accept /
transmit 16 bit data or just 8 bit.
If it is 8-bit device and program is using
16-bit I/O instructions (using Borland
outpw(), for example) CPU will transfer
data byte by byte: first low order byte
to the specified port, then high order
byte to the port with address greater by
one. I believe it is your case.

If you want to receve 16 bit of data
at once, you have to assert special
signal that tells that it is 16-bit
slave device. I do not have ISA bus
description with me, but according
to the brief table I do have it is
"I/O 16 chip select : D2". You have to
check it using complete ISA bus
description.
  Regards,
      MichaelF

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question