Thursday, March 11, 2010

ISP cable for AT89Sxx and AVR seires

ISP for 89S51 89S52
Download:
SCHEMATIC.PDF modified schematic with onboard USB cable port
LAYOUT.PDF image of PCB layout viewed from the top layer
LAYOUT2.PDF mirror layout
BOM.PDF component lists
ISP-30a.zip Asim's Loader Software

Source full copyrights belongs to :

Wichit Sirichote, kswichit@kmitl.ac.th
Complete page Website 
About ISP complete details : Click here

Tuesday, March 2, 2010

Send sms using GSM

#include regx52.h
#include stdio.h
#include string.h
void InitUART(void)
{
 TMOD=0x20;//Timer 1,Mode 2
 TH1 = -3;// 9600 baud rate at 11.059 MHz
 TR1=1; // Start Timer1
 TL1=-3;
 SCON=0x52;// 8-bit UART mode 1
}

void Delay2mSec()
{
 unsigned char i;
 for(i=0;i<30;i++);
}

void getline (char *line)
{
while ((*line++ = getchar()) != '\n');
}
  
void main()
{
 unsigned char AT[] = "AT+CMGS=";
 unsigned char response[2];
 InitUART();
      printf("AT+CMGF=");
                        putchar('1');
      putchar(0x0d);
      putchar(0x0a);
      Delay2mSec();
      printf("AT+CMGS=");
                        putchar('"');
                        printf("9566224266");
                        putchar('"');
      putchar(0x0d);
      putchar(0x0a);
      Delay2mSec();
      printf("Hii welcome!!");
      putchar(0x1A);
      getline(response);
}