Talking about the Output Frequency and Source Code of SCM Control Frequency Synthesizer MC145151-2

one,

The MC145151-2 is a phase-locked frequency synthesizer integrated chip. It has N13~N0 14 pins for controlling the output frequency.

Which N13, N11 has been grounded, N12 vacant.

From the PDF file of MC145151-2, find the section on control frequency, the screenshot is as follows:

Talking about the Output Frequency and Source Code of SCM Control Frequency Synthesizer MC145151-2

According to the illustration, it can be seen that the control relationship of N10~N0 to the output frequency is as follows:

011 1000 1000 : Output 5000 KHz

011 1000 1001 : Output 5001 KHz

011 1000 1010 : Output 5002 KHz

..............................

..............................

..............................

101 0111 1100 : Output 5500 KHz

The analysis shows that the minimum: 0x0388, the largest: 0x057C.

two,

It is now required to control the N10~N0 pins using the SCM button count method so that the output frequency is 5000~5500KHz.

The microcontroller is STC89C52.

Design add, subtract, clear three keys;

Connect P2.2~P2.0 and P0.7~P0.0 to N10~N0;

Output 11-bit binary number here, minimum: 0x0388, maximum: 0x057C.

According to the above requirements, the design procedure is as follows.

//=================================

#include

Sbit K_ADD = P3^3; //+

Sbit K_SUB = P3^4; //-

Sbit K_000 = P3^5; //Clear

//----------------------------

Void delay_ms(unsigned int n)

{

Unsigned char j;

While(n--) for(j = 0; j "230; j++);

}

//----------------------------

Void main()

{

Unsigned int m;

m = 0x0388;

While(1) {

P2 = (m/256);

P0 = (m % 256);

If (K_000 == 0) {

Delay_ms(10);

If (K_000 == 0) {

m = 0x0388;

While(K_000 == 0);

} }

If (K_ADD == 0) {

Delay_ms(10);

If (K_ADD == 0) {

m++;

If (m ” 0x057C) m = 0x057C;

While(K_ADD == 0);

} }

If (K_SUB == 0) {

Delay_ms(10);

If (K_SUB == 0) {

M--;

If (m < 0x0388) m = 0x0388;

While(K_SUB == 0);

} } }

}

Whether the above program is correct can be tested by connecting 11 external LEDs P2.2~P2.0 and P0.7~P0.0.

Gaming Keyboard

wired backlight gaming keyboard

Gaming keyboard with laser curving keypad, led backlit, blue , red, green colors are available,suspension button design, perfect Mechanical hand feeling !

* PC GAMING KEYBOARD AND Gaming Mouse COMBO: Includes Onikuma RGB Backlit Computer Gaming Keyboard and RGB Backlit Gaming Mouse.ALL-IN-ONE PC GAMER VALUE KIT, Fantastic for Gamers (New Improved Version)
* RGB BACKLIT GAMING KEYBOARD; 7 different RGB Lighting modes & effects, 6 backlight brightness levels, adjustable breathing speed. The keycaps offering clear uniform backlighting WIN key can be disabled for gaming. The PC Gaming Keyboard has been ergonomically designed to be a superb typing tool for office work as well. The gaming Keyboard is built to withstand the average liquid spill. The integrated wrist rest gives you the comfort you need for marathon gaming sessions
* MULTI MEDIA & ANTI GHOSTING; The Gaming Keyboard has 25 conflict free (n-Key Rollover) 10 Dedicated Multimedia keys plus 12 additional FN+ Multimedia keys (Total 114 keys). Keys are quiet, designed for longevity, durability delivering precise tactile feedback. Comes with Full numeric keypad and a gold-plated corrosion free USB connector for a reliable connection and ultimate Gaming performance
* WIRED GAMING MOUSE; Ergonomic Onikuma RED Backlit Gaming Mouse up to 6400 DPI (user adjustable 800/1600/2400/3200/4800/6400DPI), 30G acceleration and Weight Tuning set. Total 6 Buttons of which 5 are programmable. The High-Precision Sensor delivers Pinpoint Accuracy while the Gaming Grade Micro Switches ensure longevity, greater durability and extreme responsiveness, giving you an even greater edge over your competition
* PC GAMING KEYBOARD AND GAMING MOUSE COMPATIBILITY: Windows 10, Windows 8, Windows 7, Windows Vista, or Windows XP, Limited Mac OS keyboard support. Works well with all major Computers Brands and Gaming PCs.


Gaming Keyboard,Wired Rgb Game Keyboard,Wire Smart Keyboard,Game Controller

MICROBITS TECHNOLOGY LIMITED , https://www.hkmicrobits.com

Posted on