yuanyuxingqu 发表于 2014-3-10 21:57:42

有个时序图,大伙看看

1、这个时序图没看明白,请指点。
疑问:每个时钟后跟一位数据,还是在时钟后将8位数据全部发完?用C怎么描述?

了无 发表于 2014-3-10 22:18:11

刚刚试了写了一下感觉不对,还是等看大神们的吧,学习学习

tony_sgt 发表于 2014-3-12 22:08:20

貌似视频讯号里安插资料(bit) ,每帧安插1个bit

yuanyuxingqu 发表于 2014-3-13 15:53:16

tony_sgt 发表于 2014-3-12 22:08
貌似视频讯号里安插资料(bit) ,每帧安插1个bit

说的好像对,51有好的实现方法吗?

Smartist 发表于 2014-3-13 16:51:55

眼睛疼,帮顶吧

yuanyuxingqu 发表于 2014-3-20 01:32:32

本帖最后由 yuanyuxingqu 于 2014-3-20 01:40 编辑

用下面的程序试验了下,好像不能产生不规则周期的方波。不知道为什么?还是51单片机无法实现?请赐教!{:sweat:}{:sweat:}


#include <reg51.h>

#define uchar unsigned char
#define uintunsigned int
uchar data count;

sbit output_wave=P1^1;


void initial_timer0()
{
   TMOD=0x01;
   //TH0=-(5000/256);//0x3c;
   //TL0=-(5000%256);//0xb0;
   TH0=0x3c;
   TL0=0xb0;
   ET0=1;
   TR0=1;
   EA=1;
}

/*void delay(uint k)
{
uint i,j;
for(i=0;i<k;i++)
   {
   for(j=0;j<121;j++)
       {;}
        }
}*/

void timer0() interrupt 1
{
   TH0=0x3c;
   TL0=0xb0;
   //TH0=-(5000/256);//0x3c;
   //TL0=-(5000%256);
   count++;
/***********************************************************/
/***下面产生不同周期的脉冲                                    ***/
/**********************************************************/
   if(count<=120)
   output_wave=0;
   else if((count>120)&&(count<=530))
         output_wave=1;
               else if((count>530)&&(count<=730))
                         output_wave=0;
                           else
                             output_wave=1;
   if(count>=730)
   count=0;
/*************************************************************/
   /*if(count<=2)
   output_wave=0;
        else
       output_wave=1;
   if(count>=20)
   count=0;*/
}

void main()
{
initial_timer0();
while(1)
{
    //delay(3000);
    ;
}
}

benqme 发表于 2014-3-20 07:51:45

眼睛疼,帮顶吧

yuanyuxingqu 发表于 2014-3-27 15:59:05

哪位有这方面的资料,分享个,多谢

lcl4518 发表于 2014-3-28 09:32:41

帮顶一下················

东成西就 发表于 2014-8-3 17:38:26

了无 发表于 2014-3-10 22:18
刚刚试了写了一下感觉不对,还是等看大神们的吧,学习学习

{:sweat:}   这头像。。。我承认,我抠了一下屏幕。。
页: [1]
查看完整版本: 有个时序图,大伙看看