The Basic code provided above is
Proton PICBASIC.I am using a 40 pin PIC18F4550 for use of PORTD in place of the 4014 shift register.
The PIC18f4550 is also 5 volt as required to interface to the HD.
A bit lengthy but the following is full Proton PICBASIC code used for HD command Identify Device:
Code:
Device = 18F4550
Config_Start
PLLDIV = 1 ;No prescale (4 MHz oscillator input drives PLL directly)
CPUDIV = OSC1_PLL2 ;[Primary Oscillator Src: /1][96 MHz PLL Src: /2]
USBDIV = 1 ;USB clock source comes directly from the primary oscillator block with no postscale
FOSC = XT_XT ;XT oscillator (XT)
FCMEN = OFF ;Fail-Safe Clock Monitor disabled
IESO = OFF ;Oscillator Switchover mode disabled
PWRT = On ;PWRT enabled
BOR = On ;Brown-out Reset enabled in hardware only (SBOREN is disabled)
BORV = 3 ;Minimum setting
VREGEN = OFF ;USB voltage regulator disabled
WDT = OFF ;WDT disabled (control is placed on the SWDTEN bit)
WDTPS = 32768 ;1:32768
CCP2MX = On ;CCP2 input/output is multiplexed with RC1
PBADEN = OFF ;PORTB<4:0> pins are configured as digital I/O on Reset
LPT1OSC = OFF ;Timer1 configured for higher power operation
MCLRE = On ;MCLR pin enabled; RE3 input pin disabled
STVREN = On ;Stack full/underflow will cause Reset
LVP = OFF ;Single-Supply ICSP disabled
ICPRT = OFF ;ICPORT disabled
XINST = OFF ;Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
Debug = OFF ;Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
CP0 = OFF ;Block 0 (000800-001FFFh) is not code-protected
CP1 = OFF ;Block 1 (002000-003FFFh) is not code-protected
CP2 = OFF ;Block 2 (004000-005FFFh) is not code-protected
CP3 = OFF ;Block 3 (006000-007FFFh) is not code-protected
CPB = OFF ;Boot block (000000-0007FFh) is not code-protected
CPD = OFF ;Data EEPROM is not code-protected
WRT0 = OFF ;Block 0 (000800-001FFFh) is not write-protected
WRT1 = OFF ;Block 1 (002000-003FFFh) is not write-protected
WRT2 = OFF ;Block 2 (004000-005FFFh) is not write-protected
WRT3 = OFF ;Block 3 (006000-007FFFh) is not write-protected
WRTC = OFF ;Configuration registers (300000-3000FFh) are not write-protected
WRTB = OFF ;Boot block (000000-0007FFh) is not write-protected
WRTD = OFF ;Data EEPROM is not write-protected
EBTR0 = OFF ;Block 0 (000800-001FFFh) is not protected from table reads executed in other blocks
EBTR1 = OFF ;Block 1 (002000-003FFFh) is not protected from table reads executed in other blocks
EBTR2 = OFF ;Block 2 (004000-005FFFh) is not protected from table reads executed in other blocks
EBTR3 = OFF ;Block 3 (006000-007FFFh) is not protected from table reads executed in other blocks
EBTRB = OFF ;Boot block (000000-0007FFh) is not protected from table reads executed in other blocks
Config_End
Optimiser_Level = 3
Xtal = 4
'PIC18F4550
' Digital input RC5 and RC4 are only available as port pins when the USB module is disabled (UCON<3> = 0)
' Unlike other PORTC pins, RC4 And RC5 do Not have
' TRISC bits associated with them. As digital ports, they
' can only function As digital inputs.
Clear
VARS_BOOKMARK_START:
Symbol TRUE = 1
Symbol FALSE = 0
Symbol sLED = PORTE.2
Symbol HD_RESET_LOW = PORTA.3
High HD_RESET_LOW
'ADDRESS LINES
Symbol HD_A0 = PORTC.1
Symbol HD_A1 = PORTC.0
Symbol HD_A2 = PORTA.5
'SELECTION SIGNALS
' Symbol HD_CS0 = PORTC.3 'C.3 NOT OK CAUSE USB PIC18F4550
Symbol HD_CS0 = PORTE.0
Symbol HD_CS1 = PORTC.2
' Symbol HD_IOWRITE = PORTC.5 C.5 NOT OK CAUSE USB PIC18F4550
Symbol HD_IOWRITE = PORTA.1 'PORTA.1 = PIC 3 = YELL = IDE 23
Low HD_IOWRITE
' Symbol HD_IOREAD = PORTC.4 C.4 NOT OK CAUSE USB PIC18F4550
Symbol HD_IOREAD = PORTA.0
High HD_IOREAD
Symbol yHD_DATA_LOWBYTE = PORTB
Symbol yHD_DATA_HIGHBYTE = PORTD
Dim wBUFFER_ARRAY50[50] As Byte
Dim yRX_ARRAY100[100] As Byte
Dim yREAD_PT As Byte
yREAD_PT = 0
Dim yWRITE_PT As Byte
yWRITE_PT = 0
Dim yRX As Byte
Dim i As Byte
Dim x As Byte
Dim y As Byte
Dim yCNT1 As Byte
Dim ySTATUS As Byte
Dim yERROR As Byte
Dim yACTIVE As Byte
Dim wTEMP As Word
Dim yTEMP As Byte
Dim iERRORS As Bit
Dim sSTRING40 As STRING * 40
Dim SERIAL_NO_ARRAY21[21] As Byte ' Create a 5 element array
VARS_BOOKMARK_END:
ADCON1 = %00001111 'A0-A12 DIGITAL
PIE1.7 = 0 'Disables the Streaming Parallel Port Interrupt PIC18F4550 PORTD
'********************
Declare Hserial_Baud 2400 'INVERT PIC TX WITH A P CHANNEL, INVERT PIC RX WITH AN N CHANNEL
INTCON = %11000000 'Enables all unmasked interrupts
PIE1.5 = 1 'Enables the USART receive interrupt
TXSTA = %00100100 '%xx1xxxxx = Transmit Enabled '%xxxxx1xx = BRGH HIGH SPEED
RCSTA = %10010000 '%1xxxxxxx = Enable serial '%xxx1xxxx = Enables continuous receive
' SPBRG = 103 '103 = 2400 AT 4 MHz AT BRGH HIGH SPEED
SPBRG = 128 '128=AVG 123=MIN/134=MAX = 2400 AT 4.9152 MHz AT BRGH HIGH SPEED
PIR1.5 = 0 'CLEAR UART RX INTERRUPT
On_Hardware_Interrupt GoTo HIGH_INTERRUPT_ROUTINE
TRISA.5 = 0
TRISA.4 = 0
TRISA.3 = 0
TRISA.2 = 0
TRISA.1 = 0
TRISA.0 = 0
TRISB=%00000000 'DATA BUS BOTH READ AND WRITE
TRISC=%10000000 'C.7 USART RX NO C.3 CAUSE USB PIC18F4550
TRISD=%11111111
TRISE.0 = 0
TRISE.1 = 0
TRISE.2 = 0
GoTo START
'********** ASSEMBLY HARDWARE Interrupt **********
HIGH_INTERRUPT_ROUTINE:
Repeat
If yWRITE_PT < 99 Then
Inc yWRITE_PT
Else
yWRITE_PT = 0
EndIf
yRX_ARRAY100[yWRITE_PT] = RCREG 'Get a character from the USART receiver
' HSerOut[" INT = ",yRX_ARRAY100[yWRITE_PT],13]
Until PIR1.5 = 0 'RX BUFFER IS EMPTY
Retfie Fast
'********** END ASSEMBLY HARDWARE Interrupt **********
'**************************
subWRITE_PULSE:
DelayUS 400 '200 OK 100 NOT 'Delay minimum of 25 ns
High HD_IOWRITE 'RISING EDGE CLOCKS DATA TO THE DRIVE
DelayUS 800 'Delay minimum of 80 ns
Low HD_IOWRITE
Return
'**************************
subREAD_PULSE:
Input PORTB
Input PORTD
DelayUS 400 'Delay minimum of 25 ns
Low HD_IOREAD 'FALLING EDGE CLOCKS DATA TO THE DRIVE
DelayUS 800 'Delay minimum of 80 ns
High HD_IOREAD
Return
'**************************
subREAD_STATUS:
' /CS0 /CS1 A2 A1 A0 Addr. Read Function Write Function
' 0 1 1 1 1 1F7 Status Register Command Register
Low HD_CS0
High HD_CS1
High HD_A2
High HD_A1
High HD_A0
Output PORTD
Output PORTB
yHD_DATA_HIGHBYTE = $1F7.HIGHBYTE '$1F7 = Status Register / Command Register
yHD_DATA_LOWBYTE = $1F7.LOWBYTE 'READ PULSE 'WRITE PULSE
GoSub subWRITE_PULSE
GoSub subREAD_PULSE 'Status Register
ySTATUS = yHD_DATA_LOWBYTE
HSerOut["DO subREAD_STATUS %",Bin8 ySTATUS," ",Dec ySTATUS,":",13]
iERRORS = FALSE 'PRESET
If ySTATUS.7 = 1 Then
HSerOut["BIT 7 = DRIVE BUSY, IGNORING ALL OTHER ERROR ROUTINES ***",13]
iERRORS = TRUE
Else
If ySTATUS.6 = 0 Then
HSerOut[" BIT 6 = DRIVE NOT UP TO SPEED AND READY FOR CMD ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.5 = 1 Then
HSerOut[" BIT 5 = DRIVE WRITE FAULT ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.4 = 0 Then
HSerOut[" BIT 4 = DRIVE SEEK NOT COMPLETE ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.3 = 0 Then
HSerOut[" BIT 3 = DRIVE NOT READY FOR DATA TRANSFER ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.2 = 1 Then
HSerOut[" BIT 2 = DRIVE CORRECTED DATA ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.1 = 1 Then
HSerOut[" BIT 1 = DRIVE RPM TICK ***",13]
iERRORS = TRUE
EndIf
If ySTATUS.0 = 1 Then
HSerOut[" BIT 0 = ERROR. DO subREAD_ERROR ***",13]
iERRORS = TRUE
GoSub subREAD_ERROR
EndIf
EndIf
If iERRORS = FALSE Then
HSerOut[" NO ERRORS",13]
EndIf
HSerOut[" DID subREAD_STATUS",13]
HSerOut[" ",13]
Return
'**************************
subREAD_ERROR:
' /CS0 /CS1 A2 A1 A0 Addr. Read Function Write Function
' 0 1 0 0 1 1F1 Error Register (Write Precomp Reg.)
Low HD_CS0
High HD_CS1
Low HD_A2
Low HD_A1
High HD_A0
Output PORTD
Output PORTB
yHD_DATA_HIGHBYTE = $1F1.HIGHBYTE '$1F1 = Error Register
yHD_DATA_LOWBYTE = $1F1.LOWBYTE
GoSub subWRITE_PULSE
GoSub subREAD_PULSE
yERROR = yHD_DATA_LOWBYTE
HSerOut["DO subREAD_ERROR %",Bin8 yERROR," ",Dec yERROR,":",13]
iERRORS = FALSE 'PRESET
If yERROR.7 = 1 Then
HSerOut[" BIT 7 = BAD BLOCK ***",13]
iERRORS = TRUE
EndIf
If yERROR.6 = 1 Then
HSerOut[" BIT 6 = UNCORRECTABLE DATA ERROR ***",13]
iERRORS = TRUE
EndIf
If yERROR.4 = 1 Then
HSerOut[" BIT 4 = SECTOR ID NOT FOUND ***",13]
iERRORS = TRUE
EndIf
If yERROR.2 = 1 Then
HSerOut[" BIT 2 = DRIVE STATUS ERROR OR INVALID COMMAND ***",13]
iERRORS = TRUE
EndIf
If yERROR.1 = 1 Then
HSerOut[" BIT 1 = TRACK 0 NOT FOUND WHEN RECALIBRATING ***",13]
iERRORS = TRUE
EndIf
If iERRORS = FALSE Then
HSerOut[" NO ERRORS !!!",13]
EndIf
HSerOut[" DID subREAD_ERROR",13]
HSerOut[" ",13]
Return
'**************************
subWAIT_TILL_STATUS_LESS_THAN128:
yCNT1 = 5
HSerOut["DO subWAIT_TILL_STATUS_LESS_THAN128",13]
Repeat
GoSub subREAD_STATUS
Dec yCNT1
If ySTATUS < 128 Then
yCNT1 = 100 'ESCAPE
Else
HSerOut["DOING subWAIT_TILL_STATUS_LESS_THAN128 ",Dec yCNT1,13]
EndIf
DelayMS 100
Until yCNT1 = 0 Or yCNT1 = 100
If yCNT1 = 0 Then
HSerOut[" subWAIT_TILL_STATUS_LESS_THAN128 TIMED OUT ***",13]
Else
HSerOut[" subWAIT_TILL_STATUS_LESS_THAN128 OK !!!",13]
EndIf
HSerOut[" DID subWAIT_TILL_STATUS_LESS_THAN128",13]
HSerOut[" ",13]
Return
'**************************
subGET_DRIV_INFO:
HSerOut["DO subGET_DRIV_INFO",13] 'DRIVE CAN BE IN SLEEP MODE?
' /CS0 /CS1 A2 A1 A0 Addr. Read Function Write Function
' 0 1 1 1 1 1F7 Status Register Command Register
Low HD_CS0
High HD_CS1
High HD_A2
High HD_A1
High HD_A0
Output PORTD
Output PORTB
yHD_DATA_HIGHBYTE = $1F7.HIGHBYTE
yHD_DATA_LOWBYTE = $1F7.LOWBYTE
GoSub subWRITE_PULSE
yHD_DATA_HIGHBYTE = $EC.HIGHBYTE '$EC = get 255 BYTE ASCII drive info
yHD_DATA_LOWBYTE = $EC.LOWBYTE
GoSub subWRITE_PULSE
DelayUS 400
'SET PARAMETERS FOR DATA REGISTER
' /CS0 /CS1 A2 A1 A0 Addr. Read Function Write Function
' 0 1 0 0 0 1F0 Data Register Data Register
Low HD_CS0
High HD_CS1
Low HD_A2
Low HD_A1
Low HD_A0
Output PORTD
Output PORTB
yHD_DATA_HIGHBYTE = $1F0.HIGHBYTE '$1F0 = SET TO Data Register
yHD_DATA_LOWBYTE = $1F0.LOWBYTE
GoSub subWRITE_PULSE
Input PORTD
Input PORTB
' DelayUS 400 'Delay minimum of 25 ns
For i = 0 To 255
GoSub subREAD_PULSE
If i <= 49 Then 'only 0 to 49 is used
wTEMP.HighByte = yHD_DATA_HIGHBYTE
wTEMP.LowByte = yHD_DATA_LOWBYTE
wBUFFER_ARRAY50[i] = wTEMP
EndIf
Next
For i = 0 To 49 'only 0 to 49 is used
wTEMP = wBUFFER_ARRAY50[i]
HSerOut[" READ wBUFFER_ARRAY50[",Dec3 i,"] = ",Dec3 wTEMP.HighByte,"'",DEC3 wTEMP.LowByte," = ",Dec3 wTEMP,13]
Next
HSerOut[Dec3 wBUFFER_ARRAY50[0]," = Configuration/ID Word",13]
HSerOut[Dec3 wBUFFER_ARRAY50[1]," = Number of fixed cylinders",13]
HSerOut[Dec3 wBUFFER_ARRAY50[2]," = No. of removable cylinders",13]
HSerOut[Dec3 wBUFFER_ARRAY50[3]," = No. of heads",13]
HSerOut[Dec3 wBUFFER_ARRAY50[4]," = No. of unformatted bytes per physical track",13]
HSerOut[Dec3 wBUFFER_ARRAY50[5]," = No. of unformatted bytes per sector",13]
HSerOut[Dec3 wBUFFER_ARRAY50[6]," = No. of phyical sectors per Tracks",13]
HSerOut[Dec3 wBUFFER_ARRAY50[7]," = No. of bytes in the inter-sector gaps",13]
HSerOut[Dec3 wBUFFER_ARRAY50[8]," = No. of bytes in the sync fields",13]
sSTRING40 = ""
For i = 10 To 19
wTEMP = wBUFFER_ARRAY50[i]
yTEMP = wTEMP.HighByte
' yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + Str$(Dec yTEMP)
yTEMP = wTEMP.LowByte
' yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + Str$(Dec yTEMP)
Next
HSerOut[sSTRING40," = Serial number1",13]
sSTRING40 = ""
For i = 10 To 19
wTEMP = wBUFFER_ARRAY50[i]
yTEMP = wTEMP.HighByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
yTEMP = wTEMP.LowByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
Next
HSerOut[sSTRING40," = Serial number2a",13]
sSTRING40 = ""
For i = 10 To 19
wTEMP = wBUFFER_ARRAY50[i]
yTEMP = wTEMP.LowByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
yTEMP = wTEMP.HighByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
Next
HSerOut[sSTRING40," = Serial number2b",13]
y = 0
For x = 10 To 19
wTEMP = wBUFFER_ARRAY50[x]
SERIAL_NO_ARRAY21[y] = wTEMP.HighByte + 48
Inc y
SERIAL_NO_ARRAY21[y] = wTEMP.LowByte + 48
Inc y
Next
SERIAL_NO_ARRAY21[y] = 0 ' Add the null Terminator
HSerOut[Str SERIAL_NO_ARRAY21," = Serial number3",13]
HSerOut[Dec3 wBUFFER_ARRAY50[20]," = Controller type",13]
HSerOut[Dec3 wBUFFER_ARRAY50[21]," = Controller buffer size (in sectors)",13]
HSerOut[Dec3 wBUFFER_ARRAY50[22]," = No. of ECC bytes on 'long' commands",13]
sSTRING40 = ""
For i = 23 To 26
wTEMP = wBUFFER_ARRAY50[i]
yTEMP = wTEMP.HighByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
yTEMP = wTEMP.LowByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
Next
HSerOut[sSTRING40," = Controller firmware revision",13]
sSTRING40 = ""
For i = 27 To 46
wTEMP = wBUFFER_ARRAY50[i]
yTEMP = wTEMP.HighByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
yTEMP = wTEMP.LowByte
yTEMP = yTEMP + 48
sSTRING40 = sSTRING40 + yTEMP
Next
HSerOut[sSTRING40," = Model number",13]
HSerOut[Dec3 wBUFFER_ARRAY50[47]," = No. of sectors/interrupt, (0 = no support)",13]
HSerOut[Dec3 wBUFFER_ARRAY50[48]," = Double word transfer flag, (1 = capable)",13]
HSerOut[Dec3 wBUFFER_ARRAY50[49]," = Write protected",13]
HSerOut[" DID subGET_DRIV_INFO",13]
HSerOut[" ",13]
Return
'**************************
'**************************
START:
DelayMS 1000
HSerOut[" ",13]
HSerOut["START:",13]
GoSub subWAIT_TILL_STATUS_LESS_THAN128
MAIN:
DelayMS 1000
Toggle sLED
If yREAD_PT <> yWRITE_PT Then
Repeat
If yREAD_PT < 99 Then
Inc yREAD_PT
Else
yREAD_PT = 0
EndIf
yRX = yRX_ARRAY100[yREAD_PT]
Select yRX
Case "1"
GoSub subGET_DRIV_INFO
Case "2"
GoSub subREAD_STATUS
Case Else
HSerOut[" '",yRX_ARRAY100[yREAD_PT],"' IS AN INVALID CMD",13]
End Select
Until yREAD_PT = yWRITE_PT
EndIf
GoTo MAIN
End
I am using Hperterminal to send command 1 to start subGET_DRIV_INFO or 2 to start the PIC subroutines and subREAD_STATUS.
The subREAD_STATUS always returns a "BIT 6 = DRIVE NOT UP TO SPEED AND READY FOR CMD ***" and a subREAD_ERROR " BIT 2 = DRIVE STATUS ERROR OR INVALID COMMAND ***".
The following is the Hperterminal display of readouts from subroutines called 2DO subREAD_STATUS followed by 1DO subGET_DRIV_INFO.
Code:
START:
DO subWAIT_TILL_STATUS_LESS_THAN128
DO subREAD_STATUS %00010001 17:
BIT 6 = DRIVE NOT UP TO SPEED AND READY FOR CMD ***
BIT 3 = DRIVE NOT READY FOR DATA TRANSFER ***
BIT 0 = ERROR. DO subREAD_ERROR ***
DO subREAD_ERROR %00000100 4:
BIT 2 = DRIVE STATUS ERROR OR INVALID COMMAND ***
DID subREAD_ERROR
DID subREAD_STATUS
subWAIT_TILL_STATUS_LESS_THAN128 OK !!!
DID subWAIT_TILL_STATUS_LESS_THAN128
2DO subREAD_STATUS %00010001 17:
BIT 6 = DRIVE NOT UP TO SPEED AND READY FOR CMD ***
BIT 3 = DRIVE NOT READY FOR DATA TRANSFER ***
BIT 0 = ERROR. DO subREAD_ERROR ***
DO subREAD_ERROR %00000100 4:
BIT 2 = DRIVE STATUS ERROR OR INVALID COMMAND ***
DID subREAD_ERROR
DID subREAD_STATUS
1DO subGET_DRIV_INFO
READ wBUFFER_ARRAY50[000] = 000'001 = 001
READ wBUFFER_ARRAY50[001] = 000'001 = 001
READ wBUFFER_ARRAY50[002] = 000'026 = 026
READ wBUFFER_ARRAY50[003] = 000'063 = 063
READ wBUFFER_ARRAY50[004] = 000'000 = 000
READ wBUFFER_ARRAY50[005] = 000'016 = 016
READ wBUFFER_ARRAY50[006] = 000'000 = 000
READ wBUFFER_ARRAY50[007] = 000'050 = 050
READ wBUFFER_ARRAY50[008] = 000'063 = 063
READ wBUFFER_ARRAY50[009] = 000'000 = 000
READ wBUFFER_ARRAY50[010] = 000'000 = 000
READ wBUFFER_ARRAY50[011] = 000'020 = 020
READ wBUFFER_ARRAY50[012] = 000'055 = 055
READ wBUFFER_ARRAY50[013] = 000'049 = 049
READ wBUFFER_ARRAY50[014] = 000'049 = 049
READ wBUFFER_ARRAY50[015] = 000'053 = 053
READ wBUFFER_ARRAY50[016] = 000'050 = 050
READ wBUFFER_ARRAY50[017] = 000'056 = 056
READ wBUFFER_ARRAY50[018] = 000'032 = 032
READ wBUFFER_ARRAY50[019] = 000'032 = 032
READ wBUFFER_ARRAY50[020] = 000'032 = 032
READ wBUFFER_ARRAY50[021] = 000'032 = 032
READ wBUFFER_ARRAY50[022] = 000'003 = 003
READ wBUFFER_ARRAY50[023] = 000'032 = 032
READ wBUFFER_ARRAY50[024] = 000'004 = 004
READ wBUFFER_ARRAY50[025] = 000'048 = 048
READ wBUFFER_ARRAY50[026] = 000'046 = 046
READ wBUFFER_ARRAY50[027] = 000'053 = 053
READ wBUFFER_ARRAY50[028] = 000'048 = 048
READ wBUFFER_ARRAY50[029] = 000'001 = 001
READ wBUFFER_ARRAY50[030] = 000'020 = 020
READ wBUFFER_ARRAY50[031] = 000'018 = 018
READ wBUFFER_ARRAY50[032] = 000'052 = 052
READ wBUFFER_ARRAY50[033] = 000'048 = 048
READ wBUFFER_ARRAY50[034] = 000'048 = 048
READ wBUFFER_ARRAY50[035] = 000'049 = 049
READ wBUFFER_ARRAY50[036] = 000'032 = 032
READ wBUFFER_ARRAY50[037] = 000'032 = 032
READ wBUFFER_ARRAY50[038] = 000'032 = 032
READ wBUFFER_ARRAY50[039] = 000'032 = 032
READ wBUFFER_ARRAY50[040] = 000'032 = 032
READ wBUFFER_ARRAY50[041] = 000'032 = 032
READ wBUFFER_ARRAY50[042] = 000'032 = 032
READ wBUFFER_ARRAY50[043] = 000'032 = 032
READ wBUFFER_ARRAY50[044] = 000'032 = 032
READ wBUFFER_ARRAY50[045] = 000'032 = 032
READ wBUFFER_ARRAY50[046] = 000'032 = 032
READ wBUFFER_ARRAY50[047] = 000'032 = 032
READ wBUFFER_ARRAY50[048] = 000'032 = 032
READ wBUFFER_ARRAY50[049] = 000'016 = 016
001 = Configuration/ID Word
001 = Number of fixed cylinders
026 = No. of removable cylinders
063 = No. of heads
000 = No. of unformatted bytes per physical track
016 = No. of unformatted bytes per sector
000 = No. of phyical sectors per Tracks
050 = No. of bytes in the inter-sector gaps
063 = No. of bytes in the sync fields
00020055049049053050056032032 = Serial number1
000D0g0a0a0e0b0h0P0P = Serial number2a
00D0g0a0a0e0b0h0P0P0 = Serial number2b
000D0g0a0a0e0b0h0P0P = Serial number3
032 = Controller type
032 = Controller buffer size (in sectors)
003 = No. of ECC bytes on 'long' commands
0P040`0^ = Controller firmware revision
0e0`010D0B0d0`0`0a0P0P0P0P0P0P0P0P0P0P0P = Model number
032 = No. of sectors/interrupt, (0 = no support)
032 = Double word transfer flag, (1 = capable)
016 = Write protected
DID subGET_DRIV_INFO