| 
 
| 读LT1867(Microwire接口)一直没有读出来,想求一个Microwire例程,我邮箱1189599019@qq.com   不胜感激!PS:下面是我的代码,大侠能否不吝赐教,感激不尽: 
 void Read_LT1867(uchar byte)
 {
 
 uchar i=0;
 //
 SCK=0;
 
 _NOP();
 
 _PB0 = 0;
 
 for(i=0;i<8;i++)
 
 {
 
 MOSI = (byte & 0x80);         // output 'byte', MSB to MOSI
 // 从MOSI脚输出,从高位到低位.当BYTE 最高位为1时逻辑运算为1,输出1.运算为0时输出0
 
 byte = (byte << 1);           // shift next bit into MSB..
 // 左移1位.将低位向高位转移.
 
 SCK = 1;                      // Set SCK high..
 
 //
 _NOP();
 
 byte |= MISO;
 //byte=byte|MISO  capture current MISO bit
 
 // 从MISO 中读出状态位存入BYTE中.
 //
 _NOP();
 
 SCK = 0;
 // ..then set SCK low again
 
 }
 
 Data_High = byte;
 
 
 
 for(i=0;i<8;i++)
 
 {
 
 MOSI = 0;         // output 'byte', MSB to MOSI
 // 从MOSI脚输出,从高位到低位.当BYTE 最高位为1时逻辑运算为1,输出1.运算为0时输出0
 
 byte = (byte << 1);           // shift next bit into MSB..
 // 左移1位.将低位向高位转移.
 
 SCK = 1;                      // Set SCK high..
 
 //
 _NOP();
 
 byte |= MISO;
 //byte=byte|MISO  capture current MISO bit
 
 // 从MISO 中读出状态位存入BYTE中.
 //
 _NOP();
 
 
 SCK = 0;
 // ..then set SCK low again
 
 }
 
 Data_Low = byte;
 
 _PB0 = 1;
 
 }
 | 
 |