Hello, I have two ADIS16250 Gyros from analog. I have spent abu thte last 3 days trying to figure out how to use them, but the datasheet is way too complicated for me. I have tried:
<code>
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 21 ' 57600 Bauds
DEFINE HSER_CLOERR 1
INCLUDE "modedefs.bas"
Hserout ["ACTIVE",13]
RST var portd.0
SCLK var portd.1
CS var portd.2
DOUT var portd.3 'data from PIC to Gyro
DIN var portd.4 'data from gyro to PIC
temp var word'(2)
index var word
High SCLK
High CS
pause 1000
main:
low CS
Shiftout DOUT, SCLK, 1, [$04,$00]
high cs
pause 100
low CS
SHIFTIN DIN, SCLK, 2, [temp\14]
high CS
pause 100
HSEROUT ["Temp: ",HEX temp,13]
pause 100
goto main
</code>
But, it doesn't work. I would really appreciate it if someone could give me an example, or set me off in the right direction.
Thanks,
InitialDriveGTR
Bookmarks