I have No problem with my desire to explain what I am trying to do, but clearly have a huge problem actually explaining it. Thanks Henrik for bringing some clarity to this for me. Here goes my next attempt:
This will be a direct 1 to 1 connection between my I/O card and the PC. So I am assuming there should be no collisions or contention on the bus.
The intention is this:
every 20uSec I want to send 4 bytes of data to a PIC, and receive 4 bytes back. So every 20uSec, there needs to be 8 bytes transferred of actual data.
The PIC will use the 4 bytes in 1 of several ways:In either case, there should be no real processing on the PIC side, just Move the data and wait for the next packet.
- simplest setup is a stepper driven machine. In this case the PIC will just transfer the bytes to ports as output.
- next case is servo driven machine. In this case hardware PWM will be updated to reflect the new values just received. So the PIC just transfers bytes to registors (I haven't given much thought to this case as my current needs are for stepper control)
For the 4 bytes going back to the PC, this is just read a port and send the data. I think the PIC may be always 1 packet behind on the sent data. I am thinking after every transmission, a buffer is updated with new port data then waits for the next packet request from the PC.
There is NO motion control in the PIC itself, this is all done on the PC using EMC2 software. Step/DIR generation is all done on the PC. Each bit of 1 byte is the step value for 1 driver.
Hopefully this makes things at least a little bit clearer.
Thanks Henrik for the card offer, as yet I would have NO idea what to do with it, so I fear it would be a waste for me to accept it.
As for the choice of PIC, I feel like the idea of built in ethernet controller may solve the problem for me, but I don't know. I am clearly in the dark as to what it takes to have a successful exchange of data between a NIC and a PIC. If I need to use something like PIC32MX695F512L, then so be it. The program for this should not be intense, at least once the data has been received. I would prefer to use something more like 18F97J60, but just to keep it in the PBP family.
In a servo set-up, the amount of data may go up. But I can't see more then 8 bytes each way.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks