Discussion in "8051 Discussion Forum" started by    raj    Mar 25, 2009.
Wed Mar 25 2009, 06:37 pm
#1
#include<reg51.h>
void main(void)

{
unsigned char ch;
SCON = 0x50;

TMOD=0x20;
TH1 = 0xFD; TR1 = 1;
while(1)
{
while(RI==0);
ch=SBUF;
ACC=ch;
P1=ACC;
RI=0;
}
}






Please tell me how to simulate this program on keil?

its a program to serially recieve data and put on the recieved data on port
Wed Mar 25 2009, 07:29 pm
#2
read this file and exexute ur codes this will help u to learn the keil software and to see whther ur program has error or not
Attachment
Thu Mar 26 2009, 04:14 am
#3
to debug serial code:

first enter into debug mode go to Debug -> select first option (start/stop debug session)



now after you enter debug mode, select serial window to open virtual serial window where you can see your o/p.



Make sure keil is not that efficient for debugging serial code, sometimes it shows o/p even if serial port is configured wrong. but most of cases its fine checking your code.
Tags debugging in keiluart simulation in keil microvisionserial communication keil

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am