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.

programming( c languange ), using keil compiler

Status
Not open for further replies.

snoraimah

Junior Member level 1
Joined
Aug 11, 2011
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,391
can somebody help me how can i make a code in language c this ff:

a) transmit to the serial the string "WINDOW BREACHED" when an internal interrupt 0(zero) occurs.

a) transmit to the serial the string "WINDOW BREACHED" when an external interrupt 1 occurs.

assume that the serial link is operating at 9600 bps, 8bits/char and fc=11.592 MHz,
 

When you ask a question regarding mcu you should specify the compiler and mcu model, in this case you didn't provide any info so your post can't be answered by anyone.

Alex
 

oh im sorry, im using keil, language c.
 

And the mcu is....

---------- Post added at 11:16 ---------- Previous post was at 11:12 ----------

Also make sure that you use proper titles in your threads that are related to the content of the thread and not generic titles like in this thread ("how to program this?!!").
 

you still haven't mentioned your mcu but it is probably AT89... so I have no idea about them, I have only used AVR and ARM.
 

im using mcu of AT89...like what you said. im also using KEIL complier.
 

Have you written any code?
I'm sure that many members can hep but they will not write the complete code for you, you have to show/provide what you have done first so that they can help you in specific parts or with any mistake you might have in your code.


Alex
 
#include<REG52.h>
void main()
{
P1=0x10;
EA=1;
ES=1;
EX0=1;
EX1=1;
ET0=1;
ET1=1;
while(1)
PCON=PCON|0X01;
}

void external 0() interrupt 0
{
T1=0;
SBUF=string "WINDOW BREACHED";
while(T1==0);
break;
}

void external 1() interrupt 1
{
T1=0;
SBUF=string "DOOR BREACHED";
while(T1==0);
break;
}






>PLEASE HELP ME!!!...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top