I am trying to send sms with siemens c55 by Pic 16f876.I already know at command.I have sent already sms by hyperterminal.And I tried on pic 16f876 ı failed.I dont know where i mistake.Plz help me.my source codes are below...
my schematic is:
http://images.elektroda.net/15_1185282984.jpg
///////////////////////////////////////////////////////////////////////////////////
#include <16f876.h> // Kullanılacak denetleyicinin başlık dosyası
tanıtılıyor.
#fuses HS,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NO DEBUG,NOCPD //
Denetleyici konfigürasyon ayarları
#use delay (clock=20000000) // Gecikme fonksiyonu için kullanılacak
osilatör frekansı belirtiliyor.
#use rs232 (baud=9600, xmit=pin_C6, rcv=pin_C7, parity=N, stop=1) //
RS232 protokolünün 9600 bit/sn baud hızında olacağını ve
//
TX,RX uçlarının hangi pinler olacağını tanımlıyor
//
parity bitinin olmadığını, stop bitinin 1 bit olacağı belirtiliyor
unsigned char mesaj_gonder[] = "AT+CMGS=19";
unsigned char mesaj[] = "0011000C910945447198660000FF05E8329BFD06";
/********* ANA PROGRAM FONKSİYONU********/
void main ( )
{
setup_spi(FALSE); // SPI birimi devre dışı
setup_adc_ports(NO_ANALOGS); // ANALOG giriş yok
setup_adc(ADC_OFF); // ADC birimi devre dışı
setup_ccp1(ccp_off); // CCP1 devre dışı
setup_ccp2(ccp_off); // CCP2 devre dışı
set_tris_c(0x80);
puts(mesaj_gonder); //AT+CMGS=25
putchar(0x0D); // Enter tuşuna basılıyo
delay_ms(3000);
puts(mesaj); //Message in PDU format
putchar(0x1A); //Control-z tuşu
putchar(0x0D); // Enter tuşuna basılıyor
}
Bookmarks