be80be
Well-Known Member
Software Usart and 12f508 I was bored and been reading about backdoors. To send data out serial just using simple delays and software Usart. So i wiped this up.
It works and only using 65 of 512 program memory and 3 of 25 data.
You could use it dump some values
It works and only using 65 of 512 program memory and 3 of 25 data.
You could use it dump some values
Code:
;**********************************************************************
; *
; Filename: serial.asm *
; Date: *
; File Version: *
; *
; Author: Burt E Ratliff *
; Company: *
; *
; *
;**********************************************************************
; *
; Files Required: P12F508.INC *
; *
;**********************************************************************
; *
; Notes: *
; *
;**********************************************************************
list p=12F508 ; list directive to define processor
#include <p12F508.inc> ; processor specific variable definitions
__CONFIG _MCLRE_OFF & _CP_OFF & _WDT_OFF & _IntRC_OSC
; pin assignments
#define RX GPIO,0 ; receive pin on GP0
#define TX GPIO,1 ; transmit pin on GP1
;***** VARIABLE DEFINITIONS
UDATA
buffer res 1
counter res 1
Count res 1
;**********************************************************************
; Internal RC calibration value is placed at location 0x1FF by Microchip
; as a movlw k, where the k is a literal value.
RESET CODE 0x000 ; effective reset vector
movwf OSCCAL ; update OSCCAL with factory cal value
goto init ; jump to main program
init
movlw b'00000001' ; set I/O
tris GPIO
bsf TX
movlw 'b' ; sets text to loads buffer with
call start
movlw 'e'
call start
movlw '8'
call start
movlw '0'
call start
movlw 'b'
call start
movlw 'e'
call start
movlw ' '
call start
movlw 'w'
call start
movlw 'a'
call start
movlw 's'
call start
movlw ' '
call start
movlw 'h'
call start
movlw 'e'
call start
movlw 'r'
call start
movlw 'e'
call start
movlw 0x0A
call start
movlw 0x0D
call start
goto init ;loop for ever
start
movwf buffer
movlw 0x08
movwf counter ; counts the 8 bits
bcf TX ; set TX low
call BItdelay ; delay to get a 9600 bit rate
TXLoop
rrf buffer ,f ;send one bit
btfss STATUS ,C ;
bcf TX ;
btfsc STATUS ,C ;
bsf TX ;
call BItdelay ;
decfsz counter,f ;test if all done
goto TXLoop ;
bsf TX ;
call BItdelay ;
return
BItdelay ; timing delay
movlw 0x18
movwf Count
Wait
nop
decfsz Count ,f
goto Wait
return
END ; directive 'end of program'