Within the DOS driver of PCL-839, we provide the source code of the function library, names 'lib839.c'. User can know how to drive PCL-839 with directio command by referring it. And the directio commands are also workable in Windows environment. User can set the register with the directio driver. However, there is one thing we should notice, when setting the register we should use the DRV_outp function, but not DRV_outpw. Following is a simple example:
ErrCde = DRV_outp(0, &H200, &H81)
ErrCde = DRV_outp(0, &H201, &H2) ' FL : 2
ErrCde = DRV_outp(0, &H202, &H0)
ErrCde = DRV_outp(0, &H200, &H82)
ErrCde = DRV_outp(0, &H201, &HFF) ' FH : 8191
ErrCde = DRV_outp(0, &H202, &H1F)
ErrCde = DRV_outp(0, &H200, &H84)
ErrCde = DRV_outp(0, &H201, &H64) ' Acc : 100
ErrCde = DRV_outp(0, &H202, &H0)
ErrCde = DRV_outp(0, &H200, &H87)
ErrCde = DRV_outp(0, &H201, &H58)
ErrCde = DRV_outp(0, &H202, &H2)
ErrCde = DRV_outp(0, &H200, &H8)
ErrCde = DRV_outp(0, &H200, &H80)
ErrCde = DRV_outp(0, &H201, &HE8) ' 3e8 hex = 1000 dec
ErrCde = DRV_outp(0, &H202, &H3)
ErrCde = DRV_outp(0, &H203, &H0)
ErrCde = DRV_outp(0, &H200, &HE8)
ErrCde = DRV_outp(0, &H200, &H4C)
ErrCde = DRV_outp(0, &H200, &H15) ' motor start to run 1000 pulse
Thank you for your feedback
We will look over your massage and get back to you soon if you need further assistance!