Hi Jon,

Thanks for the info - and from the "guys that designed it".  Thanks for your 
help.  Its good to know the specialists are also reading the list - and will be 
there to support questions when I buy some pico hardware.

In the end, I went the "long" route and read through the driver code - so 
managed to work it out (I wasn't sure if the ID byte in the registers was 
enough to identify).  But it is nice to have confirmation that I read correctly.

Even though the code is written, I am still in the testing phase but I believe 
it will work - at least in theory it will:

The steppers are driven directly from an up-counter (like the USC), which is 
running at 16MHz, with relatively low jitter.  So I think I am OK there - maybe 
a tad faster.  (Though by no means as fast as the Beagle Bone)

The encoders are being counted by interrupt-driven routines, so are actually 
being updated at a rate which should have less latency than the USC updating at 
10kHz. I latch on the first access to one of the encoder registers, so that is 
also sorted.  The encoder interrupts are out of phase (by definition :-)  ), so 
the one routine will not be stomping on the other, so long as it takes less 
than 1/4 period to process the interrupt.  Each encoder has its dedicated 
arduino, so the system is scalable to more encoders without a bottle-neck there.

I go through the same handshaking as the USC (as defined by the EPP standard), 
so should be relatively OK.  To be within the EPP time-out of 10us, I have 160 
clock cycles to do the handshaking, and I should manage with fewer.

Of course, if I were trying to emulate the fancier boards, I would be 
hard-pressed - but all I need at the moment is low jitter step pulses and 
index-free encoder feedback on a stripped-down budget.  So lets hope for the 
best.  I might even in the future contemplate stripping down the driver to my 
"simple" functionality, to see which side of the EPP port is the rate-limiting 
factor.

Thanks again

Cecil

-----Original Message-----
From: Jon Elson [mailto:[email protected]] 
Sent: 26 June 2014 06:11 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] USC card detection

On 06/26/2014 04:24 AM, Churms, Cecil wrote:
> Good day,
>
> I am developing some hardware which will simulate an EPP-driven Pico USC card 
> using mini arduinos (that way, I can use the existing ppmc driver).  Does 
> anyone know what "handshake" the ppmc driver goes through, to think that a 
> pukka ppmc/USC card is present?
>
>
Well, I have some question if it can work if all software-driven. The timeout 
timer for EPP mode is usually 10 us, and there is a lot of traffic for each 
servo cycle.  You have to read 4 encoder counter of 24 bits each, so that is 12 
EPP read cycles, and write 4 step rate generators, another 12 EPP write cycles, 
plus the digital I/O.  This takes about 100 us on a good Pentium computer.

The boards have a device type ID, which is a register typically at address 
0x0f.  See http://pico-systems.com/univstep_regs.html
for the register definitions of the module.  So, the driver puts out the 
address 0x0f on the data lines, drives WRITE/ low and then drives 
ADDRESS_STROBE/ low, then waits for WAIT to go high signaling the response is 
available.  It then raises ADDRESS_STROBE/.
Then, it turns the parallel port data drivers to read mode, deasserts WRITE/ 
and asserts DATA_STROBE/ low to read the contents of that register.  When WAIT 
is true, it reads the value from the data lines, and deasserts DATA_STROBE.

All that activity reads one byte of data from the device.  
When reading/writing
consecutive bytes, the address counter in the device auto-increments, so you 
don't have to send the address each time.  The board ID has a high-order device 
type of 4 bits, and a version ID in the low 4 bits.  The USC device ID is 4.  
So, 0x41 would be the first rev of a USC board.  Later revs enable additional 
features in the driver.

What is the purpose of your project?  Using code on an arduino, you will never 
come close to the 10 MHz clock of the step rate counters on the USC board.  
This gives a step timing resolution of 
+/- 100 ns,
and step rates up to 300 KHz with jitter of about 3%.

Also, you will never come close to the performance of the Beagle Bone with PRU 
which is running step generator code at 200 MHz.

Jon

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse Turn 
processes into business applications with Bonita BPM Community Edition Quickly 
connect people, data, and systems into organized workflows Winner of BOSSIE, 
CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft 
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

*****************************************************************************
The information contained in this e-mail is confidential and may be subject to 
legal privilege. If you are not the intended recipient, you must not use, copy, 
distribute or disclose the e-mail or any part of its contents or take any 
action in reliance on it. If you have received this e-mail in error, please 
e-mail the sender by replying to this message. All reasonable precautions have 
been taken to ensure no viruses are present in this e-mail and the sender 
cannot accept responsibility for loss or damage arising from the use of this 
e-mail or attachments.
.*****************************************************************************

*****************************************************************************
The information contained in this e-mail is confidential and may 
be subject to legal privilege. If you are not the intended recipient, 
you must not use, copy, distribute or disclose the e-mail or any 
part of its contents or take any action in reliance on it. If you have 
received this e-mail in error, please e-mail the sender by replying 
to this message. All reasonable precautions have been taken to 
ensure no viruses are present in this e-mail and the sender cannot 
accept responsibility for loss or damage arising from the use of this 
e-mail or attachments.
.*****************************************************************************

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to