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

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

?? ide-8255.txt

?? 用8051單片機實現IDE總線 程序簡潔易懂
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
           ignore this bit.
bit 6    : UNC bit. Indicates that an uncorrectable data error
           happened. Some read or write errors could provoce
           this. I have never seen it happen.
bit 7    : reserved.

Note: I have these registers descriptions from two sources:

1) The C't magazine I mentioned before. It's in German, not very
   complete (the error register description is missing) and very
   old. It does have a hardware description of and IDE interface
   however....

2) The document X3T10/2008D: Information Technology-
   AT Attachment-3 Interface (ATA-3), Working draft.
   This latter document gives an exhaustive overview of the IDE
   interface. It states more details of the IDE interface than I
   can ever hope to include in this short description. It does
   however have one disadvantage: it's BIG. I found the document
   on the net (on the Western Digital homepage) in the form of an
   .exe file. When you run this file on a PC you are rewarded
   with a bigger-than-1 Mbytes .DOC file. That is a Word
   document. When you print (Wondows-95 has a Word viewer/printer
   application) it you get a nearly-200-pages paper. If you want
   to get into the IDE interface seriously I recommend you print
   this thing.

I hope the description I have given here will allow those that do
not have a laser printer and a fast internet link available to
get to grips with the IDE bus.

Intermezzo: Disk size limitations on the IDE bus and LBA modus
-----------

In the PC world there has been (and still is) a lot of discussion
about 'limits' in the disk interface.

At first (MSDOS versions till 3.3) the disk interface was not
able to access more than 32MB on one volume. That was a
limitation of the MSDOS file system rather than of the disk
interface. The same DOS version that was unable to access bigger
partitions than 32MB *WAS* able to access 650MB CDROMs. The limit
came from the fact that each disk sector (512 bytes) was
registered in the FAT in a 16-bits word. The total partition size
was limited by the fact that only 65536 sectors could be
addressed. The partition size was thus limited to 65536 x 512
bytes = 32 MBytes.

Later -as the disks became larger- the disk interface itself ran
into its limits. The interface I describe here has room for 16
heads, 256 sectors per track and only 1024 cylinders. With the
standard sector size of 512 bytes that leaves you a maximum disk
size of 16 x 256 x 1024 x 512 = 2048 MBytes. That is a real
limitation of the IDE interface as I decribe it here. It can not
access more than some 2 GBytes of disk space.

This was overcome by introducing the so-called LBA modus. In LBA
modus the sectors are simply numbered from 0 to -big-. The lowest
byte of the LBA sector number is written into the sector number
register, the middle 16 bits of the LBA sector number are written
in the cylinder number registers (low and high, all 16 bits are
used). The highest 4 bits of the LBA sector number are written in
the head and device register. That gives you 28 bits of LBA
sector number. The sector size was again fixed at 512bytes, so in
LBA modus you have access to: 2^28 x 512 = 1.37 E 11 (some 137.4
gigabytes) of disk space. This LBA modus has been made mandatory
for all new disks (in the ATA-3 spec.) That should keep the disk
makers busy for some while to come... If you want to connect a
disk larger than 2 GBytes to this IDE interface you too will have
to use the LBA modus. How to do that: the bit 6 of the head and
device register is set to indicate that LBA modus is used (the
fixed pattern of 101B in the bits 7..5 of the head and device
register is to be changed into 111B). All other manipulation of
the IDE interface is the same for Sector/Head/Cylinder modus and
LBA modus.

All other limits in te MSDOS/Windows-whatever disk interface must
be due to the BIOS implementation or the file system used. I can
find no reason in the IDE definition for 512 MB limits or 8 GB
limits at all.

End of intermezzo
-----------------

IDE registers usage
===================

Ok, now you know what registers the IDE system uses. Next
question: How to use them? I do not pretend I have tried every
possibility with these registers. As I stated before I have
restricted myself to reading/writing data blocks to/from the
disk. What to do for that is in fact fairly simple:

1) Before doing anything with a device you have to wait till it
   indicates that it is ready (RDY bit in the status register)

2) Next you load the parameters of a command into the appropriate
   registers. For read/write commands that comes down to writing
   the cylinder/head/sector numbers into the registers.

3) You issue a read or write command.

4) You wait till the device signals that it is ready for data
   transfer (DRQ in the status register).

5) Feed the device data (for write) or get the data from the
   device (for read). In case of a write you could wait for the
   operation to complete and read the status register to find out
   what has become of your data.

6) Finish!! That's all folks! The IDE interface is a surprisingly
   simple thing to get to work. If only I had an IDE disk and this
   kind of information when I was still programming my
   MSX-computer I'd have had a harddisk connected to it in no
   time.

IDE commands
============

What has been missing in this description till now is the command
set. I do not think I can describe the complete command set here.
The ATA-3 document is a better source for that than I can give
here (All I would be doing is re-entering the ATA-3 document; I
have neither the time nor any liking for that). The most usable
commands I do intend to describe. Mind: When giving a command you
first have to wait for device ready, next put the command
parameters in the registers and only then can you give a command
(by writing a command byte to the command register). The disk
will start executing the command right after you've written the
command into the command register.

IDE command:    Description:
------------    ------------

1XH             recalibrate the disk. NB: 1XH means that the lower
                nibble of the command byte is a don't care. All
                commands 10H..1FH will result in a recalibrate
                disk command being executed. This command has no
                parameters. You simply write the command code to
                the command register and wait for ready status to
                become active again.

20H             Read sector with retry. NB: 21H = read sector
                without retry. For this command you have to load
                the complete circus of cylinder/head/sector
                first. When the command completes (DRQ goes
                active) you can read 256 words (16-bits) from the
                disk's data register.

30H             Write sector (with retry; 31H = without retry).
                Here too you have to load cylinder/head/sector.
                Then wait for DRQ to become active. Feed the disk
                256 words of data in the data register. Next the
                disk starts writing. When BSY goes not active you
                can read the status from the status register.

7XH             Seek. This normally does nothing on modern IDE
                drives. Modern drives do not position the head if
                you do not command a read or write.

ECH             Identify drive. This command prepares a buffer
                (256 words) with information about the drive. If
                you want the details either look closely at the
                interface program I will add at the end of this
                description or get the ATA-3 document. To use it:
                simply give the command, wait for DRQ and read
                the 256 words from the drive. I have found that
                the modern drives I used give nice information
                about number of heads,sectors,cylinders etc...
                One of the disks I tried (a Miniscribe 8051A)
                gave wrong answers in this buffer. The disk is
                actually a 4 heads/28 sectors disk. It should be
                used in a translated modus with 5 heads/17
                sectors. In the ident drive response it reported
                as 4 heads/28 sectors and it will NOT work in
                that modus. Two other disks (a Quantum 127 MB
                disk and a Western Digital 212 MB disk) report
                nicely. If not for the Miniscribe I would use the
                parameters reported to auto-config the interface
                to match the disk configuration.

E0H             Spins down the drive at once. No parameters. My
                Miniscribe 8051A does not respond to this
                command, the other disks do execute this command.

E1H             Spins up the drive again. Same remarks as E0H
                command.

E2H and E3H     Auto-power-down the disk. Write in the sector
                count register the time (5 seconds units) of
                non-activity after which the disk will spin-down.
                Write the command to the command register and the
                disk is set in an auto-power-save modus. The disk
                will automatically spin-up again when you issue
                read/write commands. E2H will spin-down, E3H will
                keep the disk spinning after the command has been
                given. Example: write 10H in the sector count
                register, give command E2H and the disk will
                spin-down after 80 seconds of non-activity. BTW:
                You can use this command easily on a PC disk too.
                The harddisk of the computer I am working on now
                gets this exact command at boot. That saves a lot
                of noise when I'm typeing long stories like this
                one.

F2H and F3H     The same as E2H and E3H, only the unit in the
                sector count register is interpreted as 0.1 sec
                units. I have not tried this command. Ithink it
                will work (the E0H/E1H/E2H/E3H commands work, why
                should this one not work?)


Two-devices considerations
==========================

The IDE bus is intended for two devices. A master and a slave
device. I have not tried anything myself, but the descriptions
indicate that it is in fact very simple to connect two devices to
the IDE bus. All you have to do is:

1) Configure the master/slave jumpers of the devices.

2) Select a device before you start giving commands to the
   devices.

The head and device register has the bit you need to switch from
one device to another. You have to write the bit to either 0 for
master or 1 for slave and start controlling the other device.
Mind: BOTH devices will get their registers WRITTEN. Any data or
register READ will come from the selected device. ONLY the
selected device will execute commands.

Conclusions and ravings
=======================

ravings:
--------

This description should be about what you need to connect an IDE
disk to any controller. The only thing I have left out are my
unsuccessfull experiments with the interrupt. What happened there
is that I enabled the interrupt, made an interrupt handler that
simply read the status register (to get the interrupt to
disappear) and re-scheduled the disk interface task. I was
rewarded with occasional errors. Some of the read requests got an
ABRT error. I do not yet know what I did wrong. I can not have
been far off the mark, because most of the commands where
executed without comment from the disk. I do intend to try the
interrupt modus again later. I theory the interrupt modus should
give me a slightly bigger data rate. I have found data rates in
the order of 32 KBytes per seccond when I was using interrupts.

About interrupts: When you want to use the interrupt mechanism
all you have to do is enable the interrupt modus of the interface
by clearing the interrupt disable bit in the reset and interrupt
register. The disk will generate an interrupts as soon as it
has completed a command. That means that it will generate an
interrupt when it has read a sector from disk (as soon as DRQ
gets active) or when it has finished writing a sector to disk. I
am not sure about the other commands, but the description says
that the disk will generate an interrupt upon the completion of

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品72免费观看| 91亚洲国产成人精品一区二区三| 欧美午夜精品久久久久久超碰| 中文字幕乱码日本亚洲一区二区| 国产精品99久久久| 国产肉丝袜一区二区| 成人av在线播放网址| 亚洲色图欧美激情| 欧美视频在线播放| 蜜臀av性久久久久蜜臀aⅴ | 欧美在线视频你懂得| 亚洲欧美aⅴ...| 成人小视频免费在线观看| 亚洲一区二区在线免费观看视频| 精品一区二区在线观看| 欧美精品18+| 亚洲伦在线观看| 欧美女孩性生活视频| 亚洲欧美在线另类| 国内成+人亚洲+欧美+综合在线| 69久久夜色精品国产69蝌蚪网| 日韩欧美一区二区在线视频| 国产剧情av麻豆香蕉精品| 日韩精品一区二区三区视频在线观看 | 久久亚洲精精品中文字幕早川悠里| 丝瓜av网站精品一区二区 | 国产日韩高清在线| 九九九精品视频| 精品理论电影在线观看 | 久久爱另类一区二区小说| 国产婷婷一区二区| 国产a级毛片一区| 国产无遮挡一区二区三区毛片日本| 看片网站欧美日韩| 精品国产露脸精彩对白| 老司机午夜精品| 欧洲中文字幕精品| 国产a级毛片一区| 国产精品久久久久久久久久久免费看 | 亚洲一区电影777| 欧美网站大全在线观看| 亚洲bdsm女犯bdsm网站| 欧美日韩国产a| 日本不卡不码高清免费观看| 91精品在线麻豆| 一区二区三区精品视频| 欧美体内she精高潮| 亚洲国产综合在线| 欧美一区二区三区视频免费播放| 麻豆国产精品一区二区三区 | 亚洲精品一区二区三区四区高清| 天天免费综合色| 亚洲男女一区二区三区| 欧美色综合网站| 蜜桃av一区二区| 国产日韩av一区| 91丨porny丨户外露出| 夜夜嗨av一区二区三区四季av| 亚洲国产毛片aaaaa无费看 | 狠狠色狠狠色综合| 国产午夜精品久久久久久久| 欧洲一区在线电影| 一区二区三区四区不卡视频| 色噜噜狠狠一区二区三区果冻| 亚洲国产精品精华液网站| 欧美一区二区在线视频| 韩国毛片一区二区三区| 亚洲日本在线视频观看| 91精品国产色综合久久ai换脸 | av在线播放不卡| 天天影视网天天综合色在线播放| 国产偷国产偷亚洲高清人白洁 | 亚洲午夜三级在线| 日韩欧美国产三级电影视频| a在线欧美一区| 亚洲国产精品久久艾草纯爱| 亚洲综合色视频| 日韩精品在线看片z| 99精品欧美一区二区三区小说| 亚洲福利视频一区二区| 中文字幕免费不卡| 91精品国产高清一区二区三区 | 亚洲精品国产a| 精品国产髙清在线看国产毛片 | 国产欧美一区视频| 在线观看免费视频综合| 久久国产精品区| 国产一区二区伦理| 午夜电影一区二区| 中文字幕av在线一区二区三区| 欧美日韩国产成人在线免费| 色综合天天综合| 国产一区二区不卡在线 | 精品午夜久久福利影院| 一区二区三区波多野结衣在线观看| 久久综合狠狠综合| 欧美午夜片在线看| 91丝袜美腿高跟国产极品老师| 亚洲aaa精品| 国产在线播精品第三| 丝袜美腿亚洲色图| 伊人夜夜躁av伊人久久| 国产网红主播福利一区二区| 久久综合九色综合欧美就去吻| 欧美精品v日韩精品v韩国精品v| 欧美aⅴ一区二区三区视频| 天天综合色天天综合色h| 亚洲男人天堂一区| 亚洲蜜臀av乱码久久精品| 中文字幕成人在线观看| 精品电影一区二区三区| 精品污污网站免费看| 日韩欧美美女一区二区三区| 欧美精品色综合| 欧美日韩成人在线| 欧美日韩视频第一区| 欧美亚洲综合久久| 欧洲色大大久久| 欧美一区二区三区系列电影| 欧美一级日韩免费不卡| 日韩美一区二区三区| 日韩精品在线看片z| 亚洲精品一线二线三线无人区| 精品国产乱码久久久久久夜甘婷婷 | 亚洲少妇30p| 亚洲欧美在线高清| 久久夜色精品国产噜噜av| 伊人性伊人情综合网| 国产精品不卡在线| 91色porny在线视频| 激情五月播播久久久精品| 美女尤物国产一区| 在线免费观看日本一区| 国产成a人无v码亚洲福利| 精品免费日韩av| 精品国内二区三区| 九一九一国产精品| 日韩不卡在线观看日韩不卡视频| 91啪亚洲精品| 日韩欧美卡一卡二| 欧美日韩国产一级| 7777精品伊人久久久大香线蕉的| 中文字幕精品三区| www一区二区| 美国三级日本三级久久99| 成人av在线影院| 国产精品资源在线观看| 成人性生交大合| 欧美午夜不卡视频| 国产喷白浆一区二区三区| 亚洲一区二区三区激情| 极品销魂美女一区二区三区| 99综合电影在线视频| 欧美一级高清片| 亚洲天堂中文字幕| 激情五月婷婷综合| 制服丝袜在线91| 亚洲制服丝袜在线| 国产成人福利片| 欧美乱熟臀69xxxxxx| 国产欧美视频一区二区| 一区二区成人在线视频| 成人av在线看| 欧美国产精品专区| 久久精品国产一区二区三 | 91日韩在线专区| 欧美日韩国产a| 亚洲老司机在线| 国产成人免费网站| 久久蜜桃香蕉精品一区二区三区| 欧美v日韩v国产v| 午夜精品久久久久影视| 国产欧美一区二区三区鸳鸯浴| 美女精品一区二区| jvid福利写真一区二区三区| 亚洲视频小说图片| 精品无人码麻豆乱码1区2区| 日韩一区二区三区在线视频| 国产精品久线在线观看| 国产精品久久毛片| 久久精品国产一区二区三| 久久先锋影音av鲁色资源| 国模无码大尺度一区二区三区| 色呦呦国产精品| 亚洲影视在线播放| 欧美性一二三区| 麻豆国产91在线播放| 国产欧美日韩综合| 欧美在线观看视频一区二区三区| 91麻豆国产自产在线观看| 欧美日韩一区二区在线观看| 91成人看片片| 日韩欧美一区二区视频| 欧美一区二区大片| 亚洲v精品v日韩v欧美v专区| 成人免费在线视频观看| 亚洲免费资源在线播放| 亚洲综合男人的天堂| 无吗不卡中文字幕| 日韩高清在线一区|