Came across this code which uses a 16F628A @4Mhz, might be a bit simpler to follow as it seems to overlay a set message rather than have the option to type something on a PC which is then sent to the PIC and overlaid on the TV

Code:
'OSDCSX.bas version 2.0
'Incruser with STV5730A and PIC 16F628 - 4 MHz
'Source for PICBasic PRO 
'Risto Kõiva 2001, F1FCO & F6CSX, March 2003
'Turns on F1UBZ insert (part RS232 / MAX232 useless) or demo board STV5730 
'Page mode, color bars
Cyclic change of background color
23cm or 70cm band display according to pin 18 status (RA1)


'** HARDWARE DEFINITION **

	CMCON = 7 'put the 16F628 in digital mode on PORT A


	Clk VAR PORTB.5
	Sda VAR PORTB.6
	Csn VAR PORTB.4
	Mute VAR PORTB.7 '0 if sync valid, 1 if no sync
	VAR mode PORTB.3 'pin # 9, 0 = Page mode, 1 = Mixed mode
	On_off VAR PORTA.2 'Stop the incruser: pin # 1, 0 = off, 1 = on	
	Band VAR PORTA.1 'incrustation 23 cm if 0 or 70 cm if 1
	
INPUT Mode
INPUT Mute
INPUT On_off
INPUT Band

OUTPUT Clk
OUTPUT Sda
OUTPUT Csn

** DEFINITION OF VARIABLES **
	
	ICount VAR BYTE
	Bit_Counter VAR BYTE
	WData VAR WORD
	C VAR WORD
	B1 VAR BYTE
	B2 VAR BIT
	B3 VAR BIT
	B4 VAR BIT
	
	W1 VAR BYTE
	W2 VAR BYTE
	
	'** START OF PROGRAM **
	
	GOSUB Init 'initialization
	GOSUB Mode_mixte 'Mixed mode by default
	GOSUB affiche_mixte 
	b1 = 1
	b2 = 1
	b3 = 0	
	
Loop:	

	B1 = On_off
	IF b1 = 0 THEN Incrust_off 'monitors the On_off button
	B4 = Band
	IF b4 = 0 THEN
		W1 = $ 02
		W2 = $ 03
		ELSE
		W1 = $ 07
		W2 = $ 00
	ENDIF
		
	B3 = MODE 'reads MODE	
	IF b3 = b2 THEN Jump 'does not change anything
		
	IF b3 = 1 THEN 'If MODE = 1: Mixed Mode, Picture Overlay
		
		GOSUB Mode_mixte
		GOSUB affiche_mixte 		
		B2 = b3
		ELSE 
		GOSUB Mode_page 'Mode Page: Mire		
		FOR c = 0 TO 6
		WData = $ 00CD: GOSUB Send '(tip at address 13)
		WData = $ 1000 + ($ 201 * c): GOSUB Send 'background color change 
		GOSUB show_page
		PAUSE 2000
		NEXT c
		B3 = Mode 'reads mode
		B2 = ~ b3 'b2 is not equal to b3, we do not jump and we start again
	ENDIF 
		
	PAUSE 500
	GOTO Buckle		

Jumped up:
	PAUSE 200
	GOTO Buckle


	END
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
Incrust_off: 'No overlay. We go into mixed mode and we delete the screen

		GOSUB Mode_mixte
		PAUSE 100
		b1 = 1
		B3 = Mode 'reads mode
		B2 = ~ b3 'b2 is not equal to b3, we do not jump
		GOTO Buckle
			
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------	
Delete_Screen: 'No Overlay
	
    WData = 0: GOSUB Send 'tip top left of screen (0,0)
    c = 1
    FOR c = 1 TO 308 'on clears the screen with spaces (0B)
	WData = $ 1700 + $ 0B: GOSUB Send '$ 1700: background disabled, white character not blinking
    NEXT c
    RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------    
Display_mixte: 'display in overlay mode
  
    WData = 0: GOSUB Send 'do not omit this line: position 0,0
    WData = $ 1780 + $ 6E: GOSUB Send 'flashing parable
    WData = $ 170B: GOSUB Send 'space
    WData = $ 1700 + $ 11: GOSUB Send 'F
    WData = $ 1700 + $ 06: GOSUB Send '6	
    WData = $ 1700 + $ 0E: GOSUB Send 'C	
    WData = $ 1700 + $ 1E: GOSUB Send 'S
    WData = $ 1700 + $ 23: GOSUB Send 'X

     WData = $ 170B: GOSUB Send 'space
     WData = $ 170B: GOSUB Send 'space
     WData = $ 170B: GOSUB Send 'space
          
    WData = $ 1700 + $ 18: GOSUB Send 'M   
    WData = $ 1700 + $ 0C: GOSUB Send 'A
    WData = $ 1700 + $ 1D: GOSUB Send 'R
    WData = $ 1700 + $ 1E: GOSUB Send 'S
    WData = $ 1700 + $ 10: GOSUB Send 'E 
    WData = $ 1700 + $ 14: GOSUB Send 'I
    WData = $ 1700 + $ 17: GOSUB Send 'L	
    WData = $ 1700 + $ 17: GOSUB Send 'L
    WData = $ 1700 + $ 10: GOSUB Send 'E	
    
     WData = $ 170B: GOSUB Send 'space
     WData = $ 170B: GOSUB Send 'space
     WData = $ 170B: GOSUB Send 'space    
    
    WData = $ 1700 + $ 15: GOSUB Send 'J   
    WData = $ 1700 + $ 19: GOSUB Send 'N
    WData = $ 1700 + $ 02: GOSUB Send '2
    WData = $ 1700 + $ 03: GOSUB Send '3
    WData = $ 1700 + $ 1D: GOSUB Send 'R 
    WData = $ 1700 + $ 13: GOSUB Send 'H
  		
	PAUSE 1000	 
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
Display_page: 'display in page mode

'First line in Max Zoom
  
    WData = 0: GOSUB Send 'do not omit this line: position 0,0 Line 0
    WData = $ 1F0B: GOSUB Send 'space
    WData = $ 1F00 + $ 11: GOSUB Send 'F with blue background
    WData = $ 1F00 + $ 06: GOSUB Send '6	
    WData = $ 1F00 + $ 0E: GOSUB Send 'C	
    WData = $ 1F00 + $ 1E: GOSUB Send 's
    WData = $ 1F00 + $ 23: GOSUB Send 'X


    WData = $ 100: GOSUB Send 'line 1
    WData = $ 170B: GOSUB Send 'space
    WData = $ 170B: GOSUB Send 'space
    WData = $ 1700 + $ 1A: GOSUB Send 'O with black background
    WData = $ 1700 + $ 39: GOSUB Send 'p
    WData = $ 1700 + $ 26: GOSUB Send ':
    WData = $ 1700 + $ 15: GOSUB Send 'J
    WData = $ 1700 + $ 1A: GOSUB Send 'O
    WData = $ 1700 + $ 10: GOSUB Send 'E
    WData = $ 1700 + $ 17: GOSUB Send 'L
     WData = $ 170B: GOSUB Send 'space
    WData = $ 170B: GOSUB Send 'space
    WData = $ 170B: GOSUB Send 'space
    WData = $ 170B: GOSUB Send 'space
     
    WData = $ 1700 + $ 1C: GOSUB Send 'Q
    WData = $ 1700 + $ 1F: GOSUB Send 'T
    WData = $ 1700 + $ 13: GOSUB Send 'H   
    WData = $ 1700 + $ 26: GOSUB Send ':    
    WData = $ 1700 + $ 18: GOSUB Send 'M   
    WData = $ 1700 + $ 0C: GOSUB Send 'A
    WData = $ 1700 + $ 1D: GOSUB Send 'R
    WData = $ 1700 + $ 1E: GOSUB Send 'S
    WData = $ 1700 + $ 10: GOSUB Send 'E 
    WData = $ 1700 + $ 14: GOSUB Send 'I
    WData = $ 1700 + $ 17: GOSUB Send 'L	
    WData = $ 1700 + $ 17: GOSUB Send 'L
    WData = $ 1700 + $ 10: GOSUB Send 'E
 
    WData = $ 200: GOSUB Send 'line 2 
    WData = $ 1700 + $ 1E: GOSUB Send 'S
    WData = $ 1700 + $ 1A: GOSUB Send 'O 
    WData = $ 1700 + $ 19: GOSUB Send 'N    
    WData = $ 1700 + $ 26: GOSUB Send ': 
    WData = $ 1700 + $ 01: GOSUB Send '1
    WData = $ 1700 + $ 04: GOSUB Send '4    
    WData = $ 1700 + $ 05: GOSUB Send '5
    WData = $ 1700 + $ 27: GOSUB Send '. 
    WData = $ 1700 + $ 02: GOSUB Send '2
    WData = $ 1700 + $ 02: GOSUB Send '2    
    WData = $ 1700 + $ 05: GOSUB Send '5
    WData = $ 1700 + $ 18: GOSUB Send 'M 
    WData = $ 1700 + $ 13: GOSUB Send 'H    
    WData = $ 1700 + $ 43: GOSUB Send 'z
    WData = $ 170B: GOSUB Send 'space    
    WData = $ 1700 + $ 38: GOSUB Send 'o
    WData = $ 1700 + $ 3E: GOSUB Send 'u      
    WData = $ 170B: GOSUB Send 'space
    WData = $ 1700 + $ 01: GOSUB Send '1
    WData = $ 1700 + $ 04: GOSUB Send '4    
    WData = $ 1700 + $ 05: GOSUB Send '5    
    WData = $ 1700 + $ 27: GOSUB Send '. 
    WData = $ 1700 + $ 04: GOSUB Send '4   
    WData = $ 1700 + $ 00: GOSUB Send '0     
    WData = $ 1700 + $ 00: GOSUB Send '0
    WData = $ 1700 + $ 18: GOSUB Send 'M 
    WData = $ 1700 + $ 13: GOSUB Send 'H    
    WData = $ 1700 + $ 43: GOSUB Send 'z    
       
                                         
 'Color bars, 4 lines  
   
 FOR iCount = $ 0 TO $ 3
    WData = $ 300 + $ 100 * iCount: GOSUB Send 'to the beginning of line 3
    
    	
    WData = $ 170B: GOSUB Send 'space
    WData = $ 170B: GOSUB Send 'space
    
    WData = $ 1877: GOSUB Send 'black
    WData = $ 1877: GOSUB Send
    WData = $ 1877: GOSUB Send

    WData = $ 1977: GOSUB Send
    WData = $ 1977: GOSUB Send
    WData = $ 1977: GOSUB Send

    WData = $ 1A77: GOSUB Send
    WData = $ 1A77: GOSUB Send
    WData = $ 1A77: GOSUB Send

    WData = $ 1B77: GOSUB Send
    WData = $ 1B77: GOSUB Send
    WData = $ 1B77: GOSUB Send

    WData = $ 1C77: GOSUB Send
    WData = $ 1C77: GOSUB Send
    WData = $ 1C77: GOSUB Send

    WData = $ 1D77: GOSUB Send
    WData = $ 1D77: GOSUB Send
    WData = $ 1D77: GOSUB Send    

    WData = $ 1E77: GOSUB Send
    WData = $ 1E77: GOSUB Send
    WData = $ 1E77: GOSUB Send    

    WData = $ 1F77: GOSUB Send
    WData = $ 1F77: GOSUB Send
    WData = $ 1F77: GOSUB Send 'white
     NEXT iCount  

	
	WData = $ 700: GOSUB Send
	FOR iCount = $ 1 TO $ 8
	 WData = $ 170B: GOSUB Send 'space
	 NEXT iCount 
	WData = $ 1700 + $ 5F: GOSUB Send '*
	WData = $ 1700 + $ 5F: GOSUB Send '*
	WData = $ 1700 + $ 5F: GOSUB Send '*
	WData = $ 170B: GOSUB Send 'space
	WData = $ 1780 + W1: GOSUB Send '2 or 7
   	WData = $ 1780 + W2: GOSUB Send '3 or 0
   	WData = $ 1780 + $ 2C: GOSUB Send 'c
   	WData = $ 1780 + $ 36: GOSUB Send 'm
   	WData = $ 170B: GOSUB Send 'space
   	WData = $ 1700 + $ 5F: GOSUB Send '*
	WData = $ 1700 + $ 5F: GOSUB Send '*
	WData = $ 1700 + $ 5F: GOSUB Send '*
   	
   
   PAUSE 1000	
	
	RETURN

'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
WasteTime: 'timer 2 clock cycles 
	ASM
	  nop
	  nop
	ENDASM
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
StartCommunication: Start of transmission Fig 2 page 12 manual STV5730A
	HIGH Clk: GOSUB WasteTime 'Clock to 1
	LOW Csn: GOSUB WasteTime 'Chip select to 0
	LOW Clk: GOSUB WasteTime 'Clock at 0
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
StopCommunication: 'end of transmission 
	HIGH Clk: GOSUB WasteTime 'Clock to 1
	HIGH Csn: GOSUB WasteTime 'Chip select to 1
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
SendOne: Send a bit 0
	HIGH Sda: GOSUB WasteTime
	LOW Clk: GOSUB WasteTime
	HIGH Clk: GOSUB WasteTime
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
SendZero: sending a bit 1
	LOW Sda: GOSUB WasteTime
	LOW Clk: GOSUB WasteTime
	HIGH Clk: GOSUB WasteTime
	HIGH Sda: GOSUB WasteTime
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
OutByte: 'send a 16 bit word
	FOR Bit_Counter = 1 TO 16
	 IF wData.15 = 1 THEN 'MSB first
	  GOSUB SendOne
	 ELSE
	  GOSUB SendZero
	 ENDIF
	 WData = wData << 1
	NEXT Bit_Counter
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
Send:
	GOSUB StartCommunication
	GOSUB OutByte
	GOSUB StopCommunication
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
Init: '** INITIALIZATION (see page 12 of the DATA SHEET STV5730)

	HIGH Clk: HIGH Sda: HIGH Csn
	WData = $ 3000: GOSUB Send 'Init STV5730
	WData = $ 3000: GOSUB Send
	WData = $ 00DB: GOSUB Send
	WData = $ 1000: GOSUB Send
	RETURN
'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------	
Mode_page: 'PAGE MODE INITIALIZATION

	WData = $ 00CC: GOSUB Send 'Registry initialization (tip at address 12)
	WData = $ 150F: GOSUB Send 'Zoom 
	WData = $ 1201: GOSUB Send 'Color 
	WData = $ 1FC5: GOSUB Send 'Control
	WData = $ 15A1: GOSUB Send 'Position (horizontal 33, Vertical 22)
	WData = $ 193E: GOSUB Send 'Fashion 

	WData = $ 00C0: GOSUB Send 'Set row attributes (tip to first line address)
	 WData = $ 10C4: GOSUB Send '(vertical position = 4, characters with border, characters displayed, horizontal position = 0)
	  WData = $ 10C4: GOSUB Send '(vertical position = 4, characters with border, characters displayed, horizontal position = 0)
	 WData = $ 10C4: GOSUB Send '(vertical position = 4, characters with border, characters displayed, horizontal position = 0)
	WData = $ 10C8: GOSUB Send
	FOR iCount = 0 TO 2	
	 WData = $ 10C0: GOSUB Send '(vertical position = 0, characters with border, characters displayed, horizontal position = 0)
	NEXT iCount 'Same for the next 10 lines
	 WData = $ 10C8
	 
	 GOSUB Clear_screen
	RETURN

'------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------
Mode_mixte: 'INITIALIZATION IN JOINT MODE

	WData = $ 00CC: GOSUB Send 'Registry initialization (tip at address 12)
	WData = $ 1000: GOSUB Send 'Zoom (1pixel / dot - 1 pixel / line)
	WData = $ 1204: GOSUB Send 'Color (red background, line, character background)
	WData = $ 1FD4: GOSUB Send 'Control (mixed mode, character background controlled by BE, display on, color character by character attribute
				0.5s flashing, duty cycle 0.5, STV sync, PAL, external luminance level, normal full page mode 
	WData = $ 15A1: GOSUB Send 'Position (horizontal 33, Vertical 22)
	WData = $ 183E: GOSUB Send 'Mode (disconnected BAR, synch pulse detection, internal mute, 32-line mute time, re-inserted sync, 6dB video gain
				Color coder in use, video out2 = video in, video out2 low impedance, normal mode, no delay compensation,
				'M sync with vertical sync

	WData = $ 00C0: GOSUB Send 'Set row attributes (tip to first line address)
	FOR iCount = 0 TO 10	
	 WData = $ 10C4: GOSUB Send '(vertical position = 4, characters with border, characters displayed, horizontal position = 0)
	NEXT iCount 'Same for the following lines
	GOSUB Clear_screen
	RETURN
The code appears to be set to PAL timing so that would need to be adjusted for NTSC, plus, given the age of the chip I'm betting the output will be in 4:3 ratio PAL standard - so on modern TV's the overlay will have two bars either side of the screen.