developing drivers for custom boards
- jmelson
- Offline
- Moderator
Less
More
- Posts: 817
- Thank you received: 151
27 Apr 2013 22:37 #33289
by jmelson
with both strobes (addr and data) in the high condition, as they are negative-true.
Possibly the timeout on the port has occurred and the port is stuck, so clearing the
timeout bit might cause the strobes to be set back to the high (inactive) state.
Also, it is possible for the non-EPP registers to override the EPP state machine
and jam these lines low, you have to make sure the standard port registers
have these set to the right state.
Jon
Replied by jmelson on topic developing drivers for custom boards
Why doesn't address strobe go back high? The default state of the port should beThanks to everyones help here, I finally just about have a fully functional driver and card. I am left with 1 tiny but huge issue -
when the computer boots, address strobe goes low, causing my card to think an address is about to be sent, the problem seems to be that the computer is not yet in EPP mode so my card never sees address strobe go back high.
I need some logic to know when it is in EPP mode. I tried to send a byte out after setting EPP mode in the driver, but it seems like my card misses it so that didn't work.
Looking for any suggestions on this.
with both strobes (addr and data) in the high condition, as they are negative-true.
Possibly the timeout on the port has occurred and the port is stuck, so clearing the
timeout bit might cause the strobes to be set back to the high (inactive) state.
Also, it is possible for the non-EPP registers to override the EPP state machine
and jam these lines low, you have to make sure the standard port registers
have these set to the right state.
Jon
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
27 Apr 2013 22:56 #33290
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
Thanks Andy and Jon, I have code in my driver file to set these lines to idle high, maybe I just need to see if my card will be happy with that. Right now I am looking at it get stuck in the address write routine when the computer boots and not waiting to see if it gets happy once the driver is run.
To me it feels wrong that I can not come up with an idea how to trap that error and move on. Maybe a time out for how long my card waits to get the address strobe back high.
To me it feels wrong that I can not come up with an idea how to trap that error and move on. Maybe a time out for how long my card waits to get the address strobe back high.
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
28 Apr 2013 21:33 #33333
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
seems that if I am just more patient, everything is fine with my EPP comms.
New question, do I need to implement the invert pin function in my driver or is that built into LinuxCNC?
New question, do I need to implement the invert pin function in my driver or is that built into LinuxCNC?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
28 Apr 2013 21:45 #33335
by andypugh
I think you need to build it into the driver
Replied by andypugh on topic developing drivers for custom boards
New question, do I need to implement the invert pin function in my driver or is that built into LinuxCNC?
I think you need to build it into the driver
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
28 Apr 2013 21:57 #33336
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
Thanks Andy, off to study the paraport driver some more
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
18 May 2013 03:06 #34278
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
Ok I almost have all the wheels re-invented - thanks to all the help from here.
This is where I am, my driver and I/O card work just wonderful when I use the built-in port on the MB. But I want to use the second port on my Rosewill RC-304 card. Yes I know this is a MosChip 9815 chip, but it seems to work kind of. Through much studing of the datasheet for it, I am pretty sure I have gotten it into EPP mode. BUT, it acts like Linux does not see or care if it is ready for new data or if it has new data to give. Heres what I mean-
I send 14 bytes for setup information - when I watch the port, only 7 are actually sent. It seems if I put a delay in before sending the next byte it works. This delay is in my driver. I am attempting to watch the FIFO buffer to see when it is empty, then I send more.
When I read the port, I have a loop that just reads the address port looking for the correct answer from my card. it will do this 200 times, then error out. When I watch the port traffic, it is actually only trying 40 times to get the right answer. So I think to myself - ok same problem, I need to check FIFO again to see if it has data before reading the port. Well that failed (prolly bad code on my part).
I should mention all of this works perfect on the built in port. So I guess I am thinking Linux does not know how to properly talk to this card? Is it correct that my driver needs to do all the "checking" in order to work? If so, am I going about this the right way by checking the FIFO?
BTW, I called Rosewill tech support, they were of NO VALUE for this. basically they said parallel ports are a thing of the past and they have no way to support it with linux in EPP mode.
This is where I am, my driver and I/O card work just wonderful when I use the built-in port on the MB. But I want to use the second port on my Rosewill RC-304 card. Yes I know this is a MosChip 9815 chip, but it seems to work kind of. Through much studing of the datasheet for it, I am pretty sure I have gotten it into EPP mode. BUT, it acts like Linux does not see or care if it is ready for new data or if it has new data to give. Heres what I mean-
I send 14 bytes for setup information - when I watch the port, only 7 are actually sent. It seems if I put a delay in before sending the next byte it works. This delay is in my driver. I am attempting to watch the FIFO buffer to see when it is empty, then I send more.
When I read the port, I have a loop that just reads the address port looking for the correct answer from my card. it will do this 200 times, then error out. When I watch the port traffic, it is actually only trying 40 times to get the right answer. So I think to myself - ok same problem, I need to check FIFO again to see if it has data before reading the port. Well that failed (prolly bad code on my part).
I should mention all of this works perfect on the built in port. So I guess I am thinking Linux does not know how to properly talk to this card? Is it correct that my driver needs to do all the "checking" in order to work? If so, am I going about this the right way by checking the FIFO?
BTW, I called Rosewill tech support, they were of NO VALUE for this. basically they said parallel ports are a thing of the past and they have no way to support it with linux in EPP mode.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
18 May 2013 03:21 #34280
by PCW
Replied by PCW on topic developing drivers for custom boards
The MOSChip PCI parallel port chips have fatal bugs in their
EPP implementation so do not support EPP
(regardless of what the card specs say)
EPP implementation so do not support EPP
(regardless of what the card specs say)
The following user(s) said Thank You: btvpimill
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
18 May 2013 03:25 #34281
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
do you have a specific card reccomendation that has an internal (meaning inside the chassis) port connection?
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
18 May 2013 04:10 #34287
by PCW
Replied by PCW on topic developing drivers for custom boards
No, just know that MosChip/NetMOS PCI chips are no-go for EPP
Not sure which current PCI chips work in EPP mode
Not sure which current PCI chips work in EPP mode
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
Less
More
- Posts: 229
- Thank you received: 3
18 May 2013 04:47 #34291
by btvpimill
Replied by btvpimill on topic developing drivers for custom boards
how about the MESA 5i25? seems like that will fit the bill for me. Looks like there is an internal port that I assume could work as an EPP? Plus the added benefit of an extrernal port that could be used for other goodies?
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.105 seconds