Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/21/04 12:53
Read: times


 
#81610 - I am facing Nearly Similar Problem
Responding to: ???'s previous message
Hi Shehzad & All,

I have checked your code, by debugging in Keil as well as by simulating in Pinnacle, both are working well. They are not behaving like the one you are messed up. But i don't know whether it works same on the actual system the reason is :

Since one week, i am messed up in a problem, that is related to the pin output. One of the I/O pin of my project, sometimes misbehaves. Atcually it is a big system (atleast for me), comprising of more than 2000 lines of code. I needed to communicate the similar 7 systems. Communication just comprises of Busy/Strobe Signals. I used the following code:

One system:
===========
sbit Busy = P2^0; //Input
sbit Strobe = P2^1; //Output

Strobe = 0; //Initialized in start

while(Busy);
Strobe = 1;
_nop_(); //just to time it equally
_nop_();
Strobe = 0;

The Other one:
==============
sbit BusyA = P1^5; //Output
sbit StrobeA = P1^6; //Input

BusyA = 1;

Busy = 0; //not busy now
while(!Strobe); //untill strobe is not received
//Just two cycles of code here
Busy = 1; //busy now

Remember Busy pins are connected, and strobe pins are connected too.

In actual, all 7 seven systems need to perform some tasks at the same time even in microseconds.

When i applied this code on two, it worked fine, on three systems it worked fine, but when on the fourth, it gets halted.
When it gets halted, the status of the last system shows that, Busy pin is low, and strobe is also low(or floating, shows 0 volts). so it may be halted in the following loop:

Busy = 0; //not busy now
while(!Strobe); //untill strobe is not received

By giving 5 volts manually on the Strobe pin, it goes on, if we stop doing so, it halts again. I reached on the fact that, the other system doesn't give the strobe at that moment.

Also all the system have to go through this Busy/Strobe cycle thousands of time during execution.

All systems are working fine if they run standalone mode.

I was anxiously waiting for the solution of problem presented by Mr. Shehzad Aslam, that may i too facing the same problem, or any bit of change in my code makes it to work.

To Shehzad Only:

Shehzad, you live near to me, if i may have direct contact to you, means, telephonic, it may work fine for both of us.

Thanks to all for being so informative.

Regards,
Farrukh Lodhi.

List of 19 messages in thread
TopicAuthorDate
Strange problem with KEIL C++ and 8052            01/01/70 00:00      
   Wait a minute...            01/01/70 00:00      
   Your code            01/01/70 00:00      
   RE: Strange problem with KEIL C++ and 8052            01/01/70 00:00      
      RE: Strange problem with KEIL C++ and 8052            01/01/70 00:00      
         RE: Strange problem with KEIL C++ and 8052            01/01/70 00:00      
            poor practice            01/01/70 00:00      
   andy + gopalakrishn + program with <pre>            01/01/70 00:00      
      RE: andy + gopalakrishn + program with <pre>            01/01/70 00:00      
         RE: andy + gopalakrishn + program with <pre>            01/01/70 00:00      
   RE: Strange problem with KEIL C++ and 8052            01/01/70 00:00      
   KEIL Debugger            01/01/70 00:00      
      RE: KEIL Debugger            01/01/70 00:00      
      RE: KEIL Debugger            01/01/70 00:00      
   try this on your keil            01/01/70 00:00      
   Keil Debugger screen shoots            01/01/70 00:00      
      Shazad            01/01/70 00:00      
      RE: Keil Debugger screen shoots            01/01/70 00:00      
   I am facing Nearly Similar Problem            01/01/70 00:00      

Back to Subject List