Pic digital tube dynamic scanning display program

Single Chip Microcontroller STM32L151CCU6
0201 Package SLP0603 ESD Diode 5V Unidirectional ESD Protection
MOSFET-based ESD Protection
#include // Includes predefined internal resources of the microcontroller __CONFIG(0x1832); // Configuration word: WDT off, Power-up Timer on, Power-down Detection off, Low-voltage programming off, Code protection enabled, 4MHz HS oscillator void delay(); // Declaration of the delay function void init(); // Declaration of the I/O port initialization function const char TABLE[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92}; // Constant data table for digits 0 to 5 void main() // Main function { while(1) // Infinite loop to keep the digital tube continuously lit { init(); // Call the initialization function PORTD = TABLE[0]; // Output the first value from the data table to PORTD PORTA = 0x3E; // Turn on the first digit display delay(); // Delay to ensure proper brightness of the display PORTD = TABLE[1]; // Display the second value (same as 0) PORTA = 0x3D; delay(); PORTD = TABLE[2]; // Display the third value (same as 0) PORTA = 0x3B; delay(); PORTD = TABLE[3]; // Display the fourth value (same as 0) PORTA = 0x37; delay(); PORTD = TABLE[4]; // Display the fifth value (same as 0) PORTA = 0x2F; delay(); PORTD = TABLE[5]; // Display the sixth value (same as 0) PORTA = 0x1F; delay(); } } void init() // I/O port initialization function { TRISA = 0x00; // Set A0 as output, others as input TRISD = 0x00; // Set PORTD as output ADCON1 = 0x07; // Configure PORTA as standard I/O PORTA = 0xFF; // Initialize PORTA PORTD = 0xFF; // Turn off all displays initially } void delay() // Delay function { int i; // Define a counter variable for(i = 0x100; i--;); // Simple delay loop }

25MM Metal Switches

25MM Metal Switches

25MM Metal Switches are fashion in appearance and excellent in quality with IP67 dust-proof and waterproof grade. The Power start control system has always enjoy the sound reputation in the long-term international transaction. 25MM mounting hole metal Anti-Vandal Switch could equip with LED light, it can be two-color LED light bead, such as red and green, or red and blue color.


Anti-Vandal Switch

This series Metal Push Button Switch has obtained relevant quality certifications in Europe and the United States, and can be used for dust-proof, oil-proof and waterproof stains in harsh working environments. All the material has passed the strict customs declaration to ensure that this metal switches could meets the requirements of green environmental protection in Europe and America. REACH contains Substances High Concern SVHS, also could offer our customers PPAP reports. We are paying very close attention to Green environmental protection project, which is not only our requirements on products, but also our company's attitude towards the international environmental project.


Stainless Steel Switch


The research and development department of Taiwan's head office has put much more emphasize on research and development on the existing basis, innovate the Illuminated Push Button Switch to achieve 50,000 electrical life under 16A125VC and 16A250VAC conditions. And could have 10,000 electrical life up under 26A125VC and 26A250VAC condition, offering our customers reliable quality guarantee.

25Mm Metal Switches,25Mm Anti-Vandal Switch,Waterproof Metal Push Button Switch,25mm Metal Push Button Switch

YESWITCH ELECTRONICS CO., LTD. , https://www.yeswitches.com