亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ide-8255.txt

?? 用8051單片機實現IDE總線 程序簡潔易懂
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
How to connect an IDE disk to a microcontroller using an 8255
=============================================================


Introduction
============

Some time ago I have dropped that I had connected an IDE harddisk
to one of my microcontrollers. This has provoced a response that
I had not forseen. Since that day I have received some one to two
e-mails a day requesting more details about what I had done. At
first I have mailed a more or less cryptic decription of my
interface to some of the requesters. That only resulted in more
e-mail asking for more details. As it seems some people out there
are really interested in how my contraption is made. In this
description I will attempt to satify the information-hunger of
all you out there who's appetite I seem to have awakened.

This interface first came to my mind when I re-read some old, old
computer magazines. In one of them, the German magazine called
C't there was a short description of how and IDE interface is put
together. This is in the November issue of 1990. The article
describes an IDE interface for both the PC-XT(!) and the PC-AT.
The circuit diagrams of the article indcate that the hardware of
an IDE interface is in fact very simple. It is essentially a data
bus extension from the PC-AT bus to an IDE device. For a PC the
hardware comes down to some bus buffers and some decoding. When a
disk is connected as an IDE device the PC-AT still 'sees' the
old-type control registers of the ancient MFM disk controller. In
the article the entire interface is implemented using simple TTL
chips. The main problem in a PC seems to be how to keep the
harddisk interface and the floppy interface from colliding on
some register addresses. If the IDE interface is implemented
based on some controller system this is of course no problem.

From a controller point of view an IDE interface could be
described as a set of I/O ports. The IDE interface has a 8/16
bits I/O bus, two /CS lines, a /WR and /RD line, three address
bits and one interrupt. In this description I assume the most
traditional IDE interface. In later IDE interfaces a series of
nice so-called PIO modes where added. These PIO modes add things
like a ready line, DMA facilities and higher speed data
transfers. As you read on you will understand that I only use the
so-called PIO mode 0. This is the slowest communication modus on
an IDE bus. It is also the easiest one to implement. The data bus
on an IDE interface is used mostly for 8-bits transfers. Only the
real disk data reads and writes use the 16-bits bus in full
width. You COULD even implement an IDE interface with an 8-bits
only data bus. That would mean that you use only half the disk
capacity (the lower bytes of the 16-bits-wide bus) but that
should work.

When scanning the net I did find an implementation of an IDE
interface for 8-bit controllers. This interface was for a (hope I
have this correct..) COCO bus. It was implemented in TTL, just
like the magazine's interface. The main idea was that whenever a
(16-bits) word was read from the IDE bus the upper 8 bits where
stored in a latch. The controller could retrieve them from the
latch later. Writing to the IDE bus was implemented in the same
manner. The IDE bus read/write cycles where in fact simple bus
read and write cycles. At first I was about to copy this design.
When thinking about it I thought that this TTL design was too
complex for what I wanted to do. You need quite some TTL to
implement a 16-bits read/write I/O port in TTL on an 8-bits
controller.


Hardware description
====================

When implementing a 16-bits I/O port all you need is a
bidirectional I/O port and some control bits to generate the /RD,
/WR etc... That is when the 8255 came in view. An 8255 has 3
8-bits I/O ports. It can be switched from output to input and
back under software control. I used 2 of the 8-bits I/O ports for
the data path and use port to generate the IDE control signals.
The 74HC04 came into the design later. Once I had the controller
and the 8255 strapped together with the IDE connector and a disk
I found out that the 8255 has a nasty trait. Whenever you switch
the I/O modus of the chip it resets ALL its memory bits. That
includes ALL output signals too. For the data bus that is not so
much of a problem. The control signals get a real shake when this
happens. In particular: The /RESET line of the interface is
activated. That makes all control of a disk on this interface
impossible (the disk gets a reset at all kinds of odd
moments...). I have solved this by simply inverting all the
control signals from the 8255 to the IDE bus. When the modus of
the 8255 is switched all outputs of the chip go to '0'. That
means that all the (low-active) control signals are made inactive
by the inversion. That is -in fact- the state where I have them
already when I'm about to change the 8255's modus.

At this point I would like to present a nice circuit diagram to
show what the contraption I have made looks like. Unfortunately I
know of no easy way to do that. This beautiful net is a marvel
when it comes down to transporting text, graphics is another
matter. A GIF picture would do the work; I do not have any means
to produce one. Some schematics drawing package could give a good
picture; I have no schematics package and I am not sure what
package would be universal enough to be usable by everyone. So I
am restricted to a more or less cryptic ASCII description of the
hardware. Please, the cryptology is out of need, not out of my
liking. Well here it comes:

1) The IDE bus pin connections themselves:
   ---------------------------------------

The IDE connector itself is a 40-pins two-row connector:

    1                  39    odd-numbered pins
    ....................
    ....................
    2                  40    even-numbered pins

In an IDE bus this connector is used as follows:

pin no:      name:     function:
---------   -------    ---------

1            /RESET    Al low signal level on this pin will reset
                       all connected devices

2,19,22      GND       ground, interconnect them all and tie to
24,26,30               controller's ground signal
40

3,5,7,9,11   D7..D0    low data bus, 3=D7 .. 17=D0. This part of
13,15,17               the bus is used for the command and
                       parameter transfer. It is also used for
                       the low byte in 16-bits data transfers.

4,6,8,10     D8..D15   high data bus, 4=D8 .. 18=D15. This part
12,14,16,18            of the bus is used only for the 16-bits
                       data transfer.

20           -         This pin is usually missing. It is used to
                       prevent mis-connecting the IDE cable.

21 and       /IOREADY  I do not use or connect to this pin. It is
27                     there to slow down a controller when it is
                       going too fast for the bus. I do not have
                       that problem...

23           /WR       Write strobe of the bus.

25           /RD       Read strobe of the bus.

28           ALE       Some relic from the XT time. I do not use
                       it, and I'm not the only one...

31           IRQ       Interrupt output from the IDE devices. At
                       this moment I do not use it. This pin
                       could be connected to a controller to
                       generate interrupts when a command is
                       finished. I have an inverter ready for
                       this signal (I need a /IRQ for my
                       controller, an IRQ is of no use to me..)

32           IO16      Used in an AT interface to enable the
                       upper data bus drivers. I do not use this
                       signal. It is redundant anyway, the ATA-3
                       definition has scrapped it.

34           /PDIAG    Master/slave interface on the IDE bus
                       itself. Leave it alone or suffer
                       master/slave communications problems. Not
                       used (or connected to ANYTHING) by me.

35           A0        Addresses of the IDE bus. With these
33           A1        you can select which register of the IDE
36           A2        devices you want to communicate.

37           /CS0      The two /CS signals of the IDE bus. Used
38           /CS1      in combination with the A0 .. A2 to select
                       the register on the IDE device to
                       communicate with.

39           /ACT      A low level on this pin indicates that the
                       IDE device is busy. I have connected a LED
                       on this pin. The real busy signal for the
                       controller I get from the IDE status
                       register.

Input/Output status of these signals:
-------------------------------------

The signals:
A0, A1, A2, /CS0, /CS1, /WR, /RD and /RESET are always outputs
from the controller to the IDE bus.

The signals:
IRQ and /ACT are always outputs from the IDE bus to the
controller (IRQ can be tri-stated by the IDE device when two
devices are connected to the IDE bus.) /ACT can drive a LED (with
resistor of course).

The signals:
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,
D15 are bi-directional. They are output from the controller to
the IDE bus when writing, output from the IDE device to the
controller when reading information.

2) The 8255 <-> controller
   -----------------------

The 8255 is connected to the controller by means of its 8-bit
data bus, the A0 and A1 lines and the /CS, /WR and /RD lines. I
can not give that much info about this. If in doubt: consult the
8255 data sheet. This part depends as much on the controller you
use as anything else. I have the 8255 connected to my controller
(HD63B03R1CP, a Hitachi 6803-derivate..) as an I/O port. Perhaps
some of you have seen my previous e-mails asking for the pinout
of the HD63B03R1CP (52-pins PLCC) chip, well I did find it (Some
department of my work had an old Hitachi databook, voila the
pinout was there). My address decoding puts the 8255 on address
0500H to 0503H in the controller's memory map. That may help if
you decide to try to make sense of my software listing. On this
point you are on your own as to the how to connect a 8255 to your
controller.

3) 8255 <-> IDE connector
   ----------------------

I have used the 8255's port A to generate the IDE bus control
signals. Some of these control signals pass through an inverter
before I connected them to the IDE connector itself. All of these
signals are always used as output from the 8255 to the IDE bus.
When a control signal is inverted the 8255 pin is connected to
one of the inputs of the 74HC04 and the (corresponding) output of
the 74HC04 is connected to the IDE bus connector.

The ports B and C are used as the 16-bits data bus. There are no
special things in this, it's just a simple interconnection of the
8255 I/O pins to the D0..D15 pins of the IDE connector.

I have connected this as follows:
---------------------------------

PA.7  --> inverter --> IDE bus /RESET
PA.6  --> inverter --> IDE bus /RD
PA.5  --> inverter --> IDE bus /WR
PA.4  --> inverter --> IDE bus /CS1
PA.3  --> inverter --> IDE bus /CS0
PA.2  -->              IDE bus A2
PA.1  -->              IDE bus A1
PA.0  -->              IDE bus A0

PB.7 <--> IDE bus D7
PB.6 <--> IDE bus D6
PB.5 <--> IDE bus D5
PB.4 <--> IDE bus D4
PB.3 <--> IDE bus D3
PB.2 <--> IDE bus D2
PB.1 <--> IDE bus D1
PB.0 <--> IDE bus D0

PC.7 <--> IDE bus D15
PC.6 <--> IDE bus D14
PC.5 <--> IDE bus D13
PC.4 <--> IDE bus D12
PC.3 <--> IDE bus D11

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲主播在线播放| 成人动漫在线一区| 国产成人综合在线| 欧美三级中文字幕| 中文无字幕一区二区三区| 图片区小说区区亚洲影院| eeuss鲁片一区二区三区| 久久综合九色综合97婷婷| 天堂va蜜桃一区二区三区漫画版| 99久久99久久久精品齐齐| 久久免费的精品国产v∧| 日本欧美一区二区| 色婷婷av久久久久久久| 国产精品久久久久久久久晋中| 免费成人在线观看视频| 欧美日韩高清影院| 一区二区三区自拍| 色妹子一区二区| 国产精品成人午夜| 成人a区在线观看| 国产精品日产欧美久久久久| 麻豆freexxxx性91精品| 欧美影片第一页| 一区二区三区精品视频| 在线观看日韩国产| 亚洲精品高清在线| 在线观看国产日韩| 亚洲主播在线播放| 欧美日韩精品一区二区| 亚洲国产成人va在线观看天堂| 色婷婷综合在线| 亚洲精品国产品国语在线app| 色狠狠色狠狠综合| 亚洲一级不卡视频| 欧美日韩卡一卡二| 偷拍日韩校园综合在线| 欧美一区二区福利视频| 麻豆专区一区二区三区四区五区| 日韩亚洲欧美一区二区三区| 蜜桃久久av一区| 欧美精品一区二区三区蜜桃| 国产精品一级片在线观看| 中文字幕欧美三区| 在线日韩一区二区| 偷拍日韩校园综合在线| 欧美成人aa大片| 精品国产一区二区在线观看| 亚洲午夜日本在线观看| 精品国产不卡一区二区三区| 精品国产乱子伦一区| 欧美成va人片在线观看| 日本一区二区三级电影在线观看| 久久久久国产免费免费| 日韩毛片视频在线看| 国产精品久久二区二区| 一区二区三区久久| 在线观看成人小视频| 亚洲综合色区另类av| 日韩美女主播在线视频一区二区三区| 强制捆绑调教一区二区| 精品sm在线观看| av午夜精品一区二区三区| 亚洲v日本v欧美v久久精品| 91精品国产高清一区二区三区蜜臀| 国产自产v一区二区三区c| |精品福利一区二区三区| 欧美三级视频在线播放| 国产精一区二区三区| 亚洲综合色网站| 国产亚洲制服色| 在线看日本不卡| 国产电影一区二区三区| 亚洲国产精品影院| 中文字幕av一区二区三区高| 在线播放亚洲一区| 91女厕偷拍女厕偷拍高清| 久色婷婷小香蕉久久| 亚洲少妇最新在线视频| 久久久久国产一区二区三区四区 | 久久综合九色综合欧美亚洲| gogogo免费视频观看亚洲一| 久久国产婷婷国产香蕉| 亚洲免费色视频| 久久久不卡网国产精品二区| 欧美三级电影精品| 99久久婷婷国产| 看电影不卡的网站| 亚洲国产综合视频在线观看| 国产日韩亚洲欧美综合| 91精品国产乱码| 欧美在线观看一区二区| www.色精品| 国产精品 欧美精品| 免费视频一区二区| 亚洲bt欧美bt精品777| 一区二区三区色| 综合中文字幕亚洲| 国产精品电影院| 中文在线一区二区 | 18成人在线观看| 中文字幕乱码一区二区免费| 精品国产免费人成在线观看| 51精品国自产在线| 欧美亚洲动漫制服丝袜| 色偷偷久久人人79超碰人人澡 | 中文字幕日韩精品一区| 国产亚洲欧洲997久久综合| 精品久久久久一区| 日韩欧美国产三级| 日韩区在线观看| 欧美一区二区黄色| 日韩午夜三级在线| 日韩一级精品视频在线观看| 欧美一激情一区二区三区| 欧美一区二区高清| 日韩欧美一区二区久久婷婷| 欧美zozozo| 久久久久久久久久久久久久久99| 欧美mv日韩mv国产网站app| 欧美mv日韩mv| 国产欧美日韩综合精品一区二区 | 精品三级av在线| 欧美精品一区二区三区很污很色的 | 国产精品妹子av| 国产精品乱子久久久久| 国产精品久久久久久亚洲毛片| 一区免费观看视频| 亚洲综合久久久| 日韩电影一二三区| 国产真实乱子伦精品视频| 国产精品一区在线| 91在线视频免费91| 欧美三级资源在线| 欧美成人精品3d动漫h| 26uuuu精品一区二区| 中文无字幕一区二区三区 | 日本sm残虐另类| 国产综合久久久久影院| jvid福利写真一区二区三区| 在线观看成人免费视频| 日韩精品一区二区三区中文不卡| 国产亚洲欧美一级| 亚洲在线视频免费观看| 激情综合网天天干| 色欧美日韩亚洲| 精品国产乱码久久久久久夜甘婷婷 | 91影院在线观看| 717成人午夜免费福利电影| 欧美精品一区二区三区在线| 亚洲欧美aⅴ...| 韩国v欧美v日本v亚洲v| 91国产免费看| 久久伊人中文字幕| 亚洲精品视频在线观看网站| 久久99精品久久久| 在线免费观看日本一区| 国产亚洲欧美色| 五月婷婷综合激情| 91在线小视频| 久久久亚洲精品石原莉奈| 亚洲国产美国国产综合一区二区| 韩国欧美国产1区| 欧美三级一区二区| 亚洲国产精品传媒在线观看| 日本成人在线不卡视频| 99v久久综合狠狠综合久久| 91精品国产麻豆国产自产在线| 亚洲品质自拍视频| 国产传媒一区在线| 欧美xxx久久| 三级在线观看一区二区| 色婷婷精品久久二区二区蜜臂av| 国产视频一区在线播放| 久久99久久99小草精品免视看| 在线精品视频小说1| 国产精品国产三级国产三级人妇 | 韩国成人精品a∨在线观看| 欧美精品第1页| 亚洲影视资源网| av日韩在线网站| 国产网站一区二区| 韩国女主播一区二区三区| 日韩一区二区在线观看| 亚洲chinese男男1069| 欧美综合一区二区| 亚洲欧美色一区| 色综合天天天天做夜夜夜夜做| 国产偷国产偷亚洲高清人白洁| 麻豆国产欧美一区二区三区| 欧美日韩一区中文字幕| 亚洲一级二级在线| 欧美日韩精品三区| 亚洲精品老司机| 欧美最猛性xxxxx直播| 亚洲黄色小视频| 欧美日韩在线播放三区| 午夜精品aaa| 91精品久久久久久久99蜜桃| 免费在线看成人av| 精品国产一区二区三区不卡|