| ??? 06/22/02 07:52 Read: times |
#24757 - RE: LED+Switch trouble |
hi;
$mod51 org 00H jmp start org 40H start: CLR A CLR P2.6 SETB P2.0 restart: CPL P2.0 Loop: ;.you are writing into p2.should use mov a,p2 ;better is use of bit instructions jb/jnb p2.x mov P2, A ;20 h is uninitailized so can give you anything and branching is uncertain. ORL A, 20h JZ restart jmp loop end also switch contact can give jitters.sample switch atleast twice before deciding its state.the delay between samples could be of the order of 10-20 ms.otherwise led transitions will be fast and may not settle to correct value. regards pranav |
| Topic | Author | Date |
| LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble | 01/01/70 00:00 | |
| RE: LED+Switch trouble - thanks rob! | 01/01/70 00:00 | |
RE: LED+Switch trouble - thanks rob! | 01/01/70 00:00 |



