Full display
Single chip lights up 12345678 (repeat)
All four pieces show different numbers
Show JLC words
The static display is completed and the dynamic display is shown in the attached video.
MAX7219 timing diagram:
This is the timing diagram in the MAX7219 data sheet. You can see that there are 3 signals. Only 3 signals are needed to control the display of different chips. One is CS chip select, one is CLK clock signal, and one is DIN data signal.
Chip select pulls CS low to enable, and after pulling CS low, read the data given by DIN on the rising edge of CLK .
The CLK script is connected to PC7, the CS (LOAD) pin is connected to PC6, and the DIN pin is connected to PC3.
According to the timing diagram, CS is best pulled up and CLK is best pulled down.
The core code is as above, and the steps for writing byte code are as follows
Unlike the STM32F10X series, there is no bit band operation, so the same effect can be achieved using shifting. There are 4 ways to encode
The register is 0xX9, corresponding to 0x00 is the non-decoding mode, and 0xff is the BCD decoding mode. These two are commonly used.
The JLC used in the dynamic display at the beginning is the non-decoding method. Each bit corresponds to the following figure:
Therefore, displaying J means BCDE is displayed. If converted to binary, it will be 00111100. If converted to hexadecimal, it will be 0x3c.
In the same way, L is 0x0e, C is 0x4e, just 0 if not displayed. Careful students may find that HPPO is displayed after JLC is displayed , because here I changed the decoding method to BCD decoding of 0xff.
D7, the highest digit of BCD decoding, displays the decimal point. D6-4-D4 have no effect, and D3-D0 decode. Therefore, when converted without decoding, J is H without decimal point. Therefore, when you see the word HPPO, you still need to adjust the brightness of the display. I only wrote a few gears here
The following is the data sheet description. Just write 0xX0 to 0xXf at the 0xXa address. There are a total of 16 gears to choose from.
It was the first time I used Lichuang EDA to make the whole thing. I was not very familiar with the software and the use of the CH330N chip, which caused the TX and RX pins of the serial port chip to be connected in reverse (of course it has been corrected). This was a big mistake. Secondly, because the bit strip operation was not used, the software development was not done after the board welding was completed, and it was only done in a hurry the day before the job was handed in (sweat). In addition, Lichuang EDA hopes that right-angle routing can also be done (I still don’t know how to use it... anyway, it seems that there are only wires and holes, not wires and wires). Finally, I would like to thank Hangshun and Lichuang for giving us such a good opportunity. Finally, I also hope that domestic products will do better and better in all aspects.
Devices | Class | introduce | Datasheet |
---|---|---|---|
0805B104M500NT | Passive components;The patch capacitance | Accuracy: ±20% Capacitance: 100nF Rated voltage: 50V Temperature drift coefficient (dielectric material): X7R Material: X7R | Download |
FJ5461AH 红色 | LED digital tube | Download | |
PR100A23831CWGT0 | Passive components;The resistor | Array/Network Resistor, Isolated, Thin Film, 0.1W, 3830ohm, 35V, 0.25% +/-Tol, -10,10ppm/Cel, 0806, | Download |
RL0805A470K | varistor | Download | |
RM2012B-102/102-NWXL10 | Network exclusion | Download | |
RB520S-30 B | Schottky diode | Download | |
RB520S-30 B | Schottky diode | Download | |
RB520S-30 B | Schottky diode | Download |
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet