Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C program of 5 1 single chip microcomputer
C program of 5 1 single chip microcomputer
sfr p0m 1 = 0x 93; //These are the addresses of predefined registers.

Things like sfr P0M0 = 0X94//POM 1 will be changed to these addresses when compiling.

sfr p 1m 1 = 0x 9 1; //mcu also operates on these addresses at runtime.

sfr p 1m 0 = 0x 92;

sfr p2m 1 = 0x 95;

sfr P2M0 = 0X96

uchar CONT _ 1; //Define a constant as a counter with the type of unsigned integer.

p0m 1 = 0; //Set the io port to push-pull output.

p 1m 1 = 0; //The following things define the initial values of these registers.

p2m 1 = 0; //Avoid errors when using these registers for the first time.

P0M0 = 0XFF

p 1m 0 = 0x ff;

P2M0 = 0XFF