SP37
Tire Pressure Monitoring Sensor
ROM Library Functions
ROM Library Function Guide 75 Revision 1.0, 2011-12-15
2.15 StartXtalOsc()
2.15.1 Description
This function enables the crystal oscillator clock and delays for a defined amount of time. The delay time should
be long enough that the crystal oscillator is stable, which is determined by the crystal startup time (see [1]). The
minimum/maximum tolerance of the delay time may be derived by considering the tolerance of the
12 MHz RC Oscillator (see [1]).
2.15.2 Actions
• Enable the crystal oscillator clock
• Wait in IDLE for set Delay time
2.15.3 Prototype
signed char StartXtalOsc(unsigned char Delay)
2.15.4 Inputs
2.15.5 Outputs
2.15.6 Resource Usage
Table 70 StartXtalOsc: Input Parameters
Register / Address Type Name Description
R7 unsigned char Delay Delay time to wait in IDLE after XTAL is enabled.
Duration[µs] = Delay x 42.67[µs]
Table 71 StartXtalOsc: Output values
Register/Address Type Name Description
R7 signed char StatusByte StatusByte:
0: XTAL started and delay passed
-1: XTAL already on (no action)
Table 72 StartXtalOsc: Resources
Type Used or Modified
Registers R7
SFR ACC, B, CFG0, DPTR, DIVIC, PSW, REF, TCON, TH0, TL0, TMOD
Stack 0 Bytes
1)
1) Two additional bytes, not included here, are needed to call the library function