Interface to SHARP-PC1403H
===============================

(c) 1996 by Alex Raimond <araimondi@gmx.net>


Comments to the files in the directory
-----------------------------------------

- SHARP.GIF: The Layout

   - All resitors are SMD
   - IC1 and IC2: CMOS-Inverter 4069 (page 887 in Conrad (a german electronic Retailer (www.conrad.de)) Part.Nr. 14 34 80-66)
   - L1: connector ( page 1013. Part.Nr. 74 40 18-66)
   - S1: SMD-Switch to select between external Power supply (Battery) and internal (from SHARP) (Page 879. 
	 Part.Nr. 70 47 17-66)

   Se also SHARP.BLD

- SHARP.BLD: PCB-Layout made in Geddy-CAD (*).
  You can get Geddy-CAD from http://ourworld.compuserve.com/homepages/IngWMaier/GEDDWNLD.htm, but the program's 
  language is german.

- SMDSO8.BLD / SMD0805.BLD: Two Macros, needed by Gaddy-CAD. Have to be in Gaddy-CAD macros-directory
 
- SharpPCB.GIF/SharpPCB.PCX/SharpPCB.DXF: The same then SHARP.BLD but other, more commen formats

The best result (the one I got) you get if you thake the PCB-Layout directly from Gaddy-CAD. The dimensions of 
my board is 2,6 x 3 cm (= 1,02 x 1.18 inch). Just to find the right scale


Directory TVSHARP

- TVSHARP.EXE: A Terminal-Program. (DOS-Program)

- kommprg.sbs: The installation-program to put the communication-procedure into the sharp
  This prog. is writting some assembler-code into the sharp's memory

  !!!! Attention: It installs the communication-procedure at Address 32820, 
  where normaly the Basic-Program is located.

  To use my Interface you first have to put to communication-procedure into the sharp.
  In order to do that you have to move the Basic-Program closer to the end of the memory.
  The communication-procedure is using about 210 Bytes. If you want to save memory you have
  to count it out exactly.

  [ POKE Adr, Data1, Data2, .....  stores Data1 at Adr + 0, Data2 at Adr + 1 and so on.
    PEEK Adr returns the value stored at Adr]

  There is a pointer to the beginning of the basic-memory at memory-address 65281.
  It's size is one word (2 bytes). The value at 65281 is the lo-Byte and the following the hi-byte.

  So 256 * PEEK 65282 + PEEK 65281 normaly returns 32816.

  PEEK 32816 returns 255 indicating the beginning of your basic-program

  Located at address 65285/86 is a pointer to the end of your basic-program. It's pointing to a value of
  255, indicating the end of basic-memory.


  Now you have to move the beginning of the basic-memory about 220 bytes up to higher address'	
  Do the following:

  Case I - No basic-program in memory. Simplest case
  1. Write the new begin-address in the the corresponding pointer:
     e.g.: 32820 + 220 = 33040; 33040 / 256 = 129 remain 16.
     - POKE 65281, 16, 129.
     - NEW
   2. Type in the communication-procedure.
      Take care to write exactly the same. espacialy the DATA-lines!!
 	
   Case II - Basic-programm in memory. (Your first linenumber may be 100)
   1. To get some free space put in some dummy lines like this:
      1 REM ************************* (as much stars as possible)
   2. Find the address of line number 100 (the first one you want to keep) in memory:

      The basic-lines are coded as following
      255       <- Beginn of program-memory
      hh        <- Hi-byte of linenumber (Line 100 = 0)
      ll        <- Lo-byte of linenumber (line 100 = 100)
      n         <- length of line. Address of n + n = Address of the end of the line
      zzzz      <- your real basic-line.
      13        <- line-ende = 13
      hh        <- Hi-Byte linenummber of following basic-line
      and so on
      13        <- lineend of last basic-line in memory
      255       <- end of basic-memory
 
     Go through memory using PEEK and the information above to find the address of your first line 
     in memory			

   3. Do step 1 and 2 as long as you have enough free space between 32820 and the first line you want
      to keep. 
      Let's say the hi-byte of that line is now located at 33040
   4. Set marker of basic-memory: POKE 33039, 255.
   5. Bend the begin-pointer POKE 65281, 16, 129
   6. Type in the communication-procedure.
      Take care to write exactly the same. espacialy the DATA-lines!!
    

  The communication-procedure consites of three parts:
  1. Recieving-part: Write it as follows:
     Switch to RUN-Mode, type in 30 and run the program by using the hotkey <DEF> + <S>
     After a few seconds the program is reporting how many bytes it has written and where it has written them.
     If not there's an error in the basic-program you typed in.	
  2. Sending-part: do like recieving-part but type in 70 instead of 30, <DEF> + <S>
  3. Control-part: 95; <DEF> + <S>

- *.SBS: Some more programs. Just for fun :-)

The directory contains a simple assembler. (if you want to get in programming your sharp in asm)

- SHARP.COD: Codetable. Requiered by the assembler

- SHARP.EXE: The assembler it-self

- KOMM.9: The asm-file of the communication-procedure



Disclaimer
----------

I developed that interface for my private use. Even if I have tested it my-self,
i can't give u guarantee that it works and woun't destroy your sharp. The use of 
the interface is on your own risk.
All information can be used free for not commercial purposes.
If you would like to get the source-code of tvsharp (written in Pascal) drop me a mail.

<araimondi@gmx.net>

