We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hello guys, i have this code at the end of the post, which control 8 devices over bluetooth. im trying to figure out what command that i can send over hyperterminal to activate a port or a pin. to my understanding if i want to set pin1.0 i should send 'A'>0AH>31H is that correct?
any kind of help is really appreciated. here's a portion of the code
LOAD1 EQU P1.0 LOAD2 EQU P1.1 LOAD3 EQU P1.2 LOAD4 EQU P1.3 LOAD5 EQU P1.4 LOAD6 EQU P1.5 LOAD7 EQU P1.6 LOAD8 EQU P1.7 DSEG ; This is internal data memory ORG 20H ; Bit adressable memory MOBILE: DS 3 COUNTER: DS 1 CSEG ; Code begins here ; ---------==========----------==========---------=========--------- ; Main routine. Program execution starts here. ; ---------==========----------==========---------=========--------- ORG 00H ; Reset AJMP MAIN ORG 0023H AJMP SERIAL ; ---------==========----------==========---------=========--------- MAIN: MOV SP,#40H MOV TMOD,#20H ;initilize serial port MOV TH1,#0FDH ;Slect 9600 baud rate MOV SCON,#50H MOV A,PCON SETB ACC.7 MOV PCON,A MOV IE,#10010000B SETB TR1 ;start timer MOV COUNTER,#00H MOV P1,#00H AJMP $ ;************************************************************************** SERIAL: JB TI,TRAS1 MOV A,SBUF CJNE A,#'A',DOWNW MOV COUNTER,#00H AJMP DOWN1 TRAS1: AJMP TRAS DOWNW:CJNE A,#0AH,DOWNW1 CALL DEVICE_DECODE AJMP DOWN1 DOWNW1:MOV A,COUNTER CJNE A,#01H,SD1 MOV MOBILE,SBUF AJMP DOWN1 SD1: CJNE A,#02H,DOWN1 MOV MOBILE+1,SBUF DOWN1:INC COUNTER CLR RI RETI TRAS: CLR TI RETI ;************************************************************************** DEVICE_DECODE: MOV A,MOBILE ;LOAD 1 CJNE A,#31H,SDF1 MOV A,MOBILE+1 CJNE A,#31H,SDF2 SETB LOAD1 AJMP SDF1 SDF2: CJNE A,#32H,SDF1 CLR LOAD1 SDF1: