这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 哪位高手用过lonworks SPI的从模式

共1条 1/1 1 跳转至

哪位高手用过lonworks SPI的从模式

菜鸟
2011-09-19 14:59:41     打赏

哪位高手用过lonworks SPI的从模式.为什么我的输出管脚只有高电平?
#pragma num_alias_table_entries 1
#pragma app_buf_out_size 66
#pragma app_buf_out_count 3
#pragma app_buf_out_priority_count 0
#pragma net_buf_out_priority_count 0
#pragma net_buf_out_size 66
#pragma net_buf_out_count 3
#pragma app_buf_in_size 66
#pragma app_buf_in_count 3
#pragma net_buf_in_size 66
#pragma net_buf_in_count 3
//#pragma enable_multiple_baud
//#pragma receive_trans 8
//#pragma scheduler_reset

#include <addrdefs.h>
#include <access.h>
#include <msg_addr.h>
#include <status.h>
#include <control.h>
#include <stdlib.h>
                    
//IO_8 neurowire master select(IO_1) C8051F_IO; 
//IO_8 neurowire slave timeout(IO_1) C8051F_IO; 
IO_8 neurowire slave  C8051F_IO;
//unsigned int 
IO_0 input bit CS1=1;
IO_2 output bit LED=1;
IO_1 output bit CS=1; 
//mtimer tmrf= 5000;
unsigned int output_value[3];
//unsigned int input_values;
//unsigned int receive;                 
//when(timer_expires(tmrf))
when(io_changes(CS1)to 0)             

     
        output_value[0]=0x01;
        output_value[1]=0x02;
        output_value[2]=0x03;         
        io_in(C8051F_IO, &input_values,24 );
        
     
         
        //io_out(CS,1);
        //input_values=io_in(C8051F_IO,&input_values,8);
         // tmrf = 1000;                                 
 // }
//}
}




关键词: 哪位     高手     用过     lonworks     模式     #pra    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]