Go to the source code of this file.
◆ SYS_Delay()
Definition at line 65 of file fw_sys.c.
66{
68 do
69 {
72 } while (--t);
73}
◆ SYS_DelayUs()
Definition at line 75 of file fw_sys.c.
76{
78 do
79 {
82 } while (--t);
83}
◆ SYS_SetClock()
| void SYS_SetClock |
( |
void |
| ) |
|
Change system clock
- For SDCC only.
- For Keil C51, trim IRC in STC-ISP will be more accurate
- Invoke this in the beginning of main()
Definition at line 40 of file fw_sys.c.
41{
42#if defined (SDCC) || defined (__SDCC)
44 P_SW2 = 0x80;
46 {
48 do {
50 } while (--j);
51 }
52 P_SW2 = 0x00;
55#endif
56}
#define SYS_SetFOSC(__IRCBAND__, __VRTRIM__, __IRTRIM__, __LIRTRIM__)
◆ SYS_TrimClock()
◆ ticks_ms
An approximate estimate of instruction cycles in one second, may vary in different compilers even differnt versions, adjust it if you find the delay too slow or fast.
Definition at line 30 of file fw_sys.c.
◆ ticks_us