Serial i/o

General discussions related to the Altair 8800 Clone

Serial i/o

Postby ke6mji » November 6th, 2014, 10:15 am

How would one go about using serial port 2 and basic to talk to an external serial device, i.e. basic stamp picaxe etc? I assume the basic commands out and inp are used for this? Has anyone documented the procedure for this? Do I need to turn off hardware handshaking?

When I hooked my “o” scope to the data line of serial port 2 (addresses 006,007 2400 baud) and send data using “out” in basic, there is no data output, just ambient noise.
Obviously I am not an expert in using serial i/o!
Thanks in in advance for any insight.
ke6mji
 
Posts: 3
Joined: September 30th, 2014, 2:20 pm

Re: Serial i/o

Postby AltairClone » November 6th, 2014, 6:55 pm

You could do something like this:
Code: Select all
10 PRINT "Enter string to echo";
20 INPUT ECHO$
30 LECHO=LEN(ECHO$)
40 IF LECHO=0 THEN END
50 FOR I=1 TO LECHO
60 WAIT 6,128,255
70 OUT 7,ASC(MID$(ECHO$,I,1))
80 NEXT I
90 ECHO$=""
100 GOTO 10


This assumes the SIO board at I/O address 6/7 like you mentioned. If instead you wanted to write through the second port on a 2SIO board, for example, replace 60 with "WAIT 18,2" and on line 70 use "OUT 19..."

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: Serial i/o

Postby ke6mji » November 7th, 2014, 8:50 am

Thanks Mike, I'll give that a try and let you know how this works out.
Thanks again.
ke6mji
 
Posts: 3
Joined: September 30th, 2014, 2:20 pm

Re: Serial i/o

Postby ke6mji » November 10th, 2014, 9:52 am

Got it working... images/icons/smile/mrgreen.gif

Thanks again!
ke6mji
 
Posts: 3
Joined: September 30th, 2014, 2:20 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 17 guests