//0 1 2 3 4 5 6 7 8 9 a b c d e f 8 None
//unsigned char code pos[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
//1 2 3 4 5 6 7 8
/*--------------------------------------------*/
// Function declaration
void Ser_IN(unsigned char Data); //Serial data input
void Par_OUT(void); //Serial data output
//void Ser_Par(unsigned char Data); //Serial input, parallel output
/*--------------------------------------------*/
//Serial data input
void Ser_IN(unsigned char Data)
{
unsigned char i;
for(i = 0; i < 8; i++)
{
SH_CK = 0; //CLOCK_MAX=100MHz
SD = Data & 0x80;
Data <<= 1;
SH_CK = 1;
}
}
/*--------------------------------------------*/
//Parallel data output
void Par_OUT(void)
{
ST_CK = 0;
ST_CK = 1;
}
/*--------------------------------------------*/
//Serial input, parallel output
/*void Ser_Par(unsigned char Data)
{
Ser_IN(Data);
Par_OUT();
}
*/
/*--------------------------------------------*/
#endif
Previous article:Digital tube dynamic and static display principle
Next article:51 single-chip remote control decoding is displayed through the computer serial port--C51 source code
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
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- C2000 Byte Processing
- Zero Crossing Detection
- Selection of Reed Relays
- EEWORLD University ---- Analog Circuit Basics: From System Level to Circuit Level
- [ESP32-Audio-Kit Audio Development Board Review] SD Card Reading and Writing
- STM32 branch uses register method instead of HAL to drive DAC
- An important wireless technology is about to debut!
- 8 output modes of MSP430 microcontroller
- Audio circuit delay
- Unused nucleo F334, L053 F091