On 07/20/2012 09:38 PM, andy pugh wrote: > On 21 July 2012 02:47, Charles Steinkuehler<[email protected]> wrote: >> My understanding is that one of the first things the servo thread does >> when it wakes up is poll for the current position from the appropriate >> lower-level (software step generator, mesa hardware, or whatnot). > > It is, but I think that the problem is that hardware frequency > generators don't count their pulses.
All depends on the hardware used and how it is configured - there is no reason this "bit of electronics" can't support position-counter registers. Depending on the uP chip - they can have lots of pulse generators - each counter has around a dozen config registers - they can be set up to count on the pulse outputs from one of the other counters that is set up to generate the pulses - or you can set it up to count pulses via interrupts. (The ARM cortex (thumb ) processors have very fast Interrupts.) Or using a cheap FPGA - the counter register is just more logic. The problem of doing this on a PC, is that the code running is not deterministic in time - the same instruction can take different amounts of time depending on what is going on, not only on the system level, but even on the micro-code level. Single chip uP systems are much more deterministic for doing real-time work - (even these can have differing instruction times - the time to read a flash location can sometimes take an extra cycle - but there are ways to work around this. ) In my mind, a single chip uP system, with just a small assembly program, could do the pulse generation busy work and make the position information available to the PC-system with time left over to play an audio stream. The question is if there is going to be a latency issue of bringing that position information back into the PC without any problematic latency - ( the outer loop is running much slower - so I doubt there is an issue. ) -------------------------------------------------------------------------------- Karl Schmidt EMail [email protected] Transtronics, Inc. WEB http://secure.transtronics.com 3209 West 9th Street Ph (785) 841-3089 Lawrence, KS 66049 FAX (785) 841-0434 Any cat would tell you that you can only wash one paw at a time; while we try to do everything at once. -kps -------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
