[iyonix-support] Re: Serial port questions
- From: Peter van der Vos <peterthuis@xxxxxxx>
- To: iyonix-support@xxxxxxxxxxxxx
- Date: Fri, 14 Mar 2008 18:21:15 +0100
Op 14-mrt-2008, om 10:56 heeft Gonzalo Meza het volgende geschreven:
Hi everyone,
I have some questions concerning the serial port on acorn machines,
and on the Iyonix. I've already asked this in
comp.sys.acorn.programmer and didn't get any advice other than
using the serial blockdrivers fromhttp://www.xat.nl/en/riscos/sw/bd/
index.htm, which are reputedly easier to use (see question n°3):
1) Is the pinout standard (i.e. I can use it to communicate to a PC
with a normal null model cable)? Does it need any special
configuration for this?
Yes, it is a standard serial port, so you can use a normal null modem
cable.
2) I have tried to receive and send data to a PC using a BASIC
program (see the end of the email), and so far I can send (the PC
receives it perfectly) but not receive... Am I setting/doing
something wrong?
You need an SYS "OS_Byte",2,2 to enable the serial receiver.
3) I would give a try to the serial blockdrivers, but I'm not able
to find ANY doc about them (the SH manual inhttp://
sudden.recoil.org/stronghelp/ seems corrupted) nor any meaningful
examples.
Is there someone who can help me? (I've built a home SCADA, the
microcontroller side is finally working, the WIMP SCADA is well
advanced and now I find out that I can't communicate!?!?)
Thanks a lot!!!
[snip]
PROCinit_serial
PROCsend_cmd(66)
NULL%=TRUE
ENDPROC
:
DEF PROCinit_serial
SYS"OS_SerialOp",0,180,0
REM Set data format to 8N1
SYS"OS_SerialOp",1,0
REM Set receive baud rate to 9600
SYS"OS_SerialOp",5,7
REM Set send baud rate to 9600
SYS"OS_SerialOp",6,7
ENDPROC
:
DEF PROCsend_cmd(cmd)
LOCAL n,char,tmp
SYS"OS_SerialOp",3,cmd
n=0
REPEAT
n=n+1
SYS"OS_SerialOp",4,0 TO tmp,char
UNTIL (n=1000000) OR (char>0)
PROCwimp_puticontext(main%,3,STR$char)
ENDPROC
Envoyé avec Yahoo! Mail.
La boite email la plus appreciée au monde.
Good luck,
Peter
--
Peter van der Vos
peterthuis@xxxxxxx
- Follow-Ups:
- [iyonix-support] Re: Serial port questions
- From: Andrew Pinder
- References:
- [iyonix-support] Serial port questions
- From: Gonzalo Meza
Other related posts:
- » [iyonix-support] Serial port questions
- » [iyonix-support] Re: Serial port questions
- » [iyonix-support] Re: Serial port questions
- » [iyonix-support] Re: Serial port questions
Hi everyone,I have some questions concerning the serial port on acorn machines, and on the Iyonix. I've already asked this in comp.sys.acorn.programmer and didn't get any advice other than using the serial blockdrivers fromhttp://www.xat.nl/en/riscos/sw/bd/ index.htm, which are reputedly easier to use (see question n°3):
1) Is the pinout standard (i.e. I can use it to communicate to a PC with a normal null model cable)? Does it need any special configuration for this?
2) I have tried to receive and send data to a PC using a BASIC program (see the end of the email), and so far I can send (the PC receives it perfectly) but not receive... Am I setting/doing something wrong?
3) I would give a try to the serial blockdrivers, but I'm not able to find ANY doc about them (the SH manual inhttp:// sudden.recoil.org/stronghelp/ seems corrupted) nor any meaningful examples.
Is there someone who can help me? (I've built a home SCADA, the microcontroller side is finally working, the WIMP SCADA is well advanced and now I find out that I can't communicate!?!?)
Thanks a lot!!! [snip] PROCinit_serial PROCsend_cmd(66) NULL%=TRUE ENDPROC : DEF PROCinit_serial SYS"OS_SerialOp",0,180,0 REM Set data format to 8N1 SYS"OS_SerialOp",1,0 REM Set receive baud rate to 9600 SYS"OS_SerialOp",5,7 REM Set send baud rate to 9600 SYS"OS_SerialOp",6,7 ENDPROC : DEF PROCsend_cmd(cmd) LOCAL n,char,tmp SYS"OS_SerialOp",3,cmd n=0 REPEAT n=n+1 SYS"OS_SerialOp",4,0 TO tmp,char UNTIL (n=1000000) OR (char>0) PROCwimp_puticontext(main%,3,STR$char) ENDPROC Envoyé avec Yahoo! Mail. La boite email la plus appreciée au monde.
- [iyonix-support] Re: Serial port questions
- From: Andrew Pinder
- [iyonix-support] Serial port questions
- From: Gonzalo Meza