ok actually I tried your code with little midifications :

as follow:


device 16f877a


INPUT portb.1 ' when you are done with sending a byte,
INPUT portb.0 'assign the pins as input pins.
input portd.2
StopBit var bit
StartBit var bit
Parity var bit
Temp var byte
DatTime var byte
ClkTime var byte




stopbit = 1
startbit = 0
Parity = 0 'for q parity=0

Temp = $15 ' Send "q" as an example.

DatTime = 10 ' Data Pause Time.
ClkTime = 50 ' Clock Pause time.

main:

if portd.2=1 then sendQ
goto main



end

sendQ:

OUTPUT portb.1 ' Before you send anything, assign the pins as output pins.
OUTPUT portb.0

portb.1 = 1
PAUSEUS DatTime
portb.0 = STARTBit ' Start bit is always zero.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime

portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.0 ' Bit 0.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.1 ' Bit 1.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.2 ' Bit 2.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.3 ' Bit 3.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.4 ' Bit 4.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.5 ' Bit 5.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.6 ' Bit 6.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Temp.7 ' Bit 7.
PAUSEUS DatTime
portb.1 = 0
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = Parity ' Parity Bit.
PAUSEUS DatTime ' You must calculate Parity bit_
portb.1 = 0 'in somewhere before putting it here.
PAUSEUS ClkTime


portb.1 = 1
PAUSEUS DatTime
portb.0 = StopBit ' Stop bit is always 1.
PAUSEUS DatTime ' Have a variable named StopBit and make it 1.
portb.1 = 0
PAUSEUS ClkTime

INPUT portb.1 ' when you are done with sending a byte,
INPUT portb.0 'assign the pins as input pins.


goto main




______________________________

and it still not working ,nothing appears on the screan and if I used the 5V supply from the PC , the PC became freezing and nothing will work , if I used an auxiliarysupply the character " q " will not appear also as in the first case but the computer will not freezing !

now:

1) I thought it might be the DataTime and ClkTime values so I think to chnge them to dataTime = 18 , ClkTime=37 by using those values the period of logic one = 37us and logic zero period = 37us ( for the clock ) !! then the T=74us -> f=1/T =13.513KHz in the required range. but I didn't try it yet

2) the second reason I was thinking about (it may look crazy - but I get missed of reasons)
ok what I think:
in all the cases ever the PS/2 cable that we are use was goten from a mouse " a mouse
PS/2 cable - green - " was conntected to our Pic microcontroller !!



so do you think that one of those might be the reason of making the PC freezing and the character not appears.




AMAZING THAT AN ENGINEERES CAN'T MAKE A HARDWARE TO SHOW A SINGLE CHARACTER ON THE COMPUTER NOTEPAD

and this is still the first step on my project .

by the way thanks sayzer for your tring and for your help !! waitting to see your replay and what Ideas do you have in your mind !