Basic to Parallel or Serial connection?

By frits9164

Resident (64)

frits9164's picture

31-01-2012, 20:05

Dear Fellow MSXers : Is it possible with MSX BASIC to control a MSX Output or something else with parallel or serial MSXbasic language? I know with Parallel is in same time, (8 bit) and Serial in same time in a row? But my question is IN MSX-BASIC?Question

Login or register to post comments

By Manuel

Ascended (19469)

Manuel's picture

31-01-2012, 21:24

Of course it's possible. Both. Serial is easiest, it has lots of basic support (RS-232 basic extensions). Parallel (printer port) is a bit more manual, but you can use stuff like out and in to get data on/from it.

By Lord_Zett

Paladin (807)

Lord_Zett's picture

31-01-2012, 22:47

parallel easy. use out command i used it to for lots to conect to the prt: port

By frits9164

Resident (64)

frits9164's picture

01-02-2012, 00:07

Manuel, Serial is easiest you said can you give me a example please: for input and output and how to begin a program/ and than close the program(Serial). I will not findout the weel again, when there are people that are so very kind to give a little help!
You can find my e-mailadress under my avatar in the administration.When you need it. Thanks Frits
Smile
(edit) When I know more, than I can continue my work with what already am doing meteorological measurements to refine. That's not a 'GAME' in the air, but an improved measurement of new and easy way for me to measure and program.
And that all with MSX2 and in MSX Basic language. I do not need the hurry(speedup)in the computer, but only accuracy of the moment from the measurement in Ohm's, Volts, Speed, Temperature,Humidity,rotation,ADC,DAC,Freq,Light or samething else.
(THat all with formulas, where the MSX is verry good in it)Wink

By Manuel

Ascended (19469)

Manuel's picture

01-02-2012, 21:07

Do you ahve a serial interface then? If so, which?

By Jipe

Paragon (1614)

Jipe's picture

01-02-2012, 23:10

http://www.msxvillage.fr/forum/topic.php?id=738

see this interface you can mesure light temperature and sound and use basic instruction

By frits9164

Resident (64)

frits9164's picture

01-02-2012, 23:47

ADC Input card via cartridge, Output and Input card via cartridge, 82C55 24 I/O via cartridge thats is all with programming in 8bits parellel and adressing in Basic.But I want now via RS232C or SPI (Joystick interface) in serial programming with Basic!
Making the hardware is easy for me, but I have never done befor progamming in serial programming. It is not the problem to program in Basic only some things what I need to know for Serial programming like rs232 or SPI or PIO or FIO etc.(juts in Basic)Smile

By NYYRIKKI

Enlighted (6067)

NYYRIKKI's picture

02-02-2012, 11:15

Paraller port is the most easy one, but it is output only:

LPRINT <string>
sends bytes to paraller port

If you want to control directly the pins D0-D7 then you can use command:
OUT &H91,<byte>

Examples:
LPRINT "Hello World!";
OUT &H91,&B11001100

Serial is a bit harder... If you don't have RS-232 BIOS then you need some assembler knowledge... If you have RS-232 BIOS, then check out chapter 4.1 in MSX Technical Data Book:
http://www.tabalabs.com.br/msx/msx_tech_hb/msxtech_tabalabs.pdf

Example:

10 CALL COMINI ("8N1NNNNN",9600)
20 OPEN "COM:" AS #1
30 PRINT #1,"Hello World!";
40 CLOSE #1

By frits9164

Resident (64)

frits9164's picture

04-02-2012, 01:04

Nyyrikki, thanks for your answer. It was verry usefull!Wink
I hope the Gods of "The East Forest" will you be profitable to hunt in the woods after the "Ice Coffee" and the teeth that is verry sensitive!
I feel that everthing is coming Good! I feel it on my coffee-teeth.
" Oma hammas on herkkä kahvi!” The MSX"bibel" is great!
Frits9164