System board using RC oscillator, how to solve the simulation and real chip operating frequency error problem?
It is proposed to use crystal when simulation, the actual
chip with RC oscillator circuit way to develop.
First of all, calculate external
crystal and RC oscillator parameters according to chip operating frequency, plug crystal
into emulator, re-compiler the program when simulation process passed, modify High_Clk
option to RC, after the chip be programmed, adjust RC oscillator component parameters
on target board until it meets the requirements.
In order to adjust RC component
parameters conveniently, you can use an idle I/O port to output a fixed frequency
square wave, so use the oscilloscope waveform to adjust RC parameters, and also facilitate
the production of debugging. If no idle I/O port can be used, you can write a simple
test program, program chips to adjust.