2020-12-13 51 MCU notes

SCM model selection error The STC model in the upper left corner of the STC software

Can't display LCD1602 display plugged in reverse

extern uchar time; uchar time should be added when the error is not defined and used in other files; it cannot be used directly. The
Insert picture description here
following figure is an error case: it
correct
This should be extern uchar PAUSE; but the .h file cannot use extern to refer to the variables of your own .c file, you can refer to the variables of other .c files. Only methods are provided here, but the practice is wrong
is okay to define a variable in a .c file and then use extern to quote
it in .h but .h Files cannot use extern to refer to variables
in their own .c files. Variables are generally not defined in .h.
H generally uses macro definition #define, and Baidu knows the macro definition.

Guess you like

Origin blog.csdn.net/m0_48808835/article/details/111563176