Loop
movlw 0xAA ;set packet address byte to 0xAA
movwf mtx_buffer
;----------------------------------------------
Send_string
CLRF Index
movlw 0x40 ;64 bits to send
movwf Times ;64 items to read from the data table.
Send_string1
Movf Index ,w ;Location of where to read data table
Call Data_Table
addlw 0x30 ; Add 30 to convert to Ascii
movwf mtx_buffer1
call mtx_send
call Delay20
INCF INDEX, F ;Next bit to read
decfsz Times, F ;After displaying 64 bits (0x40), exit.
Goto Send_string1
stop goto stop ;Loop here forever.
;--------------------------------------------------------------------
Data_Table
ADDWF PCL, f
DT 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 ;<- Header (9)
DT 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01 ;<- Manufacturer ID (10)
DT 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01 ;<- Serial number (20)
DT 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01
DT 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01 ;<- Serial number (20)
DT 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01
DT 0x01,0x01,0x01,0x01,0x00 ;<- parity column and stop bit (5)
; 64 bits in total (0x40)
;--------------------------------------------------------------------
;Manchester subroutines