No.27424 作者:guest 邮件:guest@guest.com ID:6 登陆:16560次 文章数:7648篇 最后登陆IP:219.68.9.43 最后登陆:2005/5/20 1:37:44 注册:2003/3/10 16:21:00 财富:35062 发帖时间:2003/4/25 16:28:41 发贴者IP:218.93.1.70 标题:guest:求助!!!!!!!!1 摘要:No.27424求助!!!!!!!!1 这是我用查表法做的一个收发数据的程序。大虾能不能帮我用中断来做。因为我是第一次编程。很急!!!!!!!在这先谢谢大虾。我的邮箱是nuowei_37@163.com #pragma DEBUG OBJECTEXTEND CODE #include <stdio.h> #include <reg51.h> int_port1() {TMOD=0x20; //T1 mode 2// SCON=0x50; TH1=0xFD; //baud=9600// TL1=0xFD; PCON=0x00; IE=0x98; } struct header { unsigned int destination,opcode,reserve,length,cs; }header1={0x01,0x02,0x10,0x01}; tx_header() // transmit to dsp// { header1.cs=header1.destination^header1.opcode^header1.reserve^header1.length^0xaa; SBUF=header1.destination; TI=0; while(!TI); TI=0; SBUF=header1.opcode; while(!TI); TI=0; SBUF=header1.reserve; w ......
>>返回讨论的主题
|