Problem with an AT89S2051
Discussion in "8051 Discussion Forum" started by StrangerDanger Mar 24, 2015.
Tue Mar 24 2015, 06:24 pm
Hello all.
I am working with a dual AT89S2051 setup. The design I am reverse engineering and duplicating uses two of these mcu's in separate devices to asynchronously transfer data between them in order to control LED's and other external devices (some are event based of course). It turns out this was the easy part. The hard part has been duplicating the time delay event when pressing the button (ground apply) attached directly to P3.3. The program then needs to check P3.3 again after 3 seconds to ensure a low state still exists before executing a Uart1Write command. The problem is that P3.3 latches low and never returns to a high state, even if I incorporate a command to do so later in the program. This causes the event to be a one shot deal...which is not good. I feel like I am missing something simple but after an entire work day of trying to find the answer myself in the datasheet...internet, it still eludes me. Anyone run into this problem before?
I am working with a dual AT89S2051 setup. The design I am reverse engineering and duplicating uses two of these mcu's in separate devices to asynchronously transfer data between them in order to control LED's and other external devices (some are event based of course). It turns out this was the easy part. The hard part has been duplicating the time delay event when pressing the button (ground apply) attached directly to P3.3. The program then needs to check P3.3 again after 3 seconds to ensure a low state still exists before executing a Uart1Write command. The problem is that P3.3 latches low and never returns to a high state, even if I incorporate a command to do so later in the program. This causes the event to be a one shot deal...which is not good. I feel like I am missing something simple but after an entire work day of trying to find the answer myself in the datasheet...internet, it still eludes me. Anyone run into this problem before?
Tue Mar 24 2015, 10:03 pm
Pin 3.3 is not supposed to latch low.
If it is not faulty, the problem must be your software.
You will have to post your code, including any interrupt handler.
Is the Pin 3.3 interrupt enabled ?
If it is not faulty, the problem must be your software.
You will have to post your code, including any interrupt handler.
Is the Pin 3.3 interrupt enabled ?
Mon Mar 30 2015, 12:37 am
It may be possible that interrupt pin may be used in a dual mode after interrupt is detected it is used as a normal GPIO? Just a thought.
Powered by e107 Forum System