Select 7SEG-MPX1-CC for the digital tube, a common cathode digital tube. That is, low level selection (rightmost pin), the 8 pins on the left side of the digital tube, from left to right, from low to high, are connected to PC0---PC7 respectively.
The c program is as follows:
#include
#include
#define int8u unsigned char
#define int16u unsigned int
const int8u seg_code[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
int main()
{
int8u i=0;
DDRC=0xff;
while(1)
{
PORTC=seg_code[i];
i=(i+1)%10; //When i increases to 10, reset to 0
_delay_ms(200);
}
}
Previous article:AVR microcontroller proteus simulation lesson 4: control relay
Next article:AVR Proteus simulation lesson 1: installation and setting of AVR Studio and WinAVR
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Live Review: Renesas Electronics R-Car Advanced Driver Assistance System Solution
- TI CC2531 USB Evaluation Module Kit
- Lantern with capacitive touch support
- TI's active equalization solution
- After the ZIGBEE3.0 online seminar this morning, have you DIYed a home automation control system?
- Overcome last-minute requirement changes with small, leaded SOT-23 thin multiplexers
- Where can I find older ICs?
- Make ADAS technology more popular in vehicles
- What is a hysteresis comparator?
- VICOR DCM2322 isolated regulated DC-DC converter is now available for free!