51 single-chip microcomputer programming: Make a simple running water lamp

Source: Internet
Author: User

#include <reg52.h> #define UCHAR unsigned char#define uint unsigned intuint table[] = {0xFE, 0xfd, 0XFB, 0xf7, 0xEF, 0XDF, 0XBF, 0x7f};void delay (void) {UINT A = 50000;while (a--);} void Main () {int i = 0;while (1) {for (i = 0; i < 8; i++) {P0 = Table[i];d elay ();} for (i = 7; I >= 0; i--) {P0 = Table[i];d elay ();}}}

It is not the technical miscellaneous that I learn, but the miscellaneous of the school curriculum arrangement. I have a rough count of the school curriculum, can be described as a far apart of knowledge ah, I estimate, if every semester, no way courses are refined. That's perfect. But this semester involves embedded and monolithic computer, then come play a play! Abandoned half a semester, it is time to learn something. Ancient way: Justified Man Road, Xi died enough. Besides, there is no old day!

In fact, learn SCM is also watching Lin Feng Video: "Lin Feng with you conquer embedded"! Go directly to the code.


51 single-chip microcomputer programming: Make a simple running water lamp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.