MCU program The course requires, kneel for a MCU program.

Updated on technology 2024-04-06
5 answers
  1. Anonymous users2024-02-07

    Hello: I wrote the program:

    #include

    void main()

    p0=0;Initialize to the light is fully on.

    while(1)

    p1=p1|0x3f p1= xxff ffff, write 1 before reading the state

    if((p1 & 0x3f)) p1 0 p1 5 has a high level.

    p0=0xff;All lights out.

  2. Anonymous users2024-02-06

    It's a very simple procedure!Initialize first, then set to 0, and then judge separately that if the conditions are met, jump to 0, and continue to scan if they are not satisfied!

  3. Anonymous users2024-02-05

    Write it in c, it's very simple, 40 lines, it's done, you can do it with a while loop, and if judgment statement, I hope to go back and flip through the book, so that you can learn it well!

  4. Anonymous users2024-02-04

    org 0000h

    sjmp start

    org 0030h

    start: mov p0, 00h

    loop: mov c,jc l1l1: setb

    mov c,jc l2l2: setb

    mov c,jc l3l3: setb

    mov c,jc l4l4: setb

    mov c,jc l5l5: setb

    mov c,jc l6l6: setb

    sjmp: loop

    endz: This is the most primitive method!

  5. Anonymous users2024-02-03

    The purpose of the MCU program is to make the MCU "obedient", complete a series of actions according to the predetermined design, and finally achieve a specific function.

    For example, the single-chip microcomputer is used to control the flow lamp, after the power is turned on, the first light is on, and then the delay is for a period of time, the second time the light is on, and then the delay is for a period of time, and the third light is on ......After a period of time, the light comes back to the first time, and so on. There are questions about how many lights are turned on for the first time, how much time is delayed, how many different lights are set in a cycle, ......These determine the pattern of the flowing lamp, the speed of flow, and these, the single-chip microcomputer obviously has no self-judgment ability, must rely on people to "assign" the task to it, and it is according to the design of the people in turn.

    In order to make the single-chip microcomputer "obedient", it is necessary to issue commands in the language that the single-chip microcomputer can understand, and the language that the single-chip microcomputer can understand is called "instructions". The number of instructions that 51 single-chip microcomputer has 111, while the number of instructions of PIC single-chip microcomputer is only 35. Each instruction completes a most basic action, and in order to complete a specific function, people have to arrange and combine these instructions to form a sequence of instructions, which is the program.

Related questions
4 answers2024-04-06

You use a P1 port to control the dynamic scanning of 8 digital tubes, and the dynamic scanning display of digital tubes needs to be blanked. >>>More

2 answers2024-04-06

Summary. Please tell me about the specific question, dear. >>>More

8 answers2024-04-06

void key0()

if(p1_0!=1) *If the key 0 is pressed. >>>More

10 answers2024-04-06

Ignoring the influence of temperature and other factors, the method of measuring voltage by series resistance can be directly adopted. >>>More

7 answers2024-04-06

Just learn 51 first, the absolute entry-level, you can choose Guo Tianxiang's for the development board, it's been many years, the information is very complete, and then you can look at 32 or something.