Re: A89: Re: Re: Serial Communication in ASM


[Prev][Next][Index][Thread]

Re: A89: Re: Re: Serial Communication in ASM




I too am sure this has nothing to do with VT100 protocol.
But I have some additional questions:

From:           	"Justin Karneges" <jgkarneges@ucdavis.edu>

> If you send a byte across the serial line, then the PC program will pick up
> that byte and display the character that is represented by that byte number.
> If you send a 97 across, then the PC program will display an 'a'.  To
> display 1's and 0's would require more work on the PC program's part.

Like I said in my original post, I am using the transmit() function 
to fill the transmit buffer.  I assumed that would be automatically 
sent to the link port.  I was using the Hello World example and 
simply placed these transmit() function calls in that program to send 
the 'Hello String' to the link port.  I wanted to use this simple 
example to see if I could read it at the PC.

The program that I am using is one that I wrote.  I have also tested 
it with this port and it works fine with another piece of H/W that 
simply sends strings to the PC, via RS232.  So, I know the PC program 
that I am using works. 

> I believe this to be true.  Old hardware that never was around when things
> operated at 9600bps+, will not work with the Graphlink.  However, most
> modems nowadays can autodetect the baud rate.  I've plugged my Graphlink
> into a US Robotics 56k external modem and the modem downspeeded to 9600bps
> (of course, it did take some fiddling around with the switches on the back
> of it).

This is not a GraphLink issue.  GraphLink works fine.  I am trying to 
send some strings from the TI89 to my PC program (one that I wrote 
and know works with the COM port in use).

> >No handshaking is necessary in your example, since all the PC is doing is
> >echoing (displaying) what is sent over the serial port you specified.
> 

Does the transmit() ROM call, simply send whatever is pointed to 
blindly to the link port, as RS232, without any handshake?

> Yep.  There is no handshake in RS-232.  Some terminal programs have CTS/RTS
> handshaking with separate pins (or Xon/Xoff which is software) but this is
> not standard RS-232 which is simply two pins only: send and receive.  Yes,
> even though you may have a 25pin serial cable, only 2 of those pins are
> needed for RS-232 communication.

I have read somewhere a discription of how the 2 bit link port works. 
In  it there was mention of a 10, 11, 01, 00 handshake requirement.  
I'm not sure where this fits in when using transmit() function.  Or 
even how to do that, if required, on the PC end.  It could be that 
this is simply the handshake to use if connecting two TIs and that 
when using transmit(), that RS232 is just transmitted to the link.

In any case:
1) I know my COM1 port functions; 
2) I know my PC program works fine when RS232 data is received on COM1
3) I know that I am actually connected to COM port 1
4) I know that I must configure COM port, from my program to 9600
5) I know the Hello World program compiles fine and uses the 
transmit() function to transmit 'Hello World' to the link port.
6) I know that it appears that nothing is received by the PC prog.

7) I know that I don't understand why it does not work nor what else 
is required to transmit() data from the TI89 to a PC using ASM.

Does anyone have some simple source code example that demonstrates 
transmitting data over the link port to a PC?

> >Of course, I may be wrong about all of this and it might be something as
> >simple as you accidentally set the program to listen to the wrong COM port
> >=)
> 
> It is probably the wrong COM port if anything or some other problem with the
> echo program.  Try connecting two PC's with a null modem cable and try to
> send data to the echo program with a terminal program on the other PC.  Or
> it could be a bug in your 89 code.

Not the wrong COM port.  My PC program was tested with another piced 
of H/W that does transmit strings to the RS232 port.  It does work, 
only not with the TI89.  So, I assume I must be writing the source 
code incorrectly, for transmitting data from TI to PC.

I just entered paramaters data into registers and executed the 
transmit() ROM call.  Anything else required?

> -Justin Karneges [infiniti]
> 
> 
> >>What is required to send data over the serial port, using ASM?
> >>
> >>There are several serial I/O commands but I'm not sure what
> >>is required.
> >>
> >>How would one modify the Hello World program to, in addition
> >>to sending 'Hello World' to the screen, it would also send
> >>it out over the serial port.
> >>
> >>I have a program that echos to the PC screen anything received
> >>by the COM port,
> >>
> >>I added the following to the Hello World program, just between
> >>correcting the stack and the idle statements, but nothing was
> >>displayed on my PC screen.  So, obviously there is something
> >>that I am missing.
> >>
> >>   move.w  #12,-(a7)  ; 12 words to xmit
> >>   pea  hello(pc)  ; pushes address of string to stack
> >>   jsr  doorsos::transmit  ; transmits data
> >>   lea  6(a7),a7           ; corrects stack
> >>   jsr  doorsos::flush_link
> >>
> >>What else is required?  What is baud rate?  Is there any
> >>special handshake required, on the PC end?  What?  Is there any
> >>source code example, for this handshake, if requried?  Where?
> >
> >
> 
> 


--
-----------------------------------------------------------------
Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/

Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------


References: