The first simple summary of the content encountered, although not actually burned, but probably know how to operate, the two days to go out again, when the estimated will forget something. So let's summarize some.
Let's talk about the point of programming.
1. As with C, be aware of the difference between the use of the head file symbol <> and the "".
2. There are also chip-specific header files.
The point of note when writing a single-chip microcomputer
1. To initialize the CPU first
2. Initialize each module that you want to use
3. Load the module with the appropriate values
4. There is a bit of correlation between each module, especially the timer block.
5. Sometimes you just need to set the value of the one or two bits in the register, directly assign the value to the one or two-bit corresponding option.
For example. We only need to rewrite the state of the Tmrxon, directly write Tmrxon = 1/0, you can, do not need to write Txcon = 0x00; If you assign all the values to this register, it will be simple to use the latter form, but make sure that the correspondence between each bit is not mistaken. Well, let's write it down here, and get it repaired. Ha ha
"Single Chip Microcomputer" 1937 Records