AMS AS5048 Eval-Kit 키트 매뉴얼 - 페이지 11

{카테고리_이름} AMS AS5048 Eval-Kit에 대한 키트 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. AMS AS5048 Eval-Kit 16 페이지. 14-bit rotary position sensor with digital angle (interface) and pwm output
AMS AS5048 Eval-Kit에 대해서도 마찬가지입니다: 운영 매뉴얼 (10 페이지), 사용자 설명서 (12 페이지)

AS5048 Adapter Board
dat |= spiCalcEvenParity(dat) << 15;
spiTransfer((u8*)&dat, sizeof(u16));
}
magreg = dat;
#endif
for
(i = 0; i < 2; i++)
{
/* the result is available only just in the second transfer.
transfers must be separated by chip selects */
dat
= SPI_CMD_READ | SPI_REG_DATA;
dat |= spiCalcEvenParity(dat);
spiTransfer((u8*)&dat, sizeof(u16));
}
#ifdef
AS5048_CHIPDESCRIPTION
if
((dat & 0x4000) || (agcreg & 0x4000) || (magreg & 0x4000))
#else
if
(((dat >> 1) & 0x1) || ((agcreg >> 1) & 0x1))
#endif
{
/* error flag set - need to reset it */
dat
= SPI_CMD_READ | SPI_REG_CLRERR;
dat |= spiCalcEvenParity(dat);
spiTransfer((u8*)&dat, sizeof(u16));
}
else
{
#ifdef
AS5048_CHIPDESCRIPTION
dd->agc = agcreg & 0xff;
dd->value = dat & (currentChipDescription->positions - 31 - 1);
dd->angle = (dd->value * 360) / currentChipDescription->positions;
dd->magnitude = magreg & (currentChipDescription->positions - 31 - 1);
dd->alarmLo = (agcreg >> 10) & 0x1;
dd->alarmHi = (agcreg >> 11) & 0x1;
#else
dd->agc
= (agcreg >> 2) & 0x3F;
dd->value
= (dat >> 2) &
dd->angle
=
(dd->value
dd->alarmLo = (dat >> 14) & 0x1;
dd->alarmHi = (dat >> 15) & 0x1;
#endif
}
}
ams Eval Kit Manual, Confidential
[v1-3] 2014-Aug-01
(currentChipDescription->positions
* 360) / currentChipDescription->positions;
- 1);
Document Feedback
Page 11