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

KinogoWek
Wed Nov 13 2024, 06:59 am
NickCapse
Wed Nov 13 2024, 04:19 am
Entaile
Wed Nov 13 2024, 03:49 am
Kevinlix
Wed Nov 13 2024, 01:04 am
Jeffreywes
Tue Nov 12 2024, 10:28 pm
Jerrynug
Tue Nov 12 2024, 10:17 am
Georgemox
Mon Nov 11 2024, 11:44 pm
Marcusedine
Mon Nov 11 2024, 09:35 am