Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Saturday, February 6, 2010

Electronics- MC based Serial Data Transfer to PC


Hi frnds,
Given below is the source code in C for the serial data transfer to PC using Micro-Controller (MC) using RS 232-C.

SOURCE CODE:

#include

/* special function register declarations */
/* for the intended 8051 derivative */

#include /* prototype declarations for I/O functions */
sbit MES1 = P2^0;
sbit MES2 = P2^1;
sbit MES3 = P2^2;
sbit MES4 = P2^3;
sbit MES5 = P2^4;
sbit MES6 = P2^5;
sbit MES7 = P2^6;
sbit MES8 = P2^7;
int i;
void time1ms();
void delay(int n);
/****************/
/* main program */
/****************/
void main (void) { /* execution starts here after stack init */
SCON = 0x52; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 0xfd; /* TH1: reload value for 9600 baud@11.0592mhz */
TR1 = 1; /* TR1: timer 1 run */
TI = 1; /* TI: set TI to send first char of UART */


while (1) {
P2=0xFF;
if (MES1 == 0)
{
printf ("Welcome to EFY \n ");
printf ("Microcontroller Based Serial Data transfer To PC \n ");
printf ("by T.Shankar & S.Thangamani \n ");
printf ("Data transmission successful\n\n ");
delay(1000);
}
if (MES2 == 0)
{
printf ("T.Shankar & S.Thangamani\n ");
printf ("Old door N0. 8, Power House Road, Madurai\n ");
printf ("Contact.- 91-9443474124, 91-9944082936\n ");
printf ("shankartbe@yahoo.co.in, parvatyele@yahoo.co.in\n ");
printf ("Data transmission successful \n\n ");
delay(1000);
}
if (MES3 == 0)
{
printf ("Welcome to EFY \n ");
printf ("EFY Enterprises Pvt. Ltd.\n ");
printf ("D87/1, Phase-I\n ");
printf ("Okhla Industrial Area, New Delhi-110020\n ");
printf ("Data transmission successful \n\n ");
delay(1000);
}
if (MES4 == 0)
{
printf ("Tested By Sunil Kumar\n ");
printf ("Publised in EFY Magazine, Feb.-2010\n\n ");
delay(1000);
}
if (MES5 == 0)
{
printf ("Welcome to EFY \n ");
printf ("Message-5\n\n ");
delay(1000);
}
if (MES6 == 0)
{
printf ("Welcome to EFY \n ");
printf ("Message-6\n\n ");
delay(1000);
}
if (MES7 == 0)
{
printf ("Welcome to EFY \n ");
printf ("Message-7\n\n ");
delay(1000);
}
if (MES8 == 0)
{
printf ("Welcome to EFY \n ");
printf ("Message-8\n\n ");
delay(1000);
}
}
}

void time1ms() /* 1 ms delay */
{
int i;
for(i=0;i<50;i++); // the value shown in this line, 50 was calibrated for 1ms
// you may change it!
}

void delay(int n) /* do nothing n*1ms */
{
int i;
for(i=0;i time1ms();

}


NOTE: We can Change the messages printed in the "printf" statement and put our own messages. We need to connect serial cable to our PC and run Hyperterminal Software. Choose the COM port properties and then execute in the kit u can see the message! :)

SOURCE: ELECTRONICS FOR YOU Magazine FEB. 2010

Tuesday, October 20, 2009

Nokia's First LINUX smartphone!


Nokia has now announced its first phone running on linux software. Built around the company's linux-based MAEMO operating system(Maemo 5), the N900 empowers users to have dozens of application windows open and running simultaneously while taking full advantage of the cellular features, touch screen and QWERTY keyboard.

According to the company, the N900 has evolved from Nokia's previous generation of Internet tablets. It packs a powerful ARM cortex-A8 processor, up to 1GB of application memory and open GL ES 2.0 graphics acceleration. The result is PC-like multitasking,allowing many applications to run simultaneously.

The Nokia 900 will be available in select markets from this month! For gadget gizmos N900 would definitely be a thirst quencher

Source: Electronics for you magazine October 2009

Monday, October 19, 2009

Electron "O" Mania

This section will contain all latest info in the industry of electronics from authentic sources. People who are gadget freaks can peep in to find good info about products.