唐 山 学 院 毕 业 设 计
while(1) {
//接收到数据 if(nRev_UART0 == 1) {
for(i = 0;i < nRX0_Len;i++) {
buf1[i] = UART0_RX_BUF[i]; }
len1 = nRX0_Len; nRX0_Len = 0; nRev_UART0 = 0; break; } }
//判断是否是 > 响应
res = getSendResponse(buf1,len1); if(res == 1) {
//发送数据信息
for(i = 0;i < len2;i++) {
UART0_TX_BUF[i] = buf2[1]; }
//设置发送数据的长度 nTX0_Len = len2;
//设置中断标志,进入发送中断程序 IFG1 |= UTXIFG0; }
//等待响应 //接收到数据 while(1) {
if(nRev_UART0 == 1)
41
唐 山 学 院 毕 业 设 计
{
for(i = 0;i < nRX0_Len;i++) {
buf1[i] = UART0_RX_BUF[i]; }
len1 = nRX0_Len; nRX0_Len = 0; nRev_UART0 = 0; break; } }
isSuccessSend(buf1,len1); }
void Init_TimerA(void) {
// 选择SMCLK,清除TAR TACTL = TASSEL1 + TACLR; //时间间隔 CCR0 = 40000; // 增记数模式 TACTL |= MC0; }
////////////////////////////////////////////// // 定时器中断,完成 ADC 转换 #if __VER__ < 200
interrupt [TIMERA0_VECTOR] void TimerA_ISR(void) #else
#pragma vector=TIMERA0_VECTOR __interrupt void TimerA_ISR(void) #endif {
int i; // 关闭转换
ADC12CTL0 &= ~ENC;
42
唐 山 学 院 毕 业 设 计
// 读出转换结果
ADC_BUF[10 * 0 + nADC_Count] = ADC12MEM0; ADC_BUF[10 * 1 + nADC_Count] = ADC12MEM1; ADC_BUF[10 * 2 + nADC_Count] = ADC12MEM2; ADC_BUF[10 * 3 + nADC_Count] = ADC12MEM3; ADC_BUF[10 * 4 + nADC_Count] = ADC12MEM4; ADC_BUF[10 * 5 + nADC_Count] = ADC12MEM5; ADC_BUF[10 * 6 + nADC_Count] = ADC12MEM6; ADC_BUF[10 * 7 + nADC_Count] = ADC12MEM7; nADC_Count += 1; if(nADC_Count >= 10) {
for(i = 0; i < 10 * 8;i++) {
ADC_BUF_Temp[i] = ADC_BUF[i]; }
nADC_Count = 0; nADC_Flag = 1; }
// 开启转换
ADC12CTL0 |= ENC + ADC12SC; }
43
唐 山 学 院 毕 业 设 计
英文文献
A number of the SMS method of
decoding
1, A number of SMS decoding method is characterized, including the following steps: receiving side terminal after receipt of text messages sent to terminal number extracted information, referred to the receiver terminal to the first decoding strategy number of the sender information terminal decoding; if decoding is successful, the recipient in the sender terminal display terminal number; Otherwise, the second decoding strategy number of the sender terminal to decode the information, and decoding in the above results show that the recipient terminal.
2, As described in claim 1 method, and its characteristics is described in the first strategy for decoding and receiving side terminal coding strategy number that corresponds to the number of decoding strategies.
3, As described in claim 2 method, the characteristics is that the strategy described in the first decoder decoding strategy for the second dial (DTMF). 4, As described in claim 3 of the method of characteristics is described in the second decoding strategy for the sender encoding strategy number that corresponds to the number of decoding strategies.
5, As described in claim 3 of the method of characteristics is described in the second decoding strategy for the binary-coded decimal decoding strategy (BCD) o 6, Such as claims 1-5 of the method described in any of its characteristics is that in order to decode the message after the existence of numbers does not belong to the character terminal, decoding the first strategy to determine the success of decoding.
7, A number of SMS decoding method is characterized, including the following steps: receiving side terminal after receipt of text messages sent to terminal number extracted information; to determine the suitability of using the first decoding strategy described in the letter sent to terminal number, decode rate; if so, decoding strategies are the first terminal of the sender number to decode the information, or to the second decoding strategy number of the sender terminal to decode the information.
8, As described in claim 7, method of characteristics is described in the first strategy for decoding and receiving side terminal coding strategy number that corresponds to the number of decoding strategies.
9, Such as claims 7 or 8 of the methods described, and its characteristics is encoded as described in the sender terminal number information does not belong to the
44
唐 山 学 院 毕 业 设 计
existence of the characters in the first decoding strategies to determine first whether or not decoding strategies to decode can be successful.
10, The contents of a text message decoding method is characterized, including the following steps:
If the receiving terminal were told to receive SMS text messages to the global system for mobile communications based on the contents of seven coding strategy (gsm7bit) encoding, the receiver terminal to determine whether the length of the original content and the content is encoded the same length, as well as determine the encoded news of the existence of compensation stream bit; if there is not compensation for the same length, and information exchange with the United States standard decoding strategy code (ascii) text content of the above decoding, and decoding the results show that in the receiver terminal; Otherwise, decoding strategies to gsm7bit content of the messages referred to in decoding, and decoding the results show that in the receiver terminal.
11, As described in claim 10 of the method, the characteristics is described in the contents of the length in bytes.
12, As described in claim 11 of the method, the characteristics is described in the receiver terminal information from the encoded stream to obtain information on the length of the original content.
13, As described in claim 12 method, is characterized, according to the information described in the encoded stream of compensation for carrying digital information content of the field to determine whether there is compensation bit.
14, A mobile terminal, including: receiving module for receiving text messages; first decoding module, receiver module connected with the above, the use of built-in number decoding strategy described in the sender information to decoding terminal number; its characteristics is described in the mobile terminal include: determine the module, the module connected to the first decoder for decoding module to determine the first terminal of the sender number of the success of decoding information; second decoding module, the module connected with the judge referred to in for the decoding module described in the first terminal of the sender number information decoding failure, with its built-in number decoding strategy described in the letter sent to terminal number, income re-decoding.
15, As described in claim 14 of the mobile terminal, and its characteristics is described in the first decoding module decoding strategy built-in number for the
45