??? 04/27/06 23:51 Read: times |
#115141 - Maybe this will work Responding to: ???'s previous message |
$MOD750
$DEBUG $NOPAGING $PAGEWIDTH(132) ;====================================================================== ;Reset Code ;====================================================================== ORG 00H SJMP INITIAL ;====================================================================== ;Initialization Routine ;====================================================================== ORG 1BH INITIAL: SETB P0.0 ;turn ON red led CLR P0.0 ;turn OFF red led SETB P0.1 ;turn ON green led CLR P0.1 ;turn OFF green led ;====================================================================== ;Main Routine ;====================================================================== MAIN: MOV P1, #11111111B ;all p1 ports open MOV A, P1 ANL A, #00001111B ;selecting 4 ports CJNE A, #00H, MAIN1 ACALL LS04 ;selects chip pins to test SJMP QUIT MAIN1: CJNE A, #01H, MAIN2 ACALL LS08 ;selects chip pins to test SJMP QUIT MAIN2: CJNE A, #02H, MAIN3 ACALL LS00 ;selects chip pins to test SJMP QUIT MAIN3: CJNE A, #03H, QUIT ACALL LS32 ;selects chip pins to test SJMP QUIT QUIT: SJMP MAIN ;====================================================================== ;Pin-out checks ;====================================================================== LS04: MOV P3, #11111111B ;all p3 ports open MOV A, P3 CJNE A, #10101010B, REDLED LS04A: MOV P1, #11111111B MOV A, P1 CJNE A, #01011111B, REDLED JMP GOOD LS08: MOV P3, #11111111B MOV A, P1 CJNE A, #00001000B, REDLED LS08A: MOV P1, #11111111B MOV A, P1 CJNE A, #11111111B, REDLED JMP GOOD LS00: MOV P3, #11111111B MOV A, P1 CJNE A, #00101010B, REDLED LS00A: MOV P3, #11111111B MOV A, P1 CJNE A, #11011111B, REDLED JMP GOOD LS32: MOV P3, #11111111B MOV A, P1 CJNE A, #00001110B, REDLED LS32A: MOV P3, #11111111B MOV A, P1 CJNE A, #11111111B, REDLED JMP GOOD LS86: MOV P3, #11111111B MOV A, P1 CJNE A, #00001110B, REDLED LS86A: MOV P3, #11111111B MOV A, P1 CJNE A, #11011111B, REDLED JMP GOOD LS02: MOV P3, #11111111B MOV A, P1 CJNE A, #10000101B, REDLED LS02A: MOV P3, #11111111B MOV A, P1 CJNE A, #01101111B, REDLED JMP GOOD ;====================================================================== ;LEDs ;====================================================================== GOOD: SETB P0.1 ;Green On SJMP EXIT REDLED: SETB P0.0 ;Red On EXIT: CLR P0.1 ;Green Off CLR P0.0 ;Red Off JMP MAIN END |
Topic | Author | Date |
ASM Language | 01/01/70 00:00 | |
show us your thought | 01/01/70 00:00 | |
RE: | 01/01/70 00:00 | |
Software Design Description SDD | 01/01/70 00:00 | |
RTFM | 01/01/70 00:00 | |
Re: | 01/01/70 00:00 | |
Ok | 01/01/70 00:00 | |
Re: | 01/01/70 00:00 | |
two ways | 01/01/70 00:00 | |
RE; | 01/01/70 00:00 | |
Keypad - or DIP switch | 01/01/70 00:00 | |
BCD | 01/01/70 00:00 | |
no such thing | 01/01/70 00:00 | |
opps | 01/01/70 00:00 | |
Good for you | 01/01/70 00:00 | |
Well, Can I Do This! | 01/01/70 00:00 | |
Your program | 01/01/70 00:00 | |
without some selection | 01/01/70 00:00 | |
It is a start | 01/01/70 00:00 | |
Oh, hoiw often do we see someone believi | 01/01/70 00:00 | |
That or it is just Obvious to them | 01/01/70 00:00 | |
and why should they assume it is to us | 01/01/70 00:00 | |
SMS ? | 01/01/70 00:00 | |
well - careful - yes, definitely with as | 01/01/70 00:00 | |
Circuit Cellar Built one about 1986 | 01/01/70 00:00 | |
Maybe this will work | 01/01/70 00:00 | |
Why guessing? | 01/01/70 00:00 | |
also...stuck at 1 and stuck at 0 faults | 01/01/70 00:00 | |
RE: | 01/01/70 00:00 | |
Take it literally | 01/01/70 00:00 | |
RE:RE:![]() | 01/01/70 00:00 |