打印

关于32板子控制573点亮LED灯

[复制链接]
1057|11
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主

stm32板上连接了4个74hc573 控制32个红绿发光二极管   代码输入时能做到红绿一起亮一起灭   单独绿色一起亮灭也可以做到 但是红色灯一起亮灭的时候第一组绿灯也跟着亮   测得LE电压除了第一组锁存器有时是高电平有时是低  其余3组LE都是低电平  电压表测量时会引起灯乱闪  灭着的灯也能亮起, 想问这是硬件的问题还是代码写的问题?

相关帖子

沙发
杀狱磊|  楼主 | 2019-2-22 13:44 | 只看该作者
这是原理图

QQ图片20190222134227.png (687.76 KB )

QQ图片20190222134227.png

QQ图片20190222134158.png (511.55 KB )

QQ图片20190222134158.png

使用特权

评论回复
板凳
杀狱磊|  楼主 | 2019-2-22 13:44 | 只看该作者
LED.H的代码
#ifndef _LED_H
#define _LED_H
#include "stm32f10x.h"

#define Duan0_1 GPIO_SetBits (GPIOB,GPIO_Pin_5);
#define Duan0_0 GPIO_ResetBits (GPIOB,GPIO_Pin_5);

#define Duan1_1 GPIO_SetBits (GPIOB,GPIO_Pin_6);
#define Duan1_0 GPIO_ResetBits (GPIOB,GPIO_Pin_6);

#define Duan2_1 GPIO_SetBits (GPIOB,GPIO_Pin_7);
#define Duan2_0 GPIO_ResetBits (GPIOB,GPIO_Pin_7);

#define Duan3_1 GPIO_SetBits (GPIOB,GPIO_Pin_8);
#define Duan3_0 GPIO_ResetBits (GPIOB,GPIO_Pin_8);

#define Duan4_1 GPIO_SetBits (GPIOB,GPIO_Pin_9);
#define Duan4_0 GPIO_ResetBits (GPIOB,GPIO_Pin_9);

#define Duan5_1 GPIO_SetBits (GPIOB,GPIO_Pin_10);
#define Duan5_0 GPIO_ResetBits (GPIOB,GPIO_Pin_10);

#define Duan6_1 GPIO_SetBits (GPIOB,GPIO_Pin_11);
#define Duan6_0 GPIO_ResetBits (GPIOB,GPIO_Pin_11);

#define Duan7_1 GPIO_SetBits (GPIOB,GPIO_Pin_12);
#define Duan7_0 GPIO_ResetBits (GPIOB,GPIO_Pin_12);    //573每位输入

#define Wei1_1 GPIO_SetBits (GPIOB,GPIO_Pin_0);
#define Wei1_0 GPIO_ResetBits (GPIOB,GPIO_Pin_0);   //第一位数码管   共阴数码管

#define Wei2_1 GPIO_SetBits (GPIOB,GPIO_Pin_1);
#define Wei2_0 GPIO_ResetBits (GPIOB,GPIO_Pin_1);   //第二位数码管

#define Wei3_1 GPIO_SetBits (GPIOB,GPIO_Pin_2);
#define Wei3_0 GPIO_ResetBits (GPIOB,GPIO_Pin_2);   //第三位数码管

#define Wei4_1 GPIO_SetBits (GPIOB,GPIO_Pin_3);
#define Wei4_0 GPIO_ResetBits (GPIOB,GPIO_Pin_3);   //第四位数码管

//#define Wei5_1 GPIO_SetBits (GPIOB,GPIO_Pin_4);
//#define Wei5_0 GPIO_ResetBits (GPIOB,GPIO_Pin_4);   //绿灯0-7     0点亮

#define Wei6_1 GPIO_SetBits (GPIOD,GPIO_Pin_2);
#define Wei6_0 GPIO_ResetBits (GPIOD,GPIO_Pin_2);   //绿灯8-15

#define Wei7_1 GPIO_SetBits (GPIOC,GPIO_Pin_11);
#define Wei7_0 GPIO_ResetBits (GPIOC,GPIO_Pin_11);   //红灯 0-7

#define Wei8_1 GPIO_SetBits (GPIOC,GPIO_Pin_12);
#define Wei8_0 GPIO_ResetBits (GPIOC,GPIO_Pin_12);   //红灯 8-15

void led_init();
void ClearAll();
void OpenAll();
void PutDatPort0();
void PutDatPort1();
void GreenLED1(u8 mod);
void RedLED1(u8 mod);
void SendDat(u8 dat);
void ChooseWei(u8 num);


#endif



使用特权

评论回复
地板
杀狱磊|  楼主 | 2019-2-22 13:45 | 只看该作者
LED.C代码
#include "stm32f10x.h"
#include "LED.h"
#include "delay.h"


void led_init(void)
{
        GPIO_InitTypeDef GPIO_InitStructure;
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_0;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_1;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_2;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_3;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_4;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_5;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_7;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_8;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_9;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_10;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_11;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_12;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_13;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_14;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);        //开启PB引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_15;                              
  GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOB, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_0;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_1;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_2;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_3;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_4;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_11;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);        //开启PC引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_12;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOC, &GPIO_InitStructure);
       
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD,ENABLE);        //开启PD引脚的时钟
        GPIO_InitStructure.GPIO_Pin=GPIO_Pin_2;
        GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  
  GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;             //推挽式输出  
        GPIO_Init(GPIOD, &GPIO_InitStructure);
       
        GPIOC->ODR |= (0xff << 8);
        GPIOD->ODR |= (0x1 << 2);    //打开LE锁存器
        GPIOD->ODR &= ~(0x1 << 2);   //关闭LE锁存器
       
        Wei1_0;Wei2_0;Wei3_0;Wei4_0;
        //Wei5_0;
        Wei6_0;Wei7_0;Wei8_0;
}

void PutDatPort0()
{
        Duan0_0;Duan1_0;Duan2_0;Duan3_0;Duan4_0;Duan5_0;Duan6_0;Duan7_0;
}

void PutDatPort1()
{
        Duan0_1;Duan1_1;Duan2_1;Duan3_1;Duan4_1;Duan5_1;Duan6_1;Duan7_1;
}

void ClearAll()
{
        PutDatPort1();
        Delay_ms(1);Wei1_0;
        Delay_ms(1);Wei1_1;
        Delay_ms(1);Wei2_0;
        Delay_ms(1);Wei2_1;
        Delay_ms(1);Wei3_0;
        Delay_ms(1);Wei3_1;
        Delay_ms(1);Wei4_0;
        Delay_ms(1);Wei4_1;
       
//        Delay_ms(1);Wei5_1;
//        Delay_ms(1);Wei5_0;
        Delay_ms(1);Wei6_1;
        Delay_ms(1);Wei6_0;
        Delay_ms(1);Wei7_1;
        Delay_ms(1);Wei7_0;
        Delay_ms(1);Wei8_1;
        Delay_ms(1);Wei8_0;
}


void OpenAll()
{
        PutDatPort0();
        Delay_ms(1);Wei1_1;
        Delay_ms(1);Wei1_0;
        Delay_ms(1);Wei2_1;
        Delay_ms(1);Wei2_0;
        Delay_ms(1);Wei3_1;
        Delay_ms(1);Wei3_0;
        Delay_ms(1);Wei4_1;
        Delay_ms(1);Wei4_0;
       
//        Delay_ms(1);Wei5_1;
//        Delay_ms(1);Wei5_0;
        Delay_ms(1);Wei6_1;
        Delay_ms(1);Wei6_0;
        Delay_ms(1);Wei7_1;
        Delay_ms(1);Wei7_0;
        Delay_ms(1);Wei8_1;
        Delay_ms(1);Wei8_0;
}

//void GreenLED1(u8 mod)
//{
//        ClearAll();
//        if(mod==1){
//         PutDatPort0();
//         Delay_ms(1);Wei5_1;       
//         Delay_ms(1);Wei5_0;
//         GPIOD->ODR &= ~(0x1 << 2);
//         Delay_ms(1);Wei6_1;       
//         Delay_ms(1);Wei6_0;
//        GPIOD->ODR &= ~(0x1 << 2);
//        }
//        else {
//         PutDatPort1();
//         Delay_ms(1);Wei5_1;       
//         Delay_ms(1);Wei6_1;
//        GPIOD->ODR &= ~(0x1 << 2);               
//         Delay_ms(1);Wei5_0;       
//         Delay_ms(1);Wei6_1;
//         Delay_ms(1); PutDatPort1();
//        }
//}

//void RedLED1(u8 mod)
//{
//        ClearAll();
//        if(mod==1){
//         PutDatPort0();
//         Delay_ms(1);Wei7_1;       
//         Delay_ms(1);Wei7_0;
//        GPIOD->ODR &= ~(0x1 << 2);       
//         Delay_ms(1);Wei8_1;       
//         Delay_ms(1);Wei8_0;
//        }
//        else {
//         PutDatPort1();
//         Delay_ms(1);Wei7_1;       
//         Delay_ms(1);Wei7_0;
//GPIOD->ODR &= ~(0x1 << 2);               
//         Delay_ms(1);Wei8_1;       
//         Delay_ms(1);Wei8_0;
//        }
//}

void SendDat(u8 dat)
{
        if((dat&0x01)!=0){Duan0_1;}
        else {Duan0_0;}
        if((dat&0x02)!=0){Duan1_1;}
        else {Duan1_0;}
        if((dat&0x04)!=0){Duan2_1;}
        else {Duan2_0;}
        if((dat&0x08)!=0){Duan3_1;}
        else {Duan3_0;}
        if((dat&0x10)!=0){Duan4_1;}
        else {Duan4_0;}
        if((dat&0x20)!=0){Duan5_1;}
        else {Duan5_0;}
        if((dat&0x40)!=0){Duan6_1;}
        else {Duan6_0;}
        if((dat&0x80)!=0){Duan7_1;}
        else {Duan7_0;}
        Delay_ms(1);
}

void ChooseWei(u8 num)
{
        switch(num){
                //case 1 :Delay_ms(1);Wei5_1;        Delay_ms(5);Wei5_0;Delay_ms(1);break; //选中绿灯1-8
                case 2 :Delay_ms(1);Wei6_1;        Delay_ms(5);Wei6_0;Delay_ms(1);break;
                case 3 :Delay_ms(1);Wei7_1;        Delay_ms(5);Wei7_0;Delay_ms(1);break;
                case 4 :Delay_ms(1);Wei8_1;        Delay_ms(5);Wei8_0;Delay_ms(1);break;
                case 5 :Delay_ms(1);Wei1_1;        Delay_ms(5);Wei1_0;Delay_ms(1);break; //选中第一位数码管
                case 6 :Delay_ms(1);Wei2_1;        Delay_ms(5);Wei2_0;Delay_ms(1);break;
                case 7 :Delay_ms(1);Wei3_1;        Delay_ms(5);Wei3_0;Delay_ms(1);break;
                case 8 :Delay_ms(1);Wei4_1;        Delay_ms(5);Wei4_0;Delay_ms(1);break;
                default :  break;
        }
}


使用特权

评论回复
5
杀狱磊|  楼主 | 2019-2-22 13:46 | 只看该作者
main.c
#include "stm32f10x.h"
#include "led.h"
#include "delay.h"

u8 table[10]={0xaf,0xa0,0xce,0xea,0xe1,0x6b,0x6f,0xa2,0xef,0xeb};
u8 table1[10]={0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F};
int main(void)
{
        NVIC_Configuration();
        delay_init();
        led_init();
        OpenAll();
        Delay_ms(100);
        ClearAll();
        Delay_ms(100);
        while(1)
        {


      PutDatPort0();   
          //Delay_ms(1);Wei5_0;  //第一组绿灯亮
//Delay_ms(100);          
          //Delay_ms(1);Wei5_1;
          Delay_ms(100);
          Delay_ms(1);Wei6_1;  //第二组绿灯亮
Delay_ms(100);          
          Delay_ms(1);Wei6_0;  
                Delay_ms(100);
               
                PutDatPort1();
          //Delay_ms(1);Wei5_1;   //第一组绿灯灭
//Delay_ms(100);          
          //Delay_ms(1);Wei5_0;
//Delay_ms(100);          
          Delay_ms(1);Wei6_1;   //第一组绿灯灭
Delay_ms(100);          
          Delay_ms(1);Wei6_0;
                Delay_ms(100);
               
      PutDatPort0();          
          Delay_ms(1);Wei7_0;
          Delay_ms(100);          
          Delay_ms(1);Wei7_1;   
          Delay_ms(100);
          Delay_ms(1);Wei8_1;
Delay_ms(100);          
          Delay_ms(1);Wei8_0;
                Delay_ms(100);
               
                PutDatPort1();
          Delay_ms(1);Wei7_1;
Delay_ms(100);          
          Delay_ms(1);Wei7_0;
Delay_ms(100);          
          Delay_ms(1);Wei8_1;
Delay_ms(100);          
          Delay_ms(1);Wei8_0;
                Delay_ms(100);
               
       
  }
}

使用特权

评论回复
6
杀狱磊|  楼主 | 2019-2-22 13:46 | 只看该作者
求大佬们帮我看看哪块写的出问题了 第一组的绿灯锁存LE端总是高电平,红灯第一组亮之前第一组绿灯就凉了

使用特权

评论回复
7
mcu51hi2c| | 2019-2-22 16:04 | 只看该作者
这个是软件的问题,这个是没有处理好每个74HC573的锁存问题

使用特权

评论回复
8
xyz549040622| | 2019-2-22 21:23 | 只看该作者
我也怀疑是软件问题

使用特权

评论回复
9
ningling_21| | 2019-2-23 17:56 | 只看该作者
软件问题可能性比较大

使用特权

评论回复
10
一路向北lm| | 2019-2-24 18:24 | 只看该作者
软件问题 573 要考虑锁存,不用需要关闭

使用特权

评论回复
11
杀狱磊|  楼主 | 2019-2-25 14:07 | 只看该作者
mcu51hi2c 发表于 2019-2-22 16:04
这个是软件的问题,这个是没有处理好每个74HC573的锁存问题

我就是第一个锁不住,其余3个都锁住了 不知道问题出在哪

使用特权

评论回复
12
kageyang| | 2019-7-28 15:17 | 只看该作者
我没有看到电路,如果有用到PC0,PC1需外接上拉电阻。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

15

帖子

1

粉丝