TI-H: Next Section...


[Prev][Next][Index][Thread]

TI-H: Next Section...




SendCSH:
********ldi	ADRa, 0b11010100	;Send Sector Count
	ldi	lowb, 1
	rcall	SendIDE
********sbr	ADRa, 0b11010110	;Sector Number
	mov	lowb, sector
	rcall	SendIDE
********ldi	ADRa, 0b11011000	;Cylinder Low Register
	mov	lowb, cyll
	rcall	SendIDE
********ldi	ADRa, 0b11011010	;Cylinder High Register
	mov	lowb, cylh
	rcall	SendIDE
********ldi	ADRa, 0b11011100	;Drive/Head Register
	mov	lowb, head
	rcall	SendIDE
	ldi	ADRa, 0b11000000
	ret

The lines with '********' leading need to be changed wether or not we use a
shift register.

I'm not sure since this is my old routine (I use a different one in my MP3
player) but I think that

LCD	LCD	CS0	CS1	DA0	DA1	DA2	???
1	1	0	1	0	1	0	0

I'll have to check.  Anyway, that routine above sends all the junk that you
need to send before sending or receiving a sector...  But then after that
you still have to send a command to the hard drive...



References: