Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/09/01 04:27
Read: times


 
#7997 - [ACCESSING TABLES]
Hi everyone. I have difficulty accessing my table in the code below. The problem with this code is that 'BTRST' has a value of greater than 8-bit. Thus, it cannot be loaded into R1.

Is there a way to overcome this problem? Or is there a better way to access tables?

Thanks in advance.

;---------------------------------------; Send Bluetooth Reset Command
;--------------------------------------- MOV R0,#04H
MOV R1,#BTRST
ACALL SEND

;---------------------------------------; Subroutine SEND : Send a packet of bytes to serial port
; INPUT - R0 = Number of bytes to send
; R1 = Starting address of the send string
;---------------------------------------SEND:
MOV A,R1
SUBB A,#SENDWAIT
ADD A,R0
MOVC A,@A+PC
SENDWAIT:
JNB TI, SENDWAIT
CLR TI
MOV SBUF, A
DJNZ R0,SEND
RET

BTRST: DB 00H,00H,0CH,03H,01H ;Control Codes for Bluetooth Reset
END






List of 5 messages in thread
TopicAuthorDate
[ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      

Back to Subject List