Event triggered square-wave
조회 수: 3 (최근 30일)
이전 댓글 표시
hi,
I generate square wave signal with this ;
freq_Hz = 30;
t = 0:0.0001:10;
y = square(2*pi*freq_Hz*t);
plot(t,y);
axis([0 10 -1.5 1.5]);
xlabel('Seconds');
ylabel('Amplitude');
But I want to trigger each duty cycle with an external event. Like this in pseudo ;
for i:1:100
if event1=1
pwm(i) = high
if event2=0
pwm(i) = low
plot(i,pwm)i)
but can't interfere to square function.
I am sure experienced users will provide some insight.
댓글 수: 0
답변 (1개)
Walter Roberson
2011년 11월 22일
I just wrote several paragraphs with specific references to why it cannot be done. You deleted the question out from underneath me, so my write-up was lost. This is frustrating to say the least. So you can dig the reasoning out yourself, and you are lucky I still had the documents in my cache.
댓글 수: 4
Walter Roberson
2011년 11월 23일
The LTC2485CDD normally runs at a maximum of 60 Hz, though there seems to be a "2x speedup mode" possible with it. You will not be able to obtain 300 Hz with it.
MATLAB has no facilities to blink the screen.
PTB3 claims up to 2 KHz sample rate (12 bit) sample rate with a Measurement Computing USB-based interface; see http://docs.psychtoolbox.org/Daq
What is the maximum frame rate for your display? It was never very common to find a CRT with higher than 85 Hz (except for the 120 Hz stereo modes), and most LCD are 60 Hz or lower. CRT often require a notable time to reconfigure to different frame rates (which often require resolution changes), and on most monitors the workable frame rates are a fairly small list. If you have an especially forgiving monitor sometimes you can design custom front porch timings and the like to fine-tune frame rates; Linux does seem to be the OS to use for that kind of work, but it can be tricky work and risks monitor damage if you get it wrong; a high level of attention to detail is necessary. Custom video formats pretty much have to be designed in advance.
Switching video formats using the official mechanisms is not a light-weight change, as the X11 driver has to be notified of the changes and reconfigures its ideas of your screen sizes, perhaps repositions your icons, etc.
참고 항목
카테고리
Help Center 및 File Exchange에서 National Instruments Frame Grabbers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!