SCM C language programming: playing scales (1)

Single chip microcomputer STM32L151CCU6
1206RGB (single)
0201 package SLP0603 ESD electrostatic diode 5V one-way ESD
Mobile phone crystal 3.2*2.5mm 3225 26M (26.000MHZ) 7.5PF 10PPM 20PPM 30PPM

/* Name: Performance scale

Description: This example uses a timer to play a tone

Level, playback is controlled by K1.

*/

#include

#define uchar unsigned char

#define uint unsigned int

Sbit K1=P1^0;

Sbit SPK=P3^4;

Uint i=0; //note index

//14 notes placed in the timing register under mode 2

(TH0, TL0)

Uchar code HI_LIST[]={0,226,229,232,233,236,238,240,241,242,244,245,246,247,248};

Uchar code LO_LIST[]={0,4,13,10,20,3,8,6,2,23,5,26,1,4,3};

/ / Timer 0 interrupt function

Void T0_INT() interrupt 1

{

TL0=LO_LIST[i];

TH0=HI_LIST[i];

SPK=~SPK;

}

//delay

Void DelayMS(uint ms)

{

Uchar t;

While(ms--) for(t=0;t<120;t++);

} 单片机C语言程序设计:演奏音阶 (1)0

[1] [2] 单片机C语言程序设计:演奏音阶 (1)1

Li-ion Charger

HIGH QUALITY:Made of only the highest quality materials and built to last! Our chargers are gauranteed to match the original brand name chargers' quality.

EASY TO USE: Simply plug the charger into a wall outlet and then directly into your scooter.

The charger protected: Short circuit protection/ over current protection/ over voltage protection; red light -- charging, green light -- charge OK, it stop automatically when the battery is full. Warm Tips: To avoid the temperature of your charger too high, please do not charge too long.

The shell is made by high-quality plastic, smooth appearance with no impurities. Good safety performance, more reliable for you to use. Red light means charging; Green light means fully charged or disconnect.

Aviation Plug Scooter Charger,Power Scooter Charger,Li-Ion Battery Charger

Shenzhen Waweis Technology Co., Ltd. , https://www.huaweishiadapter.com