Home > other >  MCU do PPM modulation
MCU do PPM modulation

Time:10-18

You, ask me why this program do not to come out the PPM modulation, where there is a problem, is to use a serial port output specific waveform, why the waveform is disorderly??????
# include
Unsigned char flag;
Unsigned int I, a;
Void main ()
{
TMOD=0 x20;
TH1=0 XFD;
TL1=0 XFD;
TR1=1;
REN=1;
SM0=0;
The SM1=1;
I=1;
EA=1;
ES=1;
While (1)
{
If (flag==1)
{
ES=0;
flag=0;
SBUF=a;
while(! TI);
TI=0;
ES=1; }}}
Void ser () interrupt 4
{
For (; i<=8; I++) {RI=0;
The switch (I) {
Case 1: SBUF=0 x20; break;
Case 2: SBUF=0 x01; break;
Case 3: SBUF=0 x40; break;
Case 4: SBUF=0 x02; break;
Case 5: SBUF=0 x40; break;
Case 6: SBUF=0 x10; break;
Case 7: SBUF=0 x10; break;
Case 8: SBUF=0 x20; break;
Default: SBUF=0 x00; break; }
A=SBUF;
If (I==8) I=1;
Flag=1; }}
Or, using the single chip microcomputer which bosses have mature PPM modulation program?

CodePudding user response:

using microcontroller AT89C52 realizes the PPM modulation and demodulation


  • Related