Solved

outpw/outport

Posted on 1997-01-28
1
715 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

739 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