| ??? 12/02/04 08:02 Read: times |
#82355 - please post the actual code Responding to: ???'s previous message |
hi,
void main()
{
int i = 0;
P0 = 0x00;
P1 = 0x00;
P2 = 0x00;
P3 = 0x00;
for(i = 0; i < 200; i++){
P2_6 = 0x80;
nothing();
P2_6 = 0x00;
nothing();
}
So the LED connected to P2_6 blinks for the given count, but after sometime it continues to glow and no other LED Glows as per the code.Could I ask how are LEDs connected to the Port2? Are they connected via resistor to GND or to Vcc? - If they are connected to Vcc then all LEDs must light on due P2 = 0x00; - If they are connected to GND (that`s bad design) and as you said "after sometime P2_6 continues to glow" then it means your program does not leave the first loop and just hang ups. Otherwise this LED must light off due P2_6 = 0x00; So I ask you to put real code (do copy-paste) and explain hardware design as well. Thanks, Oleg |
| Topic | Author | Date |
| Loop Problem | 01/01/70 00:00 | |
| Change | 01/01/70 00:00 | |
| loop Problem | 01/01/70 00:00 | |
| Sorry!!! It is P2_6 = 1 and P2_6 = 0 | 01/01/70 00:00 | |
| How to post code | 01/01/70 00:00 | |
| please post the actual code | 01/01/70 00:00 | |
| " | 01/01/70 00:00 | |
| Missing Subject..... | 01/01/70 00:00 | |
| Brief, not missing? | 01/01/70 00:00 | |
| missing subject | 01/01/70 00:00 | |
| Lost Posting? | 01/01/70 00:00 | |
| Text in the post | 01/01/70 00:00 | |
| yes | 01/01/70 00:00 | |
Message replies in subject | 01/01/70 00:00 | |
| ditto | 01/01/70 00:00 |



