jtlodi wrote:Is FB able to control serial ports while running under XP? or do I need some sort of serial port dll control? Windows took away direct access to ports and that caused a lot of hassles.
In short - Yes.
FB - when using a serial port in windows - will install a 'temporary driver' - in that, 1) you need to run it first with admin rights 2) need to install that driver each time you re-boot the PC. - or so thats my understanding. http://www.freebasic.net/forum/viewtopi ... allel+porthttp://www.freebasic.net/wiki/wikka.php ... yPgOpenLpt
jtlodi wrote:Hopefully you will tell me that it is a piece of cake in FB!
- Well - does 'Cow pies' count? - j/k - sorta...
I *think* (looking at the posted code above)
- Code: Select all
Print #3,"!SC" ; Chr$(0) ; Chr$(0) ; Chr$(lobyte(position))_
; Chr$(hibyte(position)); Chr$(13);
is assuming the microcontroller receiving the serial port commands - is interpreting those commands - and causing the electrical signals needed to control the servo motor - Now for using the LPT port to directly control a stepper - is probably not advised anyway- too easy to darw too much current, thus some interfacing is needed - and IMHO - using a micro controller like the OP did, that interfaces/interprets commands is a *wiser* choice.
Not to mention:http://www.freebasic.net/forum/viewtopi ... allel+port
Under Windows NT/2000/XP a DOS application can freely access only the I/O ports that the system is not using, and a normal ring3 Windows application cannot (directly) access any I/O ports. FB can install a driver that can provide access to the I/O ports, but you may be very limited in what you can do with an I/O port that Windows is using.
In my limited attempts to control individual pins in a parallel port was not too good. Thus, a MCU between the PC and the stepper motor, and use a serial port to communicate between the PC and MCU - is a solution I know can work for certain.
But things change quickly in FB - so maybe that has since improved??
I hope that all made sense. ??