參數(shù)資料
型號: AN1816
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: USING THE HC912B32 TO IMPLEMENT THE DISTRIBUTED SYSTEMS INTERFACE (DSI) PROTOCOL
中文描述: 使用本HC912B32為實(shí)施分布式系統(tǒng)接口(DSI)協(xié)議
文件頁數(shù): 21/24頁
文件大?。?/td> 332K
代理商: AN1816
AN1816
21
Appendix 1 - Source Code
SpiBurst(2);
while ((RBytes[1] & 0x01) == 0)
{
SpiBurst(2);
}
}
/* This function programs the address into the first slave node (no response is
expected ) */
void PgmAddr(int Addr)
{
TFFlag(Addr); /* Check TFNF0 flag is set */
TBytes[0] = 0x80; /* send 80 (write cmd to DSI0H) receive
00 */
TBytes[1] = Addr; /* Pgm Addr cmd into DSI0H then TBytes[2]
is DSI0L */
TBytes[2] = 0x00;
SpiBurst(3);
RFFlag();
}
/* This function programs the addresses into slave nodes 2 through to 15 and checks
the responses from slave nodes 1 to 14 */
void PgmChk(int Addr, int LastAddr)
{
unsigned short DsiDat;
unsigned short DsiChk;
int dummy=0;
TFFlag(Addr); /* Check TFNF0 flag is set */
TBytes[0] = 0x80; /* send 80 (write cmd to DSI0H) */
TBytes[1] = Addr; /* Pgm Addr cmd written into DSI0H &
DSI0L */
TBytes[2] = 0x00;
SpiBurst(3);
RFFlag();
/* CRC Check */
if (RBytes[1] & 0x08) {
FlagError(4,LastAddr);
for (;;); /* error - loop until device is reset */
}
TBytes[0] = 0x00; /* Read DSI0H and DSI0L */
SpiBurst(3);
DsiDat = RBytes[1] | 0x0000;
/* Now shift DsiDat 8 times */
DsiDat <<= 8;
DsiDat = DsiDat+RBytes[2];
/* Now need to check the response ie that bits[15:12] = Prev.
Slave Addr */
DsiDat >>= 12;
DsiChk = LastAddr | 0x0000;
if (DsiDat != DsiChk) {
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.
相關(guān)PDF資料
PDF描述
AN2104 Using Background Debug Mode for the M68HC12 Family
AN2154FAP TV/Video Signal Processor
AN22011A For Video·Audio - MD
AN2241 Video Camera Circuit
AN2250S Video Camera Circuit
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN18164B 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Car Radio FM/AM tuner IC built-in PLL synthesizer
AN18165B 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:FM-MPX demodulation / FM noise canceller for car radio
AN18202A 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Audio Video SW for TV with multi-signal input output
AN18207A 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Tuner IC for home-audio stereo set
AN18208A 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Tuner IC for home-audio stereo set