developing drivers for custom boards
Not being sure how parports work, that seems fine.I have modified Andy's pcl720.comp file, for what I think seems logical for an EPP driver. If someone doesn't mind looking it over to see if I have modified it properly that would be very nice.
You will be happy to learn that it is much, much easier than that. In fact it is already done.Assuming it seems correct, I have a question about using 2 cards (1 on each of 2 different ports). I think I need to create another set of pins, then somehow I need to use those for the read and writes of the second port.
just load your comp with
loadrt custepp ioadr=0x378,0x1028
And you will automatically get pins like:
custepp.0.pin-01-out
for the card at 0x378 and
custepp.1.pin-01-out
for the card at 0x1028.
All the handling of multiple cards is handled by the code that comp creates. You can even use your custom component like any other HAL component, so this will work too:
loadrt custepp ioaddr=0x378,0x1028 names=fred,charlie
will give you
fred.pin-01-out
...
charlie.pin-01-out
...
Please Log in or Create an account to join the conversation.
Now I suppose things like RESET thread will have to go away. And I assume it stands to reason my step speed will be the same if not slower using the port this way. but overall I think I will be much happier with the setup.
Please Log in or Create an account to join the conversation.
There is no reason you can't add a "reset" function to the driver, to work in just the same way as the parport one does.Now I suppose things like RESET thread will have to go away. And I assume it stands to reason my step speed will be the same if not slower using the port this way
However, it might make sense to do reset in hardware.
Please Log in or Create an account to join the conversation.
See, this is why I need to get these things ironed out before I write the code for my cards. At least the how it will work part.
Please Log in or Create an account to join the conversation.
It might be easier to do it in EMC2, as the configuration of which pins need to be reset and which need to be left is probably easier.
You _could_ send a set of reset-mask bytes every thread, though. But then you might need to define a communications protocol.
Please Log in or Create an account to join the conversation.
On the other hand, the step pins will always be the same pins - not configurable. So unless I am missing something (good chance of that), seems like I could just always drive the steps low x-time after receiving from the port.
Please Log in or Create an account to join the conversation.
so it cannot get out of sync with the host, that is write the step signals with an address write
and the other signals with data writes/reads which increment your data register pointer
Please Log in or Create an account to join the conversation.
For whatever reason, I was taking it at face value that if I did an address write, I needed to send an address. Doh! that will just use the address write line from the EPP port to signal to my card to reset the pointer no matter what.
Please Log in or Create an account to join the conversation.
No, I don't think you are missing anything. That should work fine.On the other hand, the step pins will always be the same pins - not configurable. So unless I am missing something (good chance of that), seems like I could just always drive the steps low x-time after receiving from the port.
Please Log in or Create an account to join the conversation.
Or maybe I am half asleep (again), it is Monday morning afterall.
Please Log in or Create an account to join the conversation.