Information Technology Reference
In-Depth Information
int seg_val[8]={0x77, 0x12, 0x6B, 0x1F};
val=seq_val(count % 10);
/* mask-off the least-significant digit */
outportb(0x378,seg_val[val]);
16.6.13
Write a program counts the number of pushes of a button. The display should
show the value.
16.6.14
Modify the program developed in Exercise 16.6.13 so that it outputs the count
value to the parallel port.
16.6.15
Modify the program developed in Exercise 16.6.14 so that the display is incre-
mented when the user presses a button.
16.6.16
Write a program in which the user presses a button which causes the program to
read from the parallel port.
16.6.17
Write a printer driver in which a string buffer is passed to it and this is then out-
putted to the printer. The driver should include all the correct error checking (such
as out-of-paper, and so on).
16.7 Notes from the author
The parallel port is hardly the greatest piece of technology. In its truly standard form, it only
allows for simplex communications, from the PC outwards. However, like the RS-232 port,
it's a standard part of the PC, and its cheap. So, interface designers have worked under dif-
ficult circumstances to try and improving its specification, such as increasing its bit rate and
allowing multiple devices to connect to it at the same time, but it still suffers from a lack of
controllability. Anyone who has changed the interface of a device from the parallel port to
the USB will know how much better the USB port is over the parallel port.
The parallel port and RS-232 are the two top requests that I get from users, especially
related to project work. The Top 10 requests, in order of the most requests I have received,
are:
1. RS-232.
2. Parallel Port.
3.
6. Interrupt-driven software.
7. PCMCIA.
8. Network card design.
9. Visual Basic interfacing
10. Using buffered systems.
Converting a DOS program to Microsoft Windows.
4.
Borland Delphi interfacing.
5.
ISA card design.
One of the most amusing emails that I ever received related to an ISA card which I had
drawn. In the card, I had drawn a few chips, to basically show that it had some electronics
on it. So that the chips would not be confused with real chips I labelled one of them XYZ123.
One user sent me an email saying:
'Thanks for … Please could you tell me the function of the XYZ123 device. I have searched
for this component, and cannot find any information on it. Please could you send me some'
 
Search WWH ::




Custom Search