Microcontroller › 8051 › Need help in zigbee communication for the project.
- This topic has 0 replies, 1 voice, and was last updated 13 years, 4 months ago by
manohar.
-
AuthorPosts
-
December 23, 2011 at 10:37 am #1460
manohar
ParticipantI need to send voltage values through zigbee.I connected ADC to microcontroller and also getting digital values in LCD. I need to send that digital values using zigbee.
For this code i don’t know where i have to put below code in the actual program.
{
while(!TI);
SBUF=m; /// m is the voltage values 1,2,3,4,5 is sending to sbuf
TI=0;
//data1=1;
delay(1);
}
Below is the original program
// Program to Interface Humidity sensor with 8051 Microcontroller
#include<reg51.h>sfr lcd_data_pin=0x80;//p0 port
sbit rs=P3^0;
sbit rw=P3^1;
sbit en=P3^2;sbit wr= P3^3;
sbit rd= P3^4;
sbit intr= P3^5;sfr input_port=0x90; //p1 port
char m;
void delay(unsigned char count)
{
unsigned char i;
unsigned int j;
for(i=0;i<count;i++)
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char item)
{
lcd_data_pin=item;
en=1;
rs=0;
rw=0;
delay(1);
en=0;
}
void lcd_data(unsigned char item)
{
lcd_data_pin=item;
en=1;
rs=1;
rw=0;
delay(1);
en=0;
}
void lcd_data_string(unsigned char *str) // Function to send string on LCD
{
int i=0;
while(str!=’