We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hai, Iam new to Embedded systems.iam using at89c4051 i have a problem. Problem: P3.3 is connected to a bulb.
and my program is sbit sw1 P3^3 void main() { P3=0xff; for(i=0;i<10000;i++); SW1=0; while(1); } output; Bulb conneted to p3.3, turned on this program is working fine.
but when the same main()
void main() { int flag; P3=0xff; for(i=0;i<10000;i++);
flag=strcmp("INFOLINE","INFOLINE");
if(flag==0) sw1=0;
while(1); } when is dumped, its not working, iam unable to understand, why this is not working.
please assist me in solving this.
Cordially, Kiran Kumar D
You haven't posted complete source!
You seem to have hand-written the source, so we can't trust that what we read is what you try to run.
You haven't specified in what way your second program fails.
How can the symbol SW1 suddenly become sw1? C is case-sensitive.
See: www.danlhenry.com/.../keil_code.png
Use copy-and-paste - don't manually re-type.
Use spaces, not TABs.
Confirm in the 'Preview' that it looks right - do not press 'Post' until it is!