[Diao Ye learns programming] Arduino hands-on (195)---HT16k33 matrix 8*8 dot matrix screen module 5

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensor and actuator modules on hand, in accordance with the concept of true knowledge (must be hands-on), for the purpose of learning and communication, here I am going to try and do more experiments one by one. Whether it is successful or not, it will be recorded ——Small progress or unsolvable problems, I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 195: I2C red 8*8 LED dot matrix screen module HT16k33 (VK16K33) driving 1088BS IoT scalable programming

insert image description here
insert image description here

Knowledge points: VK16K33 chip
is a memory mapping and multi-function LED control driver chip. The chip supports a larger display mode of 128 points (16SEGs×8COMs) and a larger 13×3 key matrix scanning circuit. The software configuration features of the VK16K33 make it suitable for a variety of LED applications, including LED modules and display subsystems. The VK16K33 can communicate with most microcontrollers through a bidirectional I2C interface.

Features 1. Working voltage: 4.5V~5.5V 2. Internal RC oscillator 3. I2C bus interface 4.16×8-bit RAM for storing display data 5. Larger display mode is 16×8: 16SEGs and 8COMs 6. Read/write The address is automatically incremented 7. Up to 13×3 button matrix scanning function 8. 16-step dimming circuit 9. Package type: 20/24/28-pin SOP VK16K33 This series of ICs has low power consumption, high anti-noise and high system performance ESD protection capability; VK16K33 integrates the functions of LED drive and button scanning, and integrates the functions required by the control panel, which can reduce the burden on the main MCU and the number of I/Os required. The use of the I2C interface can further reduce the material cost between the control panel and the main board, thereby reducing the overall cost of the product.

VK16K33 has three packages of 28SOP, 24SOP and 20SOP, corresponding to three types of larger display points; 16x8 LEDs and 13x3 buttons, 12x8 LEDs and 10x3 buttons, and 8x8 LEDs and 8x3 buttons. Built-in display memory and RC oscillator circuit; working voltage: 4.5V ~ 5.5V; VK16K33 supports interrupt signal and polling two working modes. The button interrupt signal can be optionally provided to the MCU, so the MCU does not need to check the button status all the time. The transmission between VK16K33 and the system control chip only needs 2 signal lines. By detecting key input through VK16K33, the number of MCU I/O on the main board can be reduced and the layout lines of the main board and the panel can be simplified; therefore, the overall cost of the product can be reduced. VK16K33 is suitable for controlling and driving LED displays/panels such as home appliances, audio-visual equipment, instrumentation equipment, and automotive devices.

insert image description here

insert image description here

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 207: I2C red 8*8 LED dot matrix module VK16k33 drives 1088BS Raspberry Pi IoT scalable programming
Project 12: Constantly changing symbol graphics

Experimental open source code

/*
  【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
  实验二百零七:I2C红色8*8LED点阵模块VK16k33驱动1088BS树莓派物联网可扩展编程
  项目十二:不断变换的符号图形
  实验接线:
  VK16k33    UNO
  VIN        5V
  GND        GND
  SCL        A5
  SDA        A4
*/

#include <Wire.h>
#include "Grove_LED_Matrix_Driver_HT16K33.h"


Matrix_8x8 matrix;

void setup() {
    
    
  Wire.begin();
  matrix.init();
  matrix.setBrightness(0);
  matrix.setBlinkRate(BLINK_OFF);
}

void loop() {
    
    
  for (int i = 0; i < 29; i++) {
    
    
    // The input range of writeIcon is [0-28]
    matrix.writeIcon(i);
    matrix.display();
    delay(200);
  }
}

Arduino experiment scene diagram
insert image description here

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
experiment 207: I2C red 8*8 LED dot matrix module VK16k33 driver 1088BS Raspberry Pi IoT scalable programming
project 13: mobile Letters "abc", "efg"

Experimental open source code

/*
  【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
  实验二百零七:I2C红色8*8LED点阵模块VK16k33驱动1088BS树莓派物联网可扩展编程
  项目十三:流动的字母"abc","efg"
  实验接线:
  VK16k33    UNO
  VIN        5V
  GND        GND
  SCL        A5
  SDA        A4
*/

#include <Wire.h>
#include "Grove_LED_Matrix_Driver_HT16K33.h"

Matrix_8x8 matrix;

void setup() {
    
    
    Wire.begin();
    matrix.init();
    matrix.setBrightness(0);
    matrix.setBlinkRate(BLINK_OFF);
}

void loop() {
    
    
    matrix.writeString("!", 500, ACTION_SHIFT);
    matrix.display();

    matrix.writeString("abc", 500, ACTION_SHIFT);
    matrix.display();

    matrix.writeString("efg", 500, ACTION_SCROLLING);
    matrix.display();
}

Arduino experiment scene diagram

insert image description here

[Arduino] 168 kinds of sensor module series experiment (data code + simulation programming + graphics programming)
experiment 207: I2C red 8*8 LED dot matrix module VK16k33 driver 1088BS Raspberry Pi IoT scalable programming
project 14: keep falling The musical note of
the experimental wiring:
VK16k33 UNO
VIN 5V
GND GND
SCL A5
SDA A4

Experimental open source code

/*
  【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
  实验二百零七:I2C红色8*8LED点阵模块VK16k33驱动1088BS树莓派物联网可扩展编程
  项目十四:不断落下的音乐符
  实验接线:
  VK16k33    UNO
  VIN        5V
  GND        GND
  SCL        A5
  SDA        A4
*/

#include <Wire.h>
#include "Grove_LED_Matrix_Driver_HT16K33.h"


Matrix_8x8 matrix;
int temp = -8;
uint8_t orientation = DISPLAY_ROTATE_0;

void setup() {
    
    
    Wire.begin();
    matrix.init();
    matrix.setBrightness(0);
    matrix.setBlinkRate(BLINK_OFF);
    matrix.writeIcon(21);
}

void loop() {
    
    
    matrix.display();
    delay(100);
    // Activate after call display()
    matrix.setDisplayOffset(temp, temp);
    temp++;
    if (temp == 9) {
    
    
        temp = -8;
        orientation = orientation + 1;
        if (orientation == 4) {
    
    
            orientation = DISPLAY_ROTATE_0;
        }
        // Activate after call writeXXX
        matrix.setDisplayOrientation(orientation);
        matrix.writeIcon(21);
    }
}

Arduino experiment scene diagram

insert image description here
insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132147296