zoukankan      html  css  js  c++  java
  • 输入和输出移位寄存器的同步串行模式

    输入和输出移位寄存器的同步串行模式

    输出口。

    数据有RXD(P3.0)引脚输入或输出。同步移位脉冲由TXD(P3.1)引脚输出。

    发送和接受均为8位数据。低位在前,高位在后。


    //串行口工作模式0


    #include <reg52.h>
    #define uchar unsigned char 
    #define uint unsigned int
    void delayms(uint xms)
    {
    uint i,j;
    for(i=xms;i>0;i--)
    for(j=110;j>0;j--);
    }
    void main()
    {
    SCON=0;
    EA=1;
    ES=1;
    TI=0;
    while(1)
    {
    SBUF=0xaa;
    //delayms(1);
    }
    }
    void ser0() interrupt 4
    {
    TI=0;
    }

    使用 示波器看波形 需要注意的是留在传输数据的状态。01010101该序列



  • 相关阅读:
    css3 3d 转换
    css3 动画序列
    css3 动画
    2d 转换之缩放
    2d 转换中心点
    css3 书写 动画三角形
    2d 旋转
    2D转换
    伪元素 字体图标
    风陵01
  • 原文地址:https://www.cnblogs.com/hrhguanli/p/4601501.html
Copyright © 2011-2022 走看看