maheshkumar0459
Newbie level 2
I am interfacing GSM with PSoC 1 using UART.
My code working properly but didn't get proper output.. Here is my code and help any thing to be done..
If switch pressed message to be send.. Baudrate set 9600.
My code working properly but didn't get proper output.. Here is my code and help any thing to be done..
If switch pressed message to be send.. Baudrate set 9600.
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 #include <m8c.h> // part specific constants and macros #include "PSoCAPI.h" // PSoC API definitions for all User Modules void delay(void); void delay(void) { int i; for(i=0;i<10000;i++); } void main(void) { UART_1_Start(UART_1_PARITY_NONE); PRT0DR=0X00; //MAKING LED OFF while(1) { if(PRT0DR=0X01) { delay(); UART_1_CPutString("a"); delay(); UART_1_CPutString("t"); delay(); UART_1_PutChar(13); delay(); UART_1_CPutString("a"); delay(); UART_1_CPutString("t"); delay(); UART_1_CPutString("+"); delay(); UART_1_CPutString("c"); delay(); UART_1_CPutString("m"); delay(); UART_1_CPutString("g"); delay(); UART_1_CPutString("f"); delay(); UART_1_CPutString("="); delay(); UART_1_CPutString("1"); delay(); UART_1_PutChar(13); delay(); UART_1_CPutString("a"); delay(); UART_1_CPutString("t"); delay(); UART_1_CPutString("+"); delay(); UART_1_CPutString("c"); delay(); UART_1_CPutString("m"); delay(); UART_1_CPutString("g"); delay(); UART_1_CPutString("s"); delay(); UART_1_CPutString("="); delay(); UART_1_PutChar(34); delay(); UART_1_CPutString("9"); delay(); UART_1_CPutString("5"); delay(); UART_1_CPutString("3"); delay(); UART_1_CPutString("9"); delay(); UART_1_CPutString("2"); delay(); UART_1_CPutString("1"); delay(); UART_1_CPutString("8"); delay(); UART_1_CPutString("2"); delay(); UART_1_CPutString("2"); delay(); UART_1_CPutString("8"); delay(); delay(); UART_1_PutChar(34); delay(); UART_1_PutChar(13); delay(); UART_1_CPutString("Send a message"); delay(); UART_1_PutChar(26); } delay(); } }
Last edited by a moderator: