Solved

outpw/outport

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
why "." vs "->" 23 119
Handle Exceptions during instantiation 28 411
ASP.net build a IF/Then Walkthrough Guide 1 192
Template syntax for variable length arrays 9 71
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now