Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #465286 > unrolled thread
| Started by | John Larkin <jjlarkin@highlandtechnology.com> |
|---|---|
| First post | 2017-06-22 19:15 -0700 |
| Last post | 2017-06-24 23:36 -0700 |
| Articles | 7 on this page of 67 — 26 participants |
Back to article view | Back to sci.electronics.design
PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-22 19:15 -0700
Re: PC timing problem krw@notreal.com - 2017-06-22 22:37 -0400
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-22 20:02 -0700
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 08:44 -0400
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-23 10:56 -0400
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 11:14 -0400
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-23 14:05 -0400
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 14:17 -0400
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-23 14:59 -0400
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 18:34 -0400
Re: PC timing problem krw@notreal.com - 2017-06-23 22:15 -0400
Re: PC timing problem Don Y <blockedofcourse@foo.invalid> - 2017-06-22 19:50 -0700
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-22 20:14 -0700
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-23 15:20 +0200
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-23 10:58 -0400
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-26 10:31 +0200
Re: PC timing problem Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2017-06-26 09:05 -0400
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-26 12:41 -0400
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-27 06:47 +0200
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-27 14:07 -0400
Re: PC timing problem Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-06-27 11:44 -0700
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-28 02:11 -0400
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-28 09:03 +0200
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-28 03:53 -0400
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-28 11:28 +0200
Re: PC timing problem Don Y <blockedofcourse@foo.invalid> - 2017-06-23 12:05 -0700
Re: PC timing problem whit3rd <whit3rd@gmail.com> - 2017-06-22 19:56 -0700
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-22 20:16 -0700
Re: PC timing problem tabbypurr@gmail.com - 2017-06-22 20:31 -0700
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 10:51 -0400
Re: PC timing problem Joe Chisolm <jchisolm6@earthlink.net> - 2017-06-23 00:36 -0500
Re: PC timing problem Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-06-23 08:39 +0100
Re: PC timing problem tabbypurr@gmail.com - 2017-06-23 02:01 -0700
Re: PC timing problem Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-06-23 10:24 +0100
Re: PC timing problem tabbypurr@gmail.com - 2017-06-23 02:38 -0700
Re: PC timing problem "Tim Williams" <tiwill@seventransistorlabs.com> - 2017-06-23 05:38 -0500
Re: PC timing problem jack4747@gmail.com - 2017-06-23 02:14 -0700
Re: PC timing problem Reinhardt Behm <rbehm@hushmail.com> - 2017-06-23 17:34 +0800
Re: PC timing problem whit3rd <whit3rd@gmail.com> - 2017-06-23 12:18 -0700
Re: PC timing problem Jasen Betts <jasen@xnet.co.nz> - 2017-06-23 11:41 +0000
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-23 07:16 -0700
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 11:26 -0400
Re: PC timing problem Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-06-23 09:19 -0700
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-23 09:28 -0700
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 13:40 -0400
Re: PC timing problem Jasen Betts <jasen@xnet.co.nz> - 2017-06-23 21:45 +0000
Re: PC timing problem tabbypurr@gmail.com - 2017-06-23 17:07 -0700
Re: PC timing problem Jasen Betts <jasen@xnet.co.nz> - 2017-06-24 02:22 +0000
Re: PC timing problem Don Kuenz <g@crcomp.net> - 2017-06-23 13:41 +0000
Re: PC timing problem "David Eather" <eather@tpg.com.au> - 2017-06-23 23:47 +1000
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-23 14:28 -0400
Re: PC timing problem rickman <gnuarm@gmail.com> - 2017-06-23 15:01 -0400
Re: PC timing problem whit3rd <whit3rd@gmail.com> - 2017-06-23 12:39 -0700
Re: PC timing problem David Brown <david.brown@hesbynett.no> - 2017-06-26 10:36 +0200
Re: PC timing problem M Philbrook <jamie_ka1lpa@charter.net> - 2017-06-26 18:53 -0400
Re: PC timing problem John Larkin <jjlarkin@highland_snip_technology.com> - 2017-06-23 12:21 -0700
Re: PC timing problem "David Eather" <eather@tpg.com.au> - 2017-06-23 23:55 +1000
Re: PC timing problem Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-06-23 08:47 -0700
Re: PC timing problem John Larkin <jjlarkin@highlandtechnology.com> - 2017-06-23 09:25 -0700
Re: PC timing problem Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-06-23 11:30 -0700
Re: PC timing problem Martin Riddle <martin_ridd@verizon.net> - 2017-06-23 18:34 -0400
Re: PC timing problem Robert Baer <robertbaer@localnet.com> - 2017-06-23 19:02 -0800
Re: PC timing problem M Philbrook <jamie_ka1lpa@charter.net> - 2017-06-24 12:05 -0400
Re: PC timing problem Dimitrij Klingbeil <nospam@no-address.com> - 2017-06-24 20:18 +0200
Re: PC timing problem bitrex <bitrex@de.lete.earthlink.net> - 2017-06-24 15:52 -0400
Re: PC timing problem Adrian Jansen <adrian@qq.vv.net> - 2017-06-25 09:26 +1000
Re: PC timing problem Jamie M <jmorken@shaw.ca> - 2017-06-24 23:36 -0700
Page 4 of 4 — ← Prev page 1 2 3 [4]
| From | Martin Riddle <martin_ridd@verizon.net> |
|---|---|
| Date | 2017-06-23 18:34 -0400 |
| Message-ID | <fb5rkc1koaa3t8h6osrr5mpavbida25u4q@4ax.com> |
| In reply to | #465286 |
On Thu, 22 Jun 2017 19:15:01 -0700, John Larkin <jjlarkin@highlandtechnology.com> wrote: > > >Today a couple of guys literally walked up to our place and rang the >doorbell, looking for help. They are medical types who know basically >nothing about electronics. > >They want to plop a still image on a PC screen and simultaneously >trigger some external gear. They would like those to be coincident to >within maybe a millisecond. This will be a Windows machine, hardly a >realtime OS. I don't think I could load a screen and simultaneously >bang a serial port pin, or some USB device, accurate to a millisecond. >Well, probably not. > >I'm helping them for free, so I don't want to launch some big coding >or hardware project. > >One idea is to tape a photodiode in the corner of their screen. Their >image could always include a bright spot there, and we could trigger >off that. > >Another is to use a laptop that has a video port, like you'd connect >to a projector. Then somehow look at the (VGA?) signal and use that as >the trigger. > >In both cases, they'd have to manually arm the system before a shot so >normal PC screens wouldn't trigger the external gear. Make screen >black, throw a switch, begin the show. Maybe a serial port pin could >be the on/off switch? > >A serial or USB port pulse wouldn't have the false alarm problem, but >time sync might be tricky. I have no idea how close in time the video >and the electrical outputs could be aligned. I guess I could >experiment. > >Just possibly the VGA image/signal could contain some distinct trigger >pattern, like a 7 MHz or some such waveform that I could bandpass >filter and trigger on. Maybe RGB at different frequencies? Sounds like >work. > >These guys have a small chance of doing a lot of good in the world, so >I'd like to give them some help, without it becoming a giant project. > >Any ideas? You might be close if you call OnPaint then Set RTS on a hardware serial port. You might have to set the task priority if the time wobles around a bit. If someone is willing to try Set RTS low, write display buffer, OnPaint, Set RTS high. One problem is Onpaint is called when a window is moved, but I don't think it matters in their case. Linux? Cheers
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2017-06-23 19:02 -0800 |
| Message-ID | <qDk3B.88006$0o4.35981@fx40.iad> |
| In reply to | #465286 |
John Larkin wrote: > > > Today a couple of guys literally walked up to our place and rang the > doorbell, looking for help. They are medical types who know > basically nothing about electronics. > > They want to plop a still image on a PC screen and simultaneously > trigger some external gear. They would like those to be coincident > to within maybe a millisecond. This will be a Windows machine, hardly > a realtime OS. I don't think I could load a screen and > simultaneously bang a serial port pin, or some USB device, accurate > to a millisecond. Well, probably not. > > I'm helping them for free, so I don't want to launch some big coding > or hardware project. > > One idea is to tape a photodiode in the corner of their screen. > Their image could always include a bright spot there, and we could > trigger off that. > > Another is to use a laptop that has a video port, like you'd connect > to a projector. Then somehow look at the (VGA?) signal and use that > as the trigger. > > In both cases, they'd have to manually arm the system before a shot > so normal PC screens wouldn't trigger the external gear. Make screen > black, throw a switch, begin the show. Maybe a serial port pin could > be the on/off switch? > > A serial or USB port pulse wouldn't have the false alarm problem, > but time sync might be tricky. I have no idea how close in time the > video and the electrical outputs could be aligned. I guess I could > experiment. > > Just possibly the VGA image/signal could contain some distinct > trigger pattern, like a 7 MHz or some such waveform that I could > bandpass filter and trigger on. Maybe RGB at different frequencies? > Sounds like work. > > These guys have a small chance of doing a lot of good in the world, > so I'd like to give them some help, without it becoming a giant > project. > > Any ideas? > > Back in the old daze (1980's), i wrote an interpreted BASIC program that would FDX communicate at 1200 baud AND print all at the same time; IBM said that 1200 baud one way was not possible, that 300baud would work. Above should give you a rough idea that 1mSec would be easy (under the proper conditions). You said very little about the video conditions / requirements. Fer eggzampel, continual look at a video screen and create a trigger on some specified image movement/change? Source of video? web-based, file based, serial port, ?? Sympel-minded scheme: program looks at a serial port for (video) file input and generates trigger pulse at serial port. This is FDX and no PC is required; a one-shot looking at signal data line (the "video" signal) can generate the pulse in microseconds. So, how KISS are the requirements?
[toc] | [prev] | [next] | [standalone]
| From | M Philbrook <jamie_ka1lpa@charter.net> |
|---|---|
| Date | 2017-06-24 12:05 -0400 |
| Message-ID | <MPG.33b857e9b59ff75a98a035@news.eternal-september.org> |
| In reply to | #465286 |
In article <0rsokcdm5ncdgt6c1qegpnn7rb3jehop43@4ax.com>, jjlarkin@highlandtechnology.com says... > > Today a couple of guys literally walked up to our place and rang the > doorbell, looking for help. They are medical types who know basically > nothing about electronics. > > They want to plop a still image on a PC screen and simultaneously > trigger some external gear. They would like those to be coincident to > within maybe a millisecond. This will be a Windows machine, hardly a > realtime OS. I don't think I could load a screen and simultaneously > bang a serial port pin, or some USB device, accurate to a millisecond. > Well, probably not. > > I'm helping them for free, so I don't want to launch some big coding > or hardware project. > > One idea is to tape a photodiode in the corner of their screen. Their > image could always include a bright spot there, and we could trigger > off that. > > Another is to use a laptop that has a video port, like you'd connect > to a projector. Then somehow look at the (VGA?) signal and use that as > the trigger. > > In both cases, they'd have to manually arm the system before a shot so > normal PC screens wouldn't trigger the external gear. Make screen > black, throw a switch, begin the show. Maybe a serial port pin could > be the on/off switch? > > A serial or USB port pulse wouldn't have the false alarm problem, but > time sync might be tricky. I have no idea how close in time the video > and the electrical outputs could be aligned. I guess I could > experiment. > > Just possibly the VGA image/signal could contain some distinct trigger > pattern, like a 7 MHz or some such waveform that I could bandpass > filter and trigger on. Maybe RGB at different frequencies? Sounds like > work. > > These guys have a small chance of doing a lot of good in the world, so > I'd like to give them some help, without it becoming a giant project. > > Any ideas? the serial port USB or internal is fast enough, the issue is the video capture.. that is where the bottle neck is.. We have OR software we wrote many moons ago at work to monitor the motion of a few machine functions without making any connection to it the machine.. The camera sits at a high angle.. The pc has a internal video capture card with a direct memory video capture that is accessable via host application.. it allows the rest of the PC to function without lag.. Using direct X or or accessing the memory is the way to go for fast processing of a live image. Do not use any USB cams for this if near real time is needed. Turning the IO's of a serial port on/off is simple, you need to have the port open at all times in exclusive mode. Also, you can format the output data to form a serial stream of data using a shift register each time a bit is shifted in, this allows you to stream the bits in 8 bit format.. In a loop using a timer you can build a byte and send it to the port.. Jamie
[toc] | [prev] | [next] | [standalone]
| From | Dimitrij Klingbeil <nospam@no-address.com> |
|---|---|
| Date | 2017-06-24 20:18 +0200 |
| Message-ID | <oima6n$et4$1@dont-email.me> |
| In reply to | #465286 |
On 23.06.2017 04:15, John Larkin wrote: > > Today a couple of guys literally walked up to our place and rang the > doorbell, looking for help. They are medical types who know > basically nothing about electronics. > > They want to plop a still image on a PC screen and simultaneously > trigger some external gear. They would like those to be coincident to > within maybe a millisecond. This will be a Windows machine, hardly a > realtime OS. I don't think I could load a screen and simultaneously > bang a serial port pin, or some USB device, accurate to a > millisecond. Well, probably not. ... > Let's say when the image is all on the screen. That suggests that the > optical sensor wins. I guess the video signal sent to the LCD screen, > and the screen refresh, are asynchronous. There is probably a way to > synchronize video ram loads with screen refresh, but I'm not > volunteering to write any device drivers. ... Hi John Frankly, I don't think that the various video latencies involved will give you a 1 ms total timing budget. Modern LCD monitors are some complex beasts, they generate their own screen update timing. What you send on the VGA/DVI/HDMI port is no longer synchronous with the LCD "on the glass" drive signals. Especially if the input signal is analog (VGA), the monitor will, after digitizing it, store large chunks and run it through a lot of processing (resize, anti-alias, filters for various "enhancements" such as edge sharpness) before buffering the whole frame in order to be able to output it to the LCD at some potentially unrelated LCD-specific frame rate, which might not even be publicly documented anywhere. So you have 2 areas of non-synchronous behavior: 1. in the graphics card (memory write by a driver vs. video output) 2. in the monitor (received video signal vs. LCD panel refresh) At least Nr. 2 is not under your control, even if you decide to write drivers, plus as soon as different monitors are used, timing won't be repeatable any more. You can use the photodiode trick, but this assumes that the image arrives at the monitor in whole rather than starting somewhere at a random line of the screen, progressing to the last line and then finishing the remaining part from the top. The starting position won't likely be under your control, as won't be the exact time that the LCD panel will take to refresh (plus the frame takes longer than 1 ms). Additionally, the liquid crystals in the LCD itself typically have longer than 1 ms response times plus the response times are voltage-dependent (depend on the content of the picture) and asymmetric (relaxation can be considerably slower than electrostatic alignment), so going from dark to bright is not the same at going from bright to dark, and the actual levels (both absolute and relative) of "bright" and of "dark" also affect timing. The time constants involved are on the order of single digit ms, but this already eats the 1 ms budget. Since quantity and series production are both presumably not an issue, a more likely approach to reach 1 ms timing may be a hardware hack of the monitor itself. Rather than controlling the content of the video stream with precision timing (thwarted by monitor buffering and LCD refresh) it should be much easier to control the LED back light. LCD TVs, and presumably monitors too, tend to have circuit boards for power and for video. The power stuff has 2 or 4 layers and cheap PCB technology as it needs neither BGAs nor controlled impedances, while the video stuff is more complex and costly per PCB area, so they keep the area of the video board to the minimum. The drivers for the back light LEDs tend to be on the power board, not on the video board, and the connection, again for cost reasons, uses the fewest number of wires possible. Often, there is only one single wire that controls the LED state as well as their brightness by using PWM. Hacking a small board with an AND gate into this circuit as well as some ESD protection for good measure should be technically possible (as well as a mounting an SMA jack somewhere). Whatever generates the timing, could then distribute the same signal to the new "light enable" port on the monitor and to the other gear. Dimitrij P.S. Just recently there was a thread on sci.electronics.repair that dealt with light-related issues in TVs and hacking them to get the maximum brightness reduced. Maybe somebody from there can suggest monitor-related info too.
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-06-24 15:52 -0400 |
| Message-ID | <Qpz3B.43427$np2.25707@fx06.iad> |
| In reply to | #465513 |
On 06/24/2017 02:18 PM, Dimitrij Klingbeil wrote: > Whatever generates the timing, could then distribute the same signal to > the new "light enable" port on the monitor and to the other gear. > > Dimitrij > > P.S. Just recently there was a thread on sci.electronics.repair that > dealt with light-related issues in TVs and hacking them to get the > maximum brightness reduced. Maybe somebody from there can suggest > monitor-related info too. Killing the backlight is definitely the way to go, but some PC graphics hardware and monitors have a a one-wire interface routed along with the display signal for the monitor to report its capabilities to the OS and for the OS to control the display brightness, independently of the GPU and display hardware. I'd try to get my hands on one of those and see if doing it all via software was fast enough before I started hacking into a monitor!
[toc] | [prev] | [next] | [standalone]
| From | Adrian Jansen <adrian@qq.vv.net> |
|---|---|
| Date | 2017-06-25 09:26 +1000 |
| Message-ID | <594ef52e$0$1500$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #465286 |
On 23/06/2017 12:15 PM, John Larkin wrote: > > > Today a couple of guys literally walked up to our place and rang the > doorbell, looking for help. They are medical types who know basically > nothing about electronics. > > They want to plop a still image on a PC screen and simultaneously > trigger some external gear. They would like those to be coincident to > within maybe a millisecond. This will be a Windows machine, hardly a > realtime OS. I don't think I could load a screen and simultaneously > bang a serial port pin, or some USB device, accurate to a millisecond. > Well, probably not. > > I'm helping them for free, so I don't want to launch some big coding > or hardware project. > > One idea is to tape a photodiode in the corner of their screen. Their > image could always include a bright spot there, and we could trigger > off that. > > Another is to use a laptop that has a video port, like you'd connect > to a projector. Then somehow look at the (VGA?) signal and use that as > the trigger. > > In both cases, they'd have to manually arm the system before a shot so > normal PC screens wouldn't trigger the external gear. Make screen > black, throw a switch, begin the show. Maybe a serial port pin could > be the on/off switch? > > A serial or USB port pulse wouldn't have the false alarm problem, but > time sync might be tricky. I have no idea how close in time the video > and the electrical outputs could be aligned. I guess I could > experiment. > > Just possibly the VGA image/signal could contain some distinct trigger > pattern, like a 7 MHz or some such waveform that I could bandpass > filter and trigger on. Maybe RGB at different frequencies? Sounds like > work. > > These guys have a small chance of doing a lot of good in the world, so > I'd like to give them some help, without it becoming a giant project. > > Any ideas? > > Really doubt you would get 1ms timing of any sort from a Windoze machine. USB latency is at best 1ms. Image load from a disk will be several msec or more. But I would the thinking about doing it the other way. Have a trigger, even a manual button, and drive the external circuit from the button. At the same time use that to send a 'next file' command to an image handler like Irfanview to put the next image from a batch onto the screen. A bit of juggling with delays between the signal going to the 'next image' system and the external device you want to trigger would probably help to get it synchronised. Delays of the order of tens of msec are probably a bit out of the normal for you ! -- Regards, Adrian Jansen
[toc] | [prev] | [next] | [standalone]
| From | Jamie M <jmorken@shaw.ca> |
|---|---|
| Date | 2017-06-24 23:36 -0700 |
| Message-ID | <oinlla$1k9l$1@gioia.aioe.org> |
| In reply to | #465286 |
On 6/22/2017 7:15 PM, John Larkin wrote: > > > Today a couple of guys literally walked up to our place and rang the > doorbell, looking for help. They are medical types who know basically > nothing about electronics. > > They want to plop a still image on a PC screen and simultaneously > trigger some external gear. They would like those to be coincident to > within maybe a millisecond. This will be a Windows machine, hardly a > realtime OS. I don't think I could load a screen and simultaneously > bang a serial port pin, or some USB device, accurate to a millisecond. > Well, probably not. > > I'm helping them for free, so I don't want to launch some big coding > or hardware project. > > One idea is to tape a photodiode in the corner of their screen. Their > image could always include a bright spot there, and we could trigger > off that. > > Another is to use a laptop that has a video port, like you'd connect > to a projector. Then somehow look at the (VGA?) signal and use that as > the trigger. > > In both cases, they'd have to manually arm the system before a shot so > normal PC screens wouldn't trigger the external gear. Make screen > black, throw a switch, begin the show. Maybe a serial port pin could > be the on/off switch? > > A serial or USB port pulse wouldn't have the false alarm problem, but > time sync might be tricky. I have no idea how close in time the video > and the electrical outputs could be aligned. I guess I could > experiment. > > Just possibly the VGA image/signal could contain some distinct trigger > pattern, like a 7 MHz or some such waveform that I could bandpass > filter and trigger on. Maybe RGB at different frequencies? Sounds like > work. > > These guys have a small chance of doing a lot of good in the world, so > I'd like to give them some help, without it becoming a giant project. > > Any ideas? > > Hi, Convert the images into video files with one of the audio channels in the video file used for the trigger signal. Change the purpose of the original idea to instead be to provide a feedback signal to sync the audio and video, and then proceed to solving the original task. cheers, Jamie
[toc] | [prev] | [standalone]
Page 4 of 4 — ← Prev page 1 2 3 [4]
Back to top | Article view | sci.electronics.design
csiph-web