' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' Porte_parallele Parallel port Each SPP has three registers accessible via three successive ports : the base address or data register &H3BC &H378 &H278 W (R) the control register &H3BD &H379 &H279 R the command register &H3BE &H37A &H27A W SPP 1 Base Address is written in memory adress 0000:0400 on two bytes SPP 2 Base Address is written in memory adress 0000:0402 on two bytes SPP 3 Base Address is written in memory adress 0000:0404 on two bytes SPP 4 Base Address is written in memory adress 0000:0406 on two bytes If SPP x is not hardware implemented, the memory address is 0 ON A DB25 : - datas b0 to b7 are respectivly on pins 2 to 9 - control pins 10, 11, 12, 13, 15 (some are inverted :) - commands pins 1, 14, 16, 17 (some are inverted :) If port &H378 exists on your computer then DefInt A ' will set all the data lines of PP to 5 Volts (logical 1) Out &378, 255 ' will set all the data lines of PP to 0 Volts (logical 0) Out &378, 0 ' will read what was last written on PP (it cannot read anythng ' else than its output ! It is not an input port. For that see EPP A = Inp (&H378) ' Will read the 5 existing bit of the control register A = Inp (&H379) Reading or writing a port takes on ANY computer something like 1.5 microseconds, this can be usefull if you need very short temporisation (IE : reading the keybord buffer with A = Inp (&h60) It's harmless) ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb