Solved

_outpw

Posted on 1998-10-22
4
237 Views
Last Modified: 2008-02-01
I want to write on two 8 bit ports (like parallel) at the same time, one at address 0x600 and the other at address 0x601. I think to use _outpw(0x600, value). Is it right?
In what order is "value" copied?
0
Comment
Question by:css
  • 2
4 Comments
 
LVL 3

Expert Comment

by:arnond
ID: 1175736
It should work, the order depends on your code, which -outputw() is written first.
0
 

Author Comment

by:css
ID: 1175737
I would like to find somebody who tryied that!!!
0
 
LVL 1

Accepted Solution

by:
bculver earned 300 total points
ID: 1175738
The answer is Yes... doing an outpw(0x600,val) to an 8 bit device will do two sucessive writes, First write will be the low byte of val to address 0x600 the second write will be the hi byte of val to address 0x601. (Graphics programmers use this technic all the time to control the graphics controller chip.)

basically the i/o device sets the processers BS8 or BS16 pins to state its size 8 or 16 bit. the processer will automatically handle the rest using its BHE / BHL signals. If you want to know more details refer to a microprocessor manual and how the BS8/BS16 pins work and how the BHE and BHL signals are used as address line 0 on 8 bit devices.
 

0
 
LVL 3

Expert Comment

by:arnond
ID: 1175739
As I said, it works.
( I think the points should be mine...)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

758 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

21 Experts available now in Live!

Get 1:1 Help Now