[51 single chip microcomputer] Exam basic knowledge summary (pin)

Exam scope:

  • Optional to read after-school exercises
  • Big question:
    1. Pure program: the first four in the experiment, multiplication is not tested
    2. Interrupt, timer T1: Example 5-1 of the square wave book, which can also be implemented in C language
    3. Display, keyboard: 8-bit/16-bit (independent/matrix keyboard, Scanner)
    4. 0832/0809 Example 10-1 (1) (2) (3) 10-6, the program above 10-6 (square wave, rectangular wave)
    5. Chapter 8, Expansion Diagram, "Lecture 14 will do as long as you can."

Serial port:

  • PO mouth:
    • When the external expansion memory is used as a data bus, DB
    • When it is not expanded, it can be used as a general I/O, but there is no internal pull-up resistor. When used as input or output, it should be connected to an external pull-up resistor .
  • P1 port:
    • Only used as I/O port: there is a pull-up resistor inside.
  • The P2 port has two functions:
    • When expanding external memory, it is used as an address bus, AB
    • Used as a general I/O port, it has a pull-up resistor inside;
  • The P3 port has two functions:
    • In addition to being used as IO,
    • There are also some special functions, which are set by special registers (RXD, TXD, external interrupt input INT1/0, WR, RD)
  • RST: Reset terminal. (2Ts reset, power-on reset, button pulse reset, button level reset)
  • XTAL1, XTAL2: clock input, external crystal oscillator circuit or pulse circuit
  • ALE: lower 8 bits, data
  • EA : ROM ,
    • EA is invalid: first visit the on-chip and then off-chip. At this time, no external expansion exceeding 64KB can be added
    • EA valid: direct access to external ROM
    • EA must enable the interrupt when it is interrupted
  • PSEN
    • When reading external program memory (when EA is active), _PSEN_ is active low to enable the external ROM to run.
  • EX0/EX1: external interrupt enable signal
  • IT0, IT1: Interrupt mode: 1 is falling edge trigger, 0 is low level trigger, default low level trigger

Tips:

  1. The serial port can be used as an I/O port: P0 is an external pull-up resistor; P1, 2, and 3 have internal pull-up resistors.
  2. Involving external RAM and ROM pins
  3. Time-sharing multiplexing:

English explanation:

  1. cy = cycle
  2. osc = oscillating (cycle) oscillation (cycle)
  3. External: X in XTAL means external
  4. sbit puts bit addressable things
  5. ALE==Address Lock Enable

Crystal oscillator

  • 51 minimum system:
    • Power supply, ground, reset circuit, crystal oscillator circuit.
  • Crystal:
    • It provides the pulse of 51 single-chip microcomputer, a complex sequential circuit, which is the heart of 51 single-chip microcomputer! The two pins XAL1 and XAL2 are clock access pins, which are the arteries of 51. When the oscillation generated by the crystal oscillator is input to the single-chip microcomputer, there will be a pulse signal, and the internal sequential circuit of 51 can also work. These pulses are called clock signals, the period of the clock signal is called clock period, and the frequency is called clock frequency.

Guess you like

Origin blog.csdn.net/weixin_43801418/article/details/111055137