Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i need some help for serial programming

Status
Not open for further replies.

praba_J

Member level 3
Joined
Nov 24, 2010
Messages
66
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
LINYI,CHINA
Activity points
1,655
hi, i need some sample programs for serial communication in c language.. something like protocol based communication with checksum calculation and using some commands for special data request.. no specific controller and protocol..i just want the sample programs to understand the modules and get some ideas from the programs..
thanks in advance..
 

thanks for your reply.. but i need some microcontroller based examples... i am using air condition monitoring protocol.. so i need details something related to that protocol..
 
Last edited:

Dear Praba,
What is mean by air condition monitoring protocol. Can you please explain it briefly?

- - - Updated - - -

UART coding for AT89c51 microcontroller:
void UartInitialisation()
{
TMOD=0x20;
SCON=0x50;
TH1=-3;
TR1=1;
}
void UartTransmit(unsigned char TransmitData)
{
SBUF=TransmitData;
while(TI==0);
TI=0;
}
void UartTransmitString(unsigned char *str)
{
while(*str)
{
UartTransmit(*str++);
}

}
unsigned char UartReceive()
{
unsigned char ReceivedData;
while(RI==0);
ReceivedData=SBUF;
RI=0;
}
}
 

i am using datamate 3000 for my project.. it is a small room air condition monitoring protocol.. i searched internet for some sample programming.. but can't get it. so if i get some sample programs similar to the air condition protocol or temperature monitoring protocols it will be very useful to develop my program.. i need some sample programs related to monitoring projects to get some ideas like how to receive the temperature values with checksum and how to check the checksum it is corrrect or not and how to request the protocol with specific command codes.. i have details of command codes ..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top