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.
Serial i/o
-
- Site Admin
- Posts: 660
- Joined: April 5th, 2013, 10:55 am
- Contact:
Re: Serial i/o
You could do something like this:
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
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
Mike
-
- Posts: 3
- Joined: September 30th, 2014, 2:20 pm
- Contact:
Re: Serial i/o
Thanks Mike, I'll give that a try and let you know how this works out.
Thanks again.
Thanks again.
-
- Posts: 3
- Joined: September 30th, 2014, 2:20 pm
- Contact:
Who is online
Users browsing this forum: No registered users and 0 guests