1回答

0收藏

max7219 怎么不管用?

其他 其他 239 人阅读 | 1 人回复 | 2025-07-26

本帖最后由 eefocus_4165699 于 2025-7-26 19:57 编辑



如下,不管有没有代码,只要上电,就是全亮
比如,我设置 Shutdown 关闭,测试也关闭,也是全亮。


  1. void main(void){                                                                                                   
  2.     uchar i,j;                                                                                                     
  3.                                                                                              
  4.    // Init_MAX7219();                                                                                             

  5.   /*while(1)                                                                                                     
  6.      { }
  7.   */
  8. }
复制代码
  1. void Init_MAX7219(void)
  2. {

  3. uchar  i;
  4.   Max7219_pinCS=0;
  5.   for(i=0;i<count;i++)
  6.   {
  7.     Write_Max7219_byte(0x09);     
  8.     Write_Max7219_byte(0x00);   
  9.   }
  10.   Max7219_pinCS=1;
  11.   _nop_();
  12.   Max7219_pinCS=0;
  13.   for(i=0;i<count;i++)
  14.   {
  15.     Write_Max7219_byte(0x0a);   
  16.     Write_Max7219_byte(0x00);   
  17.   }
  18.   Max7219_pinCS=1;
  19. _nop_();
  20.    Max7219_pinCS=0;
  21.   for(i=0;i<count;i++)
  22.   {
  23.     Write_Max7219_byte(0x0b);
  24.     Write_Max7219_byte(0x01);   
  25.   }
  26.   Max7219_pinCS=1;
  27.   _nop_();
  28.   Max7219_pinCS=0;
  29.   for(i=0;i<count;i++)
  30.   {
  31.     Write_Max7219_byte(0x0c);
  32.     Write_Max7219_byte(0x00);   
  33.   }
  34.   Max7219_pinCS=1;
  35.   Max7219_pinCS=0;
  36.   for(i=0;i<count;i++)
  37.   {
  38.     Write_Max7219_byte(0x0f);
  39.     Write_Max7219_byte(0x00);   
  40.   }
  41.   Max7219_pinCS=1;
  42.   _nop_();
  43. }
复制代码


分享到:
回复

使用道具 举报

回答|共 1 个

倒序浏览

沙发

loveeeboard

发表于 2025-8-14 16:06:19 | 只看该作者

VCC与SEG线路短路:MAX7219的SEG引脚(段选线)与VCC意外短路时,会导致所有段持续通电

共阴/共阳配置错误:MAX7219 仅支持共阴极数码管。若使用了共阳极数码管,需要完全重新设计驱动电路

DIG接地短路:位选线(DIG0-DIG7)若意外接地,会使所有位选导通
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条