#include<lpc21xx.h> void int_uart0() { U0FCR=0x07; U0LCR=0x83; U0DLL=98; U0LCR=0x03; } void uart0_send(unsigned char data) { U0THR=data; while((U0LSR&0x40)==0); } void uart_msg(unsigned char *msg) { while(*msg) { uart0_send(*msg); msg++; } } void delay(int time) { int i,j; for(i=0;i<time;i++) for(j=0;j<5000;j++); } void gsmcmdcall() { uart_msg("ATD8888788412;\r\n"); delay(20000); uart_msg("ATH\r"); delay(5000); } void msg() { uart_msg("HELLO WORLD VIVEK HERE"); } void gsmsms() { uart_msg("AT+CMGF=1\r\n"); delay(150); uart_msg("AT+CSCS=\"GSM\"\r\n"); delay(150); uart_msg("AT+CMGS=\"8888788412\"\r\n"); delay(150); msg(); uart0_send(0x1A); delay(150); } main() { PINSEL0=0x00000005; int_uart0(); gsmcmdcall(); delay(200); gsmsms(); }
Tuesday, 20 March 2018
GSM-LPC2148
Subscribe to:
Post Comments (Atom)
PIC Course with IIT Bombay
Embedded Lab Course with PIC18F4550 by IIT Bombay 2017-18 Overview: Below course was conducted as an outreach initiative of Wadhwani Elect...

-
The APB divider determines the relationship between the processor clock (CCLK) and the clock used by peripheral devices (PCLK). The APB di...
-
VLSI Design & Technology Pune University study material Design and Implementation of 4 bit ALU using VHDL DOWNLOAD Desi...
-
#include<LPC214x.h> #define CS1 1<<13 //p0.13 #define CS2 1<<14 //p0.14 #define RS 1<<25 #d...
No comments:
Post a Comment