PIC Vietnam

PIC Vietnam (http://www.picvietnam.com/forum/index.php)
-   Những câu hỏi thường gặp (http://www.picvietnam.com/forum/forumdisplay.php?f=54)
-   -   code ccs về điều khiển thiet bị qua mạng điên thoại cố định (http://www.picvietnam.com/forum/showthread.php?t=32599)

thanhsangdt01 24-07-2013 11:23 PM

code ccs về điều khiển thiet bị qua mạng điên thoại cố định
 
void ISD_Send(char x)
{
char t;
// Change DTMF or Speaker
output_low(TP_DTMF_SPK);
output_high(ISD_REC);
output_high(ISD_PLAY);
t = x & 0x1;
if(t) output_high(ISD_A0);
else output_low(ISD_A0);
t = x & 0x2;
if(t) output_high(ISD_A1);
else output_low(ISD_A1);
t = x & 0x4;
if(t) output_high(ISD_A2);
else output_low(ISD_A2);
t = x & 0x8;
if(t) output_high(ISD_A3);
else output_low(ISD_A3);
delay_ms(1);
output_low(ISD_PLAY);
T1_cnt = 0;
}
giai thich em đoan code ...em đọc trên tài lieu tieng anh đoc khong hiểu


Múi giờ GMT. Hiện tại là 08:35 PM.

Tên diễn đàn: vBulletin Version 3.8.11
Được sáng lập bởi Đoàn Hiệp.
Copyright © PIC Vietnam