intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l 1.2 USING THE PWM STATEMENT The PWM statement can be used to generate quite accurate frequencies. The following table lists the reload values 8 octaves of an equal tempered chromatic scale. The reload values are for the first two arguments of the PWM statement, so it is assumed that a square wave is being generated. The reload values assume a 11.0592 MHz crystal.

IDEAL ACTUAL HEX NOTE OCTAVE FREQUENCY FREQUENCY RELOAD RELOAD C 1 32.703 32.704 14090 370A H C# 1 34.648 34.649 13299 33F3 H D 1 36.708 36.708 12553 3109 H D# 1 38.891 38.889 11849 2E49 H E 1 41.203 41.202 11184 2BB0 H F 1 43.654 43.653 10556 293C H F# 1 46.246 46.215 9963 26EB H G 1 48.999 49.000 9404 24BC H G# 1 51.913 51.915 8876 22AC H A 1 55.000 55.001 8378 20BA H A# 1 58.270 58.270 7908 1EE4 H B 1 61.735 61.736 7464 1D28 H C 2 65.406 65.408 7045 1B85 H C# 2 69.296 69.293 6650 19FA H D 2 73.416 73.411 6277 1885 H D# 2 77.782 77.785 5924 1724 H E 2 82.406 82.403 5592 15D8 H F 2 87.308 87.306 5278 149E H F# 2 92.498 92.493 4982 1376 H G 2 97.998 98.000 4702 125E H G# 2 103.826 103.830 4438 1156 H A 2 110.000 110.002 4189 105D H A# 2 116.540 116.540 3954 0F72 H B 2 123.470 123.472 3732 0E94 H C 3 130.812 130.798 3523 0DC3 H C# 3 138.592 138.586 3325 0CFD H D 3 146.832 146.845 3138 0C42 H D# 3 155.564 155.570 2962 0B92 H E 3 164.812 164.807 2796 0AEC H F 3 174.616 174.612 2639 0A4F H F# 3 184.996 184.986 2491 09BB H G 3 195.996 196.001 2351 092F H G# 3 207.652 207.661 2219 08AB H A 3 220.000 219.952 2095 082F H A# 3 233.080 233.080 1977 07B9 H B 3 246.940 246.946 1866 074A H - 170 -