Hi, I’m using a PIC (16F628A) with UART module which communicates with the Xbee-pro (802.15.4-Version 10CD) module (mode API enabled).
SETTINGS MODULE XBEE-PRO
Radio 1 (NI=BASE) Radio 2 (NI=REMOTE)
AP = 1 AP = 0
DL = 5001 DL = 5000
MY = 5000 MY = 5001
- other settings default
ASSEMBLE PACKET
7E 00 0A 01 01 50 01 00 48 65 6C 6C 6F B8
CODE ASSEMBLER (routine transmission)
SEND
MOVLW 0x7E
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x0
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x0A
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x01
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x01
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x50
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x01
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x0
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x48
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x65
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x6C
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x6C
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0x6F
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
MOVLW 0xB8
MOVWF TXREG
MOVLW .2
CALL DELAY_MS ; ROTINA PARA 2MS
RETURN
PACKET RECEIVED BY ANOTHER MODULE XBEE-PRO (NI=BASE)
Connected to serial and read with the program X-CTU terminal.
7E 00 13 81 50 01 33 00 7E FE 3F FE FE EF FE FE DB F6 B6 B6 6F EE BE
I think this is the correct package:
7E 00 0A 81 50 01 24 00 48 65 6C 6C 6F 15
Data ASCii: “Hello”
I looked for it at forum but I have no idea about what is the problem. ¿Any idea?
What is wrong? Somebody help me?
Thanks very much!