Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Urjent help rquired for my project Agribot

Status
Not open for further replies.

jaykumar.v@somaiya.edu

Newbie level 1
Newbie level 1
Joined
Mar 1, 2015
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
0
Activity points
21
I am doing a project "Agribot" and has facing a problem in interfacing GSM with psoc 5 lp


i saw many codes and i developed my own but its not giving output though successfully compiled

i just tried a code for gsm interface psoc and that too not working

GSM is working with pc hyperterminal correctly but not with psoc

main problem is in code and m not locating the problem. please help




Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* ========================================
 *
 * Copyright YOUR COMPANY, THE YEAR
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 *
 * ========================================
*/
#include <project.h>
#include<cypins.h>
#include<string.h>
 
void system_init(void);
void trans(char[] , int);
void delay(uint32);
void ring(void);
 
char AT_check[]="AT\r";
char ok[]= "OK";
char rec[]="";
 
 
    
int main()
{
    CyGlobalIntEnable;
    /* Place your initialization/startup code here (e.g. MyInst_Start()) */
 
    /* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
    for(;;)
    {
        system_init();
        //trans(AT_check,3);
        //puts(AT_check);
        
        UART_PutString("A");
        int i=0;
        
        while((rec[i] = UART_ReadRxData())!='\0')
        {
            i++;
        }
        //gets(rec);
        LCD_PrintString("Checking");
        delay(2000);
        LCD_PrintString(rec);
        delay(2000);
        
        LCD_ClearDisplay();
        if(strcmp( ok , rec ) || strcmp( "\r", rec))
        {
            LCD_Position(0,0);
            LCD_PrintString("GSM not Connected");
            delay(2000);
            LCD_ClearDisplay();
        }
        else   
        {
            LCD_Position(0,0);
            LCD_PrintString("GSM Connected");
            delay(2000);
            LCD_ClearDisplay();
        }
        /* Place your application code here. */
    }
    //ring();
}
 
void system_init()
{
    UART_Start();
    LCD_Start();
    
    LCD_PrintString("Hii");
    delay(2000);
    LCD_ClearDisplay();
}
 
void trans(char tx[], int n)
{
    int i;
    for(i=0; i<n; i++)
    {        
        UART_WriteTxData(tx[i]);
        delay(2000);
    }
}
 
void delay(uint32 d)
{
    uint32 i,j;
    for(i=1; i<=d; i++)
    {  
        for(j=1;j<=i;j++);
    }
}
 
/*void ring()
{
    int i=0;
        
        while( (rec[i] = UART_GetChar())!='\0')
        {
            i++;
        }
        
        LCD_PrintString(rec);
}*/
/* [] END OF FILE */




i have copied string.h in directory and used in code.....
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top