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

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

?? ide-8255.txt

?? 用8051單片機實現IDE總線 程序簡潔易懂
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
PC.2 <--> IDE bus D10
PC.1 <--> IDE bus D9
PC.0 <--> IDE bus D8

I have put a 10 KOhm pull-down resistor from the IDE bus IRQ to
ground. The IDE IRQ signal is also connected to the input of the
(one-remaining) inverter. The output of the inverter is connected
to the controller's /IRQ input. As you can see, I do have the
hardware for interrupts here, I do not use it. I tried to use it,
but got unexplained errors (I probably did something wrong, I
have not yet found what)..

                   |\
IDE IRQ o-----+----+ >o--------o CPU's /IRQ
              |    |/
             +++
             | |
             | | 10 KOhm
             +++
              |
              |
             -+- GND
             ///

The IDE /ACT signal is connected to a 330 Ohm resistor, the other
end of the resistor is connected to a LED, the other end of the
LED is connected to the +5 Volts. This gives a nice LED
indication of when I'm using the disk. This is -as far as I know-
the same hardware a PC uses to produce the disk busy LED you may
find on the front of a PC box.

                 330 Ohm
               +-------+     LED
IDE /ACT o-----+       +------|<-----o +5 Volts
               +-------+

So much about the hardware of the IDE interface. I hope that is
all clear now. If I have been less than clear, please ask. If I
have made mistakes, please complain (I said complain, NOT FLAME!!!).


IDE read/write and register description
=======================================

The IDE device appears to the IDE bus as a set of regsiters. The
register selection is done with the /CS0, CS1 and A0, A1, A2
lines. Reading/writing is done with the /RD and /WR signals. I
have used the 8255 port A signals to make read/write cycles on
the IDE bus. What I do is the following:

read cycle:
-----------

1) put the port B and C of the 8255 in input modus.

2) set an address and /CS0 and /CS1 signal on the port A of the
   8255.

3) activate the /RD of the IDE bus by setting the equivalent bit
   in the port A of the 8255.

4) read the data from port B (and C) of the 8255.

5) deactivate the /RD signal on the IDE bus by resetting the
   equivalent bit of port A of the 8255.

write cycle:
-----------

1) put the port B and C of the 8255 in output modus.

2) set an address and /CS0 and /CS1 signal on the port A of the
   8255.

3) set a data word (or byte) on port B (and C) of the 8255.

4) activate the /WR of the IDE bus by setting the equivalent bit
   in the port A of the 8255.

5) deactivate the /WR signal on the IDE bus by resetting the
   equivalent bit of port A of the 8255.

The only difference between 8 bits and 16 bits transfers is the
following:

- In an 8-bit transfer I use only the port B of the 8255 for data
  transfer. When writing I put data only on the lower byte of the
  IDE bus; the upper byte is ignored anyway by the IDE device.
  When reading I read only port B of the 8255; I never even
  bother to look at the upper byte.

- In an 16-bit transfer I read/write to both the upper and the
  lower byte of the IDE bus; thus using both port B and port C.

The IDE device appears as the following registers:
--------------------------------------------------

/CS0=0, /CS1=1, A2=A1=A0=0: data I/O register (16-bits)
This is the data I/O register. This is in fact the only 16-bits
wide register of the entire IDE interface. It is used for all data
block transfers from and to the IDE device.

/CS0=0, /CS1=1, A2..A0=001B: This is the error information
register when read; the write precompensation register when
written. I have never bothered with the write precompensation at
all, I only read this register when an error is indicated in the
IDE status register (see below for the IDE status register).

/CS0=0, /CS1=1, A2..A0=010B: Sector counter register. This
register could be used to make multi-sector transfers. You'd have
to write the number of sectors to transfer in this register. I
use one-sector only transfers; So I'll only write 01H into this
register. I do use this register to pass the parameter the
timeout for idle modus command via this register.

/CS0=0, /CS1=1, A2..A0=011B: Start sector register. This register
holds the start sector of the current track to start reading/
writing to. For each transfer I write the start sector in this
register. For some fancy reason the sector count starts at 1 and
runs up to 256, so writing 00H results in sector number 256. Why
that is done is a mystery to me, all other counting in the IDE
interface starts at 0.....

/CS0=0, /CS1=1, A2..A0=100B: Low byte of the cylinder number.
This register holds low byte of the cylinder number for a disk
transfer.

/CS0=0, /CS1=1, A2..A0=101B: High two bits of the cylinder
number. The traditional IDE interface allows only cylinder
numbers in the range 0..1023. This register gets the two upper
bits of this number. I write the cylinder number's upper two bits
into this register before each transfer.

/CS0=0, /CS1=1, A2..A0=110B: Head and device select register. The
bits 3..0 of this register hold the head number (0..15) for a
transfer. The bit 4 is to be written 0 for access to the IDE
master device, 1 for access to the IDE slave device. The bits
7..5 are fixed at 101B in the traditional interface.

/CS0=0, /CS1=1, A2..A0=111B: command/status register. When
written the IDE device regards the data you write to this
register as a command. When read you get the status of the IDE
device. Reading his register also clears any interrupts from the
IDE device to the controller.

/CS0=1, /CS1=0, A2..A0=110B: 2nd status register/interrupt and
reset register. When read this register gives you the same status
byte as the primary (/CS0=0, /CS1=1, A2..A0=111B) status
register. The only difference is that reading this register does
not clear the interrupt from the IDE device when read. When
written you can enable/disable the interrupts the IDE device
generates; Also you can give a software reset to the IDE device.

/CS0=1, /CS1=0, A2..A0=111B: active status of the IDE device. In
this register (read-only) you can find out if the IDE master or
slave is currently active and find the currently selected head
number. In a PC environment you can also find out if the floppy
is currently in the drive. I have not used this register yet.

Some of these registers have bitwise meanings. I'll elaborate on
that here:

head and device register:
-------------------------
A write register that sets the master/slave selection and the
head number.

bits 3..0: head number [0..15]
bit  4   : master/slave select: 0=master,1=slave
bits 7..5: fixed at 101B. This is in fact the bytes/sector
           coding. In old (MFM) controllers you could specify if
           you wanted 128,256,512 or 1024 bytes/sector. In the
           IDE world only 512 bytes/sector is supported. This bit
           pattern is a relic from the MFM controllers age. The
           bit 6 of this pattern could in fact be used to access
           a disk in LBA modus.

Status register:
----------------
Both the primary and secondary status register use the same bit
coding. The register is a read register.

bit 0    : error bit. If this bit is set then an error has
           occurred while executing the latest command. The error
           status itself is to be found in the error register.
bit 1    : index pulse. Each revolution of the disk this bit is
           pulsed to '1' once. I have never looked at this bit, I
           do not even know if that really happens.
bit 2    : ECC bit. if this bit is set then an ECC correction on
           the data was executed. I ignore this bit.
bit 3    : DRQ bit. If this bit is set then the disk either wants
           data (disk write) or has data for you (disk read).
bit 4    : SKC bit. Indicates that a seek has been executed with
           success. I ignore this bit.
bit 5    : WFT bit. indicates a write error has happened. I do
           not know what to do with this bit here and now. I've
           never seen it go active.
bit 6    : RDY bit. indicates that the disk has finished its
           power-up. Wait for this bit to be active before doing
           anything (execpt reset) with the disk. I once ignored
           this bit and was rewarded with a completely unusable
           disk.
bit 7    : BSY bit. This bit is set when the disk is doing
           something for you. You have to wait for this bit to
           clear before you can start giving orders to the disk.

interrupt and reset register:
-----------------------------
This register has only two bits that do something (that I know
of). It is a write register.

bit 1    : IRQ enable. If this bit is '0' the disk will give and
           IRQ when it has finished executing a command. When it
           is '1' the disk will not generate interrupts.
bit 2    : RESET bit. If you pulse this bit to '1' the disk will
           execute a software reset. The bit is normally '0'. I
           do not use it because I have full software control of
           the hardware /RESET line.

Active status register:
-----------------------
This is a read register. I have -up till now- ignored this
register. I have only one IDE device (a disk) on my contraption.

bit 0    : master active. If this bit is set then the master IDE
           device is active.
bit 1    : slave active. If this bit is set then the slave IDE
           device is active.
bits 5..2: complement of the currently active disk head.
bit 6    : write bit. This bit is set when the device is writing.
bit 7    : in a PC environment this bit indicates if a floppy is
           present in the floppy drive. Here it has no meaning.

error register:
---------------
The error register indicates what went wrong when a command
execution results in an error. The fact that an error has
occurred is indicated in the status register, the explanation is
given in the error register. This is a read register.

bit 0    : AMNF bit. Indicates that an address mark was not
           found. What this means I not sure of. I have never
           seen this happen.
bit 1    : TK0NF bit. When this bit is set the drive was not able
           to find track 0 of the device. I think you will have
           to throw away the disk if this happens.
bit 2    : ABRT bit. This bit is set when you have given an
           indecent command to the disk. Mostly wrong parameters
           (wrong head number etc..) cause the disk to respond
           with error flag in the status bit set and the ABRT bit
           set. I have gotten this error a lot when I tried to
           run the disk with interrupts. Something MUST have been
           wrong with my interface program. I have not (yet)
           found what.
bit 3    : MCR bit. indicated that a media change was requested.
           What that means I do not know. I've ignored this bit
           till now.
bit 4    : IDNF bit. Means that a sector ID was not found. I have
           never seen this happen, I guess it means that you've
           requested a sector that is not there.
bit 5    : MC bit. Indicates that the media has been changed. I

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国av一区二区三区| 午夜欧美大尺度福利影院在线看| 极品销魂美女一区二区三区| 91精品综合久久久久久| 日本系列欧美系列| 欧美电影免费观看高清完整版 | 色一情一乱一乱一91av| 亚洲裸体在线观看| 欧美调教femdomvk| 麻豆精品一区二区综合av| 日韩亚洲欧美一区| 成人综合婷婷国产精品久久免费| 国产精品乱人伦中文| 91福利国产精品| 激情偷乱视频一区二区三区| 日本一区二区在线不卡| 欧美亚洲国产bt| 久久99精品国产麻豆婷婷| 国产精品久久久久久久久久免费看| 91成人国产精品| 久久精品国产第一区二区三区| 国产精品沙发午睡系列990531| 欧洲精品一区二区| 国产精品77777| 亚洲国产欧美一区二区三区丁香婷| 欧美va亚洲va在线观看蝴蝶网| 国产成人精品亚洲777人妖| 亚洲第四色夜色| 久久久蜜臀国产一区二区| 日本韩国欧美在线| 精品一区二区三区久久| 亚洲综合色区另类av| 久久久亚洲高清| 在线播放91灌醉迷j高跟美女| 国产美女精品一区二区三区| 一区二区三区不卡视频在线观看| 日韩欧美一级二级三级久久久| 成人黄色片在线观看| 日本91福利区| 亚洲精品日韩一| 久久综合色一综合色88| 欧美日韩精品欧美日韩精品一| 国产成人午夜片在线观看高清观看| 亚洲国产日产av| 亚洲视频中文字幕| 国产亚洲成aⅴ人片在线观看| 欧美美女bb生活片| 色综合天天综合网天天狠天天 | 亚洲国产va精品久久久不卡综合| 精品国产青草久久久久福利| 欧美色涩在线第一页| 91亚洲永久精品| 成人一区二区三区| 韩国av一区二区三区在线观看| 视频一区在线播放| 亚洲尤物视频在线| 一区二区视频在线看| 国产精品国产成人国产三级| 久久精品一区二区三区不卡| 日韩女优电影在线观看| 91精品久久久久久久久99蜜臂| 欧美无乱码久久久免费午夜一区| 91丨九色丨黑人外教| 丰满亚洲少妇av| 成人妖精视频yjsp地址| 狠狠v欧美v日韩v亚洲ⅴ| 日本亚洲最大的色成网站www| 一区二区三区免费在线观看| 国产精品久久二区二区| 国产精品视频麻豆| 国产精品福利影院| 国产精品视频九色porn| 国产精品久久久久久久久久久免费看 | 色狠狠桃花综合| 日本乱码高清不卡字幕| 91传媒视频在线播放| 色婷婷国产精品综合在线观看| 91毛片在线观看| 在线一区二区三区| 欧美性极品少妇| 欧美精品久久99久久在免费线| 在线播放中文字幕一区| 欧美一区二区在线视频| 日韩色视频在线观看| 精品99一区二区| 国产日韩欧美精品一区| 国产精品久久久一区麻豆最新章节| 亚洲国产成人一区二区三区| 中文字幕一区二区三区不卡在线| 18成人在线视频| 亚洲成精国产精品女| 日本在线播放一区二区三区| 久久超碰97人人做人人爱| 国产一区二区毛片| 色综合欧美在线| 欧美日韩精品一区视频| 91精品国产麻豆| 久久先锋影音av| 最新欧美精品一区二区三区| 亚洲欧美另类图片小说| 午夜精品一区二区三区电影天堂| 日韩电影在线一区| 国产成人免费视频| 91香蕉国产在线观看软件| 欧美三级电影在线观看| 久久人人97超碰com| 亚洲人xxxx| 韩国理伦片一区二区三区在线播放 | 久久久久久久久97黄色工厂| 中文字幕五月欧美| 奇米色777欧美一区二区| 成人涩涩免费视频| 欧美日韩一区二区在线观看| 精品久久久久久久久久久久久久久久久| 国产亚洲精品久| 亚洲一区电影777| 久久精品国产亚洲5555| av爱爱亚洲一区| 日韩视频一区在线观看| 综合色天天鬼久久鬼色| 美女免费视频一区| 色94色欧美sute亚洲13| 久久久久久久久99精品| 亚洲午夜久久久久| 成人黄色小视频在线观看| 欧美一区二区精品久久911| 中文字幕一区二区三区四区| 国产精品一区二区久激情瑜伽| 91在线精品一区二区| 精品国产91洋老外米糕| 亚洲午夜久久久久久久久久久 | 精品国产乱码久久久久久久久| 亚洲精品欧美激情| 国产激情视频一区二区三区欧美| 欧美精品xxxxbbbb| 亚洲卡通欧美制服中文| 成人av资源站| 精品电影一区二区| 日韩中文字幕不卡| 欧美亚洲综合另类| |精品福利一区二区三区| 国产一区二区三区香蕉| 91精品国产美女浴室洗澡无遮挡| 亚洲精品一卡二卡| 成人动漫av在线| 国产欧美一区二区三区在线看蜜臀| 日韩国产欧美在线播放| 欧美综合视频在线观看| 国产精品久久一卡二卡| 丁香另类激情小说| 国产偷国产偷亚洲高清人白洁 | 激情都市一区二区| 欧美久久久影院| 亚洲韩国精品一区| 在线日韩av片| 亚洲国产欧美在线人成| 97精品久久久久中文字幕| 国产精品白丝在线| 丁香亚洲综合激情啪啪综合| 国产三级一区二区| 国产麻豆日韩欧美久久| 久久久精品免费免费| 国产99精品国产| 国产精品久久久一区麻豆最新章节| 国产激情一区二区三区四区| 国产视频一区在线播放| 国产ts人妖一区二区| 亚洲国产精品v| 99re这里只有精品视频首页| 亚洲欧美国产77777| 色久综合一二码| 天天av天天翘天天综合网| 欧美日本在线视频| 久久丁香综合五月国产三级网站| 欧美成人a视频| 国产精品白丝jk白祙喷水网站 | 欧美一级专区免费大片| 理论电影国产精品| 日本一区二区三区高清不卡| 国产成人亚洲综合色影视 | 亚洲人成网站色在线观看| 99九九99九九九视频精品| 亚洲同性gay激情无套| 在线精品视频免费播放| 日韩av中文在线观看| 91麻豆精品91久久久久久清纯| 久久精品99久久久| 国产精品第五页| 欧美四级电影网| 精品在线一区二区| 国产清纯白嫩初高生在线观看91| 9i看片成人免费高清| 亚洲午夜日本在线观看| 欧美电影免费观看完整版| 成人黄色免费短视频| 日韩精品一级中文字幕精品视频免费观看 | 成人免费高清视频| 亚洲制服丝袜在线| 26uuu国产一区二区三区| 波波电影院一区二区三区|