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

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

?? ide.h

?? usb接口的移動硬盤
?? H
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************
   本程序只供學習使用,未經作者許可,不得用于其它任何用途
      我的郵箱:computer-lov@tom.com
        歡迎訪問我的blog:  http://computer00.21ic.org

IDE.H File    IDE address and command

Created by Computer-lov
Date: 2005.3.12

Edit date:2006.3.2

Version V1.1
Copyright(C) Computer-lov 2005-2015
All rigths reserved
             
*******************************************************************/

#ifndef __IDE_H__
#define __IDE_H__

void reset_IDE(void);
void read_IDE_16(unsigned char);
void write_IDE_16(unsigned char);
unsigned char read_IDE_8(unsigned char);
void write_IDE_8(unsigned char,unsigned char);
void read_IDE_data(void);
void write_IDE_data(void);
void read_IDE_status(void);
void read_IDE_error(void);
unsigned char wait_IDE_busy(void);
void write_IDE_command(unsigned char);
void soft_reset_IDE(void);
void get_IDE_infromation(void);
void write_IDE_LBA0(unsigned char);
void write_IDE_LBA1(unsigned char);
void write_IDE_LBA2(unsigned char);
void write_IDE_LBA3(unsigned char);
void write_IDE_sector_count(unsigned char);
void read_IDE_buffer(void);
void write_IDE_buffer(void);
void read_IDE_sector(void);
void write_IDE_sector(void);
void IDE_initial(void);
void system_initial(void);
extern unsigned char IDE_Buffer_L,IDE_Buffer_H;
extern unsigned char DISK_CAPACITY[8];

#define set_IDE_address() IDE_ALE=1;IDE_ALE=0;


/*                       TABLE 6-1:  INTERFACE SIGNALS 
 +----------------------------------+                         +-----------+
 |         HOST  I/O                |                         | DRIVE I/O | 
 |         CONNECTOR                |                         | CONNECTOR | 
 |                                  |                         |           | 
 | HOST RESET                     1 | -----  RESET-  -------->| 1         | 
 |                                2 | -----  Ground  -------- | 2         | 
 | HOST DATA BUS BIT 7            3 |<-----  DD7  ----------->| 3         | 
 | HOST DATA BUS BIT 8            4 |<-----  DD8  ----------->| 4         | 
 | HOST DATA BUS BIT 6            5 |<-----  DD6  ----------->| 5         | 
 | HOST DATA BUS BIT 9            6 |<-----  DD9  ----------->| 6         | 
 | HOST DATA BUS BIT 5            7 |<-----  DD5  ----------->| 7         | 
 | HOST DATA BUS BIT 10           8 |<-----  DD10  ---------->| 8         | 
 | HOST DATA BUS BIT 4            9 |<-----  DD4  ----------->| 9         | 
 | HOST DATA BUS BIT 11          10 |<-----  DD11  ---------->| 10        | 
 | HOST DATA BUS BIT 3           11 |<-----  DD3  ----------->| 11        | 
 | HOST DATA BUS BIT 12          12 |<-----  DD12  ---------->| 12        | 
 | HOST DATA BUS BIT 2           13 |<-----  DD2  ----------->| 13        | 
 | HOST DATA BUS BIT 13          14 |<-----  DD13  ---------->| 14        | 
 | HOST DATA BUS BIT 1           15 |<-----  DD1  ----------->| 15        | 
 | HOST DATA BUS BIT 14          16 |<-----  DD14  ---------->| 16        | 
 | HOST DATA BUS BIT 0           17 |<-----  DD0  ----------->| 17        | 
 | HOST DATA BUS BIT 15          18 |<-----  DD15  ---------->| 18        | 
 |                               19 | -----  Ground  -------- | 19        | 
 |                               20 | -----  (keypin)  ------ | 20        | 
 | DMA REQUEST                   21 |<-----  DMARQ  --------- | 21        | 
 |                               22 | -----  Ground  -------- | 22        | 
 | HOST I/O WRITE                23 | -----  DIOW-  --------->| 23        | 
 |                               24 | -----  Ground  -------- | 24        | 
 | HOST I/O READ                 25 | -----  DIOR-  --------->| 25        | 
 |                               26 | -----  Ground  -------- | 26        | 
 | I/O CHANNEL READY             27 |<-----  IORDY  --------- | 27        | 
 | SPINDLE SYNC or CABLE SELECT  28 |*---- SPSYNC:CSEL  -----*| 28        | 
 | DMA ACKNOWLEDGE               29 | -----  DMACK-  -------->| 29        | 
 |                               30 | -----  Ground  -------- | 30        | 
 | HOST INTERRUPT REQUEST        31 |<-----  INTRQ  --------- | 31        | 
 | HOST 16 BIT I/O               32 |<-----  IOCS16-  ------- | 32        | 
 | HOST ADDRESS BUS BIT 1        33 | -----  DA1  ----------->| 33        | 
 | PASSED DIAGNOSTICS            34 |*-----  PDIAG-  --------*| 34        | 
 | HOST ADDRESS BUS BIT 0        35 | -----  DAO  ----------->| 35        | 
 | HOST ADDRESS BUS BIT 2        36 | -----  DA2  ----------->| 36        | 
 | HOST CHIP SELECT 0            37 | -----  CS1FX-  -------->| 37        | 
 | HOST CHIP SELECT 1            38 | -----  CS3FX-  -------->| 38        | 
 | DRIVE ACTIVE/DRIVE 1 PRESENT  39 |<-----  DASP-  ---------*| 39        | 
 |                               40 | -----  Ground  -------- | 40        | 
 +----------------------------------+                         +-----------+

                     * Drive Intercommunication Signals
*/

/*
DATA BUS 0-7   <====>  P1
DATA BUS 8-16  <====>  P2
IORDY  ---->P34
ALE   <-----P33
DIOW  <-----P36
DIOR  <-----P37
*/

#include <at89X52.h>


#define IDE_DATA_L P1
#define IDE_DATA_H P2
#define IDE_IORDY  P3_4
#define IDE_DIOW   P3_0
#define IDE_DIOR   P3_1
#define IDE_ALE    P3_3



/*
Logic conventions are:   A = signal asserted
                         N = signal negated
                         x = does not matter which it is

            TABLE 7-1:  I/O PORT FUNCTIONS/SELECTION ADDRESSES 
 +-------------------------------+-----------------------------------------+
 |         Addresses             |                 Functions               |
 |CS1FX-|CS3FX-| DA2 | DA1 | DA0 |    READ (DIOR-)     |   WRITE (DIOW-)   |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |                                        Control Block Registers          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |  N   |  N   |  x  |  x  |  x  | Data Bus High Imped | Not used          |
 |  N   |  A   |  0  |  x  |  X  | Data Bus High Imped | Not used          |
 |  N   |  A   |  1  |  0  |  x  | Data Bus High Imped | Not used          |
 |  N   |  A   |  1  |  1  |  0  | Alternate Status    | Device Control    | 
 |  N   |  A   |  1  |  1  |  1  | Drive Address       | Not used          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |                                        Command Block Registers          |
 +------+------+-----+-----+-----+---------------------+-------------------+
 |  A   |  N   |  0  |  0  |  0  | Data                | Data              |
 |  A   |  N   |  0  |  0  |  1  | Error Register      | Features          |
 |  A   |  N   |  0  |  1  |  0  | Sector Count        | Sector Count      |
 |  A   |  N   |  0  |  1  |  1  | Sector Number       | Sector Number     | 
 |  A   |  N   |  0  |  1  |  1  | * LBA Bits  0- 7    | * LBA Bits  0- 7  |
 |  A   |  N   |  1  |  0  |  0  | Cylinder Low        | Cylinder Low      |
 |  A   |  N   |  1  |  0  |  0  | * LBA Bits  8-15    | * LBA Bits  8-15  |
 |  A   |  N   |  1  |  0  |  1  | Cylinder High       | Cylinder High     | 
 |  A   |  N   |  1  |  0  |  1  | * LBA Bits 16-23    | * LBA Bits 16-23  |
 |  A   |  N   |  1  |  1  |  0  | Drive/Head          | Drive/Head        |
 |  A   |  N   |  1  |  1  |  0  | * LBA Bits 24-27    | * LBA Bits 24-27  |
 |  A   |  N   |  1  |  1  |  1  | Status              | Command           |
 |  A   |  A   |  x  |  x  |  x  | Invalid Address     | Invalid Address   |
 +------+------+-----+-----+-----+---------------------+-------------------+
                      * Mapping of registers in LBA Mode
*/

/*
DA0   ----->   P10
DA1   ----->   P11
DA3   ----->   P12
CS1FX ----->   P13
CS3FX ----->   P14
CSEL  ----->   P15
RESET ----->   P17
*/

#define IDE_Address                 P1

/*
#define IDE_Bus_Not_Use             0x00
#define IDE_Alternate_Status        0x16
#define IDE_Device_Control          0x16
#define IDE_Drive_Address           0x17

#define IDE_Data                    0x08
#define IDE_Error_Register          0x09
#define IDE_Features                0x09
#define IDE_Sector_Count            0x0A
#define IDE_Sector_Nuber            0x0B
#define IDE_LBA_Bits_0_7            0x0B
#define IDE_Cylinder_Low            0x0C
#define IDE_LBA_Bits_8_15           0x0C
#define IDE_Cylinder_High           0x0D
#define IDE_LBA_Bits_16_23          0x0D
#define IDE_Drive_Head              0x0E
#define IDE_LBA_Bits_24_27          0x0E
#define IDE_Status                  0x0F
#define IDE_Command                 0x0F
#define IDE_Reset                   0x80
*/

#define IDE_Bus_Not_Use             0x98
#define IDE_Alternate_Status        0x8E
#define IDE_Device_Control          0x8E
#define IDE_Drive_Address           0x8F

#define IDE_Data                    0x90
#define IDE_Error_Register          0x91
#define IDE_Features                0x91
#define IDE_Sector_Count            0x92
#define IDE_Sector_Nuber            0x93
#define IDE_LBA_Bits_0_7            0x93
#define IDE_Cylinder_Low            0x94
#define IDE_LBA_Bits_8_15           0x94
#define IDE_Cylinder_High           0x95
#define IDE_LBA_Bits_16_23          0x95
#define IDE_Drive_Head              0x96
#define IDE_LBA_Bits_24_27          0x96
#define IDE_Status                  0x97
#define IDE_Command                 0x97

#define IDE_Reset                   0x18

/*
 Alternate Status Register
         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |  BSY  | DRDY  |  DWF  |  DSC  |  DRQ  | CORR  |  IDX  |  ERR  | 
     +-------+-------+-------+-------+-------+-------+-------+-------+
*/

/*
7.2.2  Command Register 

This register contains the command code being sent to the drive. Command 
execution begins immediately after this register is written. The executable 
commands, the command codes, and the necessary parameters for each command are 
listed in Table 9-1.
*/

/*
7.2.3  Cylinder High Register

This register contains the high order bits of the starting cylinder address 
for any disk access. At the end of the command, this register is updated to 
reflect the current cylinder number. The most significant bits of the cylinder 
address shall be loaded into the cylinder high Register. 

In LBA Mode this register contains Bits 16-23. At the end of the command, this 
register is updated to reflect the current LBA Bits 16-23.

  NOTE: Prior to the introduction of this standard, only the lower 2 bits of 
        this register were valid, limiting cylinder address to 10 bits i.e. 
        1,024 cylinders.
*/

/*
7.2.4  Cylinder Low Register

This register contains the low order 8 bits of the starting cylinder address 
for any disk access. At the end of the command, this register is updated to 
reflect the current cylinder number. 

In LBA Mode this register contains Bits 8-15. At the end of the command, this 
register is updated to reflect the current LBA Bits 8-15.

7.2.5  Data Register

This 16-bit register is used to transfer data blocks between the device data 
buffer and the host. It is also the register through which sector information 
is transferred on a Format Track command. Data transfers may be either PIO or 
DMA. 
*/

/*
7.2.6  Device Control Register

The bits in this register are as follows: 

         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |   x   |   x   |   x   |   x   |   1   | SRST  |  nIEN |   0   | 
     +-------+-------+-------+-------+-------+-------+-------+-------+

 - SRST is the host software reset bit. The drive is held reset when this bit 
   is set. If two disk drives are daisy chained on the interface, this bit 
   resets both simultaneously. Drive 1 is not required to execute the DASP- 
   handshake procedure.
 - nIEN is the enable bit for the drive interrupt to the host. When nIEN=0, 
   and the drive is selected, INTRQ shall be enabled through a tri-state 
   buffer. When nIEN=1, or the drive is not selected, the INTRQ signal shall 
   be in a high impedance state. 

*/


/*
7.2.7  Drive Address Register

This register contains the inverted drive select and head select addresses of 
the currently selected drive. The bits in this register are as follows: 

         7       6       5       4       3       2       1       0 
     +-------+-------+-------+-------+-------+-------+-------+-------+
     |  HiZ  |  nWTG |  nHS3 |  nHS2 |  nHS1 |  nHS0 |  nDS1 |  nDS0 | 
     +-------+-------+-------+-------+-------+-------+-------+-------+

 - HiZ shall always be in a high impedance state. 
 - nWTG is the Write Gate bit. When writing to the disk drive is in progress, 
   nWTG=0.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区色视频| 在线观看国产91| 7777女厕盗摄久久久| 亚洲男人的天堂av| 风间由美中文字幕在线看视频国产欧美| 欧美日韩高清一区二区不卡| 国产精品久久久久久一区二区三区| 麻豆精品一区二区av白丝在线| 欧美性大战久久| 亚洲一区二区欧美| 色婷婷狠狠综合| 一区二区三区精品| 91在线小视频| 亚洲美女在线一区| 色婷婷综合激情| 一区二区三区蜜桃网| 在线观看日韩av先锋影音电影院| 一区二区三区欧美视频| 欧美日韩在线一区二区| 首页欧美精品中文字幕| 日韩一区二区电影| 国产一区二区三区在线观看免费 | 欧美大片日本大片免费观看| 奇米在线7777在线精品| 久久影院午夜论| 99久久婷婷国产综合精品| 一区二区视频在线| 欧美高清你懂得| 狠狠色伊人亚洲综合成人| 国产校园另类小说区| 91蜜桃免费观看视频| 午夜成人在线视频| 日韩一卡二卡三卡四卡| 高清国产一区二区三区| 亚洲欧美日韩国产手机在线 | 五月天丁香久久| 欧美日韩视频不卡| 国产一区二区福利| 亚洲免费看黄网站| 这里只有精品电影| 成人av在线看| 日韩国产精品大片| 国产精品美女久久久久久久久| 91国模大尺度私拍在线视频| 欧美aaa在线| 亚洲免费av观看| 久久精品视频一区二区三区| 91官网在线观看| 国产一区二区在线电影| 一区二区三区在线免费视频 | 美女尤物国产一区| 亚洲人被黑人高潮完整版| 欧美日韩精品一区二区三区四区| 国产一区二区美女| 亚洲国产精品久久久久婷婷884| 日韩欧美的一区| 欧美色男人天堂| 色综合久久精品| 国产91丝袜在线观看| 久久99久久99| 麻豆成人91精品二区三区| 久久久国产一区二区三区四区小说| 97se亚洲国产综合在线| 日韩av午夜在线观看| 一区av在线播放| 国产精品传媒在线| 久久久久久久久久久久久夜| 91福利视频久久久久| 成人av先锋影音| 国产伦精品一区二区三区免费迷| 亚洲综合在线观看视频| 久久久久久久久蜜桃| 精品久久久久久综合日本欧美| 欧美亚洲动漫制服丝袜| 色综合久久久久综合体桃花网| 国产综合成人久久大片91| 男人操女人的视频在线观看欧美| 亚洲一区二区视频在线观看| 国产精品久久777777| 久久综合九色欧美综合狠狠| 久久日一线二线三线suv| 精品成人一区二区三区| 欧美mv日韩mv国产| 国产亚洲欧美色| 国产午夜亚洲精品不卡| 欧美国产精品中文字幕| 久久精品在线观看| 国产免费久久精品| 久久久99精品免费观看| 国产精品色噜噜| 亚洲激情校园春色| 亚洲国产精品尤物yw在线观看| 亚洲大尺度视频在线观看| 亚洲一二三四区| 夜夜操天天操亚洲| 九九久久精品视频| 高清免费成人av| 欧美三级电影在线看| 日韩一区二区视频| 久久久久久免费毛片精品| 亚洲乱码国产乱码精品精98午夜 | 欧美最猛黑人xxxxx猛交| 欧美日韩国产一区二区三区地区| 91精品久久久久久蜜臀| 国产精品欧美久久久久一区二区| 亚洲精品国产一区二区精华液| 1024精品合集| 精彩视频一区二区三区 | 久久久久国色av免费看影院| 最近日韩中文字幕| 麻豆国产欧美一区二区三区| 成人av网站免费| 日韩视频不卡中文| 日韩毛片视频在线看| 日韩电影在线一区| 一本色道久久综合亚洲精品按摩| 88在线观看91蜜桃国自产| 中文字幕一区二区三区av| 日韩高清不卡在线| 亚洲图片有声小说| 精品亚洲成a人| 欧美顶级少妇做爰| 一区二区三区四区高清精品免费观看| 奇米四色…亚洲| 91精品办公室少妇高潮对白| 久久久久久久久久久99999| 奇米色一区二区| 欧美日韩在线观看一区二区 | 乱中年女人伦av一区二区| 91丨九色porny丨蝌蚪| 国产欧美一区在线| 久久国内精品自在自线400部| 欧美亚洲国产一区二区三区 | 成人动漫av在线| 国产日韩成人精品| 国产91富婆露脸刺激对白| 日韩精品影音先锋| 久色婷婷小香蕉久久| 欧美喷潮久久久xxxxx| 亚洲一线二线三线视频| 一本久久a久久免费精品不卡| 国产精品萝li| aaa亚洲精品一二三区| 日韩美女久久久| 欧美性大战久久久| 青娱乐精品视频| 欧美一区二区三区系列电影| 亚洲电影在线播放| 91精品国产色综合久久不卡电影| 亚洲成av人在线观看| 欧美福利视频导航| 国产美女精品人人做人人爽| 久久久噜噜噜久久中文字幕色伊伊| 国产剧情在线观看一区二区| 国产无一区二区| 成人少妇影院yyyy| 日产国产欧美视频一区精品| 精品日韩在线观看| 91在线视频观看| 亚洲国产sm捆绑调教视频| 欧美一区二区三区在线| 99热99精品| 视频一区视频二区中文| 国产亚洲精品超碰| 色婷婷av一区二区三区大白胸| 午夜精品久久久久久久| 欧美变态口味重另类| 91国在线观看| 成人福利在线看| 麻豆精品一区二区av白丝在线| 中文字幕精品一区二区三区精品| 欧美另类一区二区三区| 青青草国产成人av片免费| 久久久久久免费网| 欧美一区二区播放| 日本韩国精品在线| 国产成人免费av在线| 日韩精品一二三区| 自拍偷拍亚洲综合| 欧美一区二区三区婷婷月色| 高清在线观看日韩| 韩国av一区二区三区在线观看| 亚洲美女区一区| 中文字幕在线观看不卡| 精品久久久久久久久久久久久久久久久 | 在线精品观看国产| 欧美精品在线观看播放| 精品亚洲porn| 久久99久久久久久久久久久| 亚洲大尺度视频在线观看| 一区二区三区美女视频| 亚洲私人黄色宅男| 国产精品视频第一区| 久久久久久久久久电影| 久久久久久久网| 欧美大片国产精品| 欧美日本在线一区| 一本到不卡免费一区二区| 99热这里都是精品| 91免费视频网址|