Precise signal generation using matlab

Can I generate a signal using MATLAB which is in the order of microseconds( Stays low for 1microsecond and becomes high the next microsecond) and output the same via serial or parallel port?
8/23/2010 4:14:05 AM
comp.soft-sys.matlab 207625 articles. 4 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies

Similar Articles

[PageSpeed] 18
On 22/08/10 11:14 PM, venkata wrote:
> Can I generate a signal using MATLAB which is in the order of
> microseconds( Stays low for 1microsecond and becomes high the next
> microsecond) and output the same via serial or parallel port?

*Maybe*. I personally wouldn't count on it, though.

You _might_ be able to do an acceptable job of timing a signal if you 
manage to find an appropriate available hardware-level timer on some 
device, but it would be difficult to do in software unless perhaps you 
are using the RTW.

Asynch serial ports are not designed to run at 1 megabit per second. 
Apparently with 2009a and later, you can run at about 0.92 megabit/s, 
but it would be impossible to control the timing of the bits precisely 
within that framework.

Parallel ports... I'm having to do a bunch of careful reading here.

Look right near the bottom, where it talks about ISA cards supporting 2 
megabytes per second maximum, and PCI cards supporting 5.5 to 6 
megabytes per second maximum. That 5.6 to 6 megabytes per second 
_sounds_ like plenty for your application, but it needs EPP mode to do 
it as ECP mode is (the article says) not supported on PCI cards which 
(the article says) do not support DMA. EPP works with hardware support 
by monkeying with the bus wait states -- and that should raise red flags 
about loss of precision in the timing and about clock jitter.

Perhaps I just haven't been paying attention (a good possibility in this 
matter), but it seems to me that parallel ports these days tend to be 
ECP rather than EPP. Perhaps support for both modes is common; I don't 
do much PC hardware work.

This article gives more detail on how ISA cards are able to do 2 
megabytes per second. The method is _comparatively_ simple and I would 
_expect_ it to suffer less timing and jitter, but I'm not at all 
certain. And there is the fact that not many systems these days are 
built with ISA slots other than perhaps a compatibility mode.

Now, in general, the process of sending a signal through a parallel port 
involves asserting a signal on to the lines, and when the lines have had 
time to settle, asserting a strobe pulse on a separate line. The 
destination then takes a snapshot of the state of the line, usually 
triggered by the strobe line (leading vs trailing edge is defined in the 
standards but not always adhered to), with there being a window during 
which the source is expected to hold the lines steady (keeping in mind 
signal propagation time). After that the parallel lines are supposed to 
return to ground state -- parallel doesn't inherently mean "synchronous" 
(other than for the 8 data lines): except in the advanced modes the 
general assumption is that it will be a random amount of time before 
there is more data to be transmitted, so except perhaps in some of the 
advanced modes, two output bits in a row that happened to be the same 
would cause two separate drive-up and release-down on the pin, rather 
than just leaving the line in its last state until it is known to need 
to change.

The implication of this for your purpose is that you are going to have 
trouble getting your bit timing to be precise: you may get a million bit 
samples per second, but those are transferred as short-term samples of 
the state of the lines rather than through precise timing of the line 
states themselves. From the beginning of the cycle until the strobe, the 
data line is allowed to slew (and it probably will, as there is no 
inherent active de-bouncing in the technology and the lines will be 
moving from ground each time.) And then again after the strobe period 
slew is allowed.

Really, if you wanted to do more precise bit-hold timing with parallel 
ports, you should be working with the control bits rather than the data 
bits -- some of the control bits are defined as being holdable for 
extended times. The problem with that approach, though, is that you 
would have to do it through low level software control, perhaps in SPP 
mode (10 I/O cycles per byte), and you would never be able to get the 
data rates that you want if you used those modes. The higher the data 
rate you want, the more the work of the control pins is delegated to 
special-purpose state-engine hardware...

So what is the summary here?

A) That if you need precise timing, you are better off using a digital 
control of a device that generates the signal, whether that device be 
custom or a signal generator; and

B) If data rates is the aim rather than signal timing, by the time you 
want data rates of 1 megabits per second, you should probably give up on 
asynch serial or parallel ports, and should instead move to synch 
systems such as T1 or E0 lines, or to ethernet. A bit timing of 1 
megahertz on a four-wire connection is no problem; the E0 maximum rate 
is 1.544 megabits per second (T1 data rate is exactly 7/8 of that.)
8/23/2010 5:33:12 AM
@walter robertson

Thank you for the reply.
9/8/2010 5:04:04 AM
Similar Artilces:

US-TX-Austin: DSP Eng., Digital Signal Processing Exp., DSP/Algoritm bckgrnd; DH (45315414402)
US-TX-Austin: DSP Eng., Digital Signal Processing Exp., DSP/Algoritm bckgrnd; DH (45315414402) ============================================================================================== Position: DSP Eng. Reference: SMC01597 Location: Austin TX Duration: DH Skills: Digital Signal Processing Experience. Solid DSP/Algorithm/Communication theory background. Firmware implementation knowledge preferred. BSEE, Master's Preferred - GPA 3.75 or better. Please send your current resume in confidence to <staf...

A lot of web sites have restrictions on the maximum file size that can be posted. Let's say it 100 kB. So I'd like the file size to be as large as possible without going over 100 kB. I have an action in PS 7 that is hands-off except when it gets to Save For Web. I find that I have to set the dialog toggle to "on" for that step since unless I manually go into the Optimize menu to bring up the Optimize To File Size window (which comes up with the default size of 100 kB) and click okay, it won't actually optimize the file size to 100 kB. Anyone know of a way to get this to...

Need "good" real world examples of class/pattern use in PHP
Hi everyone I need to move on a step in my PHP... I know what classes are, both in PHP4 and 5 and I'm aware of "patterns" existing, but what I'm looking for are some real world projects eg. Open Source that people consider to use classes and patterns correctly. I lack a senior person to lead me in this so I feel I'm losing out on only using bare PHP class features and not really knowing how to design proper base classes and use inheritence and patterns etc. in real world scenarios. Can anyone point me to some good real world examples such as open source projects that...

analog and digital signal generation
Hello, &nbsp; I would just like some help with my code. The purpose of my interface is to generate an analog &nbsp;output triangular signal that runs my system; it then measures the analog response of the system to the triangular voltage that I have just supplied and displays this on screen. However, at the same time, it is providing a digital signal that controls a multiplexer. At the moment, my code doesn't seem to work, but when I remove the multplexer from my system and delete the digital signal generation, it works. So could someone please let&nbsp;me know how to include ...

New MMORPG Trading and Auction (using game currency) website
Hi all, I finally opened my trading website. It is called Gamer Trades. I posted about it here before it was open and I was asked to post back here when it was officially opened. The url is: It currently supports Guild Wars, Star Wars Galaxies, and World of Warcraft. More games will be added soon. Basically, the site lets you start eBay style auctions using gaming currency, not real money. You can also trade an item for other items. Check it out, and if you want to help out with the site you can send me an email. I still have a lot of work to do with the site be...

Oracle Report Generator
Hello everyone, We are looking for beta-testers for our new product - Scribe Report Generator. At the moment, Scribe supports 5 relational databases, including MS SQL Server 2000, Sybase and Oracle. Very briefly: Scribe is written in Java, is based on visual programming and can be extended by adding user-written Java classes; it comes with the API library to let other Java-based apps run Scribe reports programmatically. The details are on our website: (temporary location). User: guest Password: star We offer a free license to everyone who provides us with a feedback...

Hi All, I have wrapped SQLite, the open-source relational database and ImageMagick, the open-source image manipulation library into a client-side web-operating-platform that is accessible directly from Javascript running in the browser using XmlHTTPRequest. The platform also includes controlled private access to the file system, allows you to cross-site script without the need for a proxy-server on your site, and also lets you set up event handlers for when your site is not accessible. The client application is called eclayer and is available from . Works on Windows &a...

How to use all threads for computation?
I am currently using matlab 2009b on an i7 computer, which has four cores with hyper thread technology. Therefore, there are "8" cpus. However, I can only utilize 4 of them by using command "matlabpool 4". When I ran the program, the maximum cpu usage was only 50%. Is there any way that I can utilize all of 8 "cpus"? Thanks a lot. ...

Work around of using 1D-LUT instead of 2D-LUT
Dear All, I originally have a look up table of size UInt8[256][256]. However, there is a restriction that just 1D look up table of size UInt8[256] can be use. The no. of UInt8[256] tables to be used is not limited. Are there any simple method for me to constructing many 1D look up tables of UInt8[256] so that the same result can be obtained as if the 2D-LUT UInt8[256][256] is used? Note that the 1D-LUT can just have max. no. of element of 256. Ans just +,-,*,/ operations can be used. Thank you, Jason ...

xsl prg when using forloop
xsl prg when using forloop ------------------------------ <xsl:template> <xsl:call-template name="forloop"> <xsl:with-param name="i" select="number(1)" /> </xsl:call-template> </xsl:template> <!-- forloop function() emulation --> <xsl:template name="forloop"> <xsl:param name="i">0</xsl:param> <xsl:if test="number($i) &lt;= 10"> Printed '<xsl:value-of select="$i"/>' time(s) <br /> <xsl:call-template name="forloop">...

US-TX-Austin: Digital Design Engineer;Verilog,mixed-signal design,simulation too (45349814404)
US-TX-Austin: Digital Design Engineer;Verilog,mixed-signal design,simulation too (45349814404) ============================================================================================== Position: Digital Design Engineer Reference: ZYD00006 Location: Austin TX Duration: Skills: BSEE (MSEE preferred) with experience ranging from 3-8 years. Verilog; Mixed-signal design and simulation tools; DSP architectures, synthesis tools, and Audio signal processing. Communications knowledge and experience with bus inte...

inserting linked picture into powerpoint using actserver
Here's my code so far, which works fine: ppt = actxserver('PowerPoint.Application'); set(ppt,'Visible','msoTrue') op = invoke(ppt.Presentations,'Add'); slide_count = get(op.Slides,'Count'); slide_count = int32(double(slide_count)+1); new_slide = invoke(op.Slides,'Add',slide_count,11); pic_path = 'C:\MATLAB71\work\yatta.bmp'; pic2 = invoke(new_slide.Shapes,'AddPicture',pic_path,0,1,200,200); But then I can't change the type property of the picture I've added. I want the picture to be inserted as a linked picture. Righ...

Re: Re[2]: access violation using wxTreeCtrl
He is still here. He can't go anywhere. Says so in his signature ;-) Thank you. -----Original Message----- >From: Vadim Zeitlin <> >Sent: Mar 7, 2008 12:40 PM >To: >Subject: Re[2]: access violation using wxTreeCtrl > >On Fri, 07 Mar 2008 13:02:28 +0100 Harry <"harry dot news at armadillo dot fr"> wrote: > >H> Vadim, are you still there ? > > Yes. (Un?)fortunately I have some other things to do in the life than >working on wxWidgets. I will test more and...

Iterative use of PROC GENMOD
Hi (SAS-Newbie - SAS 9.1) I'm trying to fit a non-linear GEE model by iterative use of PROC GENMOD. My problem is that I don't know how I extract the estimates from one iteration and use them in the next. Hope someone can help me. Thanks. RHO To track the estimate ods table, use following code. And then use ods output ... statement. ods trace on; proc genmod.... ods trace off; On 9/26/06, rho1962 <> wrote: > Hi > (SAS-Newbie - SAS 9.1) > > I'm trying to fit a non-linear GEE model by iterative use of PROC GENMOD. My > problem is that I ...

Find/replace with floating point precision in VIM
I have a text file containing coordinates with the following syntax: --- Point(9 m,4.234 m,88.850 m) Point(-9 m,4.234 m,88.850 m) Point(-9 m,-17.766 m,88.850 m) Point(9 m,-17.766 m,88.850 m) --- Is it possible to do a find/replace in VIM, where say the last number (88.850 in this case) gets replaced by an increment of say 4.2 ? 2008-11-4, 01:31(-08), haakon: > I have a text file containing coordinates with the following syntax: > > --- > Point(9 m,4.234 m,88.850 m) > Point(-9 m,4.234 m,88.850 m) > Point(-9 m,-17.766 m,88.850 m) > Point(9 m,-17.766 m,88...

Hi all I have made a loop which outputs a number of numbers. Ie e=123 or e=125. I would like to count the frequency of the numbers. How would I do this. Thanks Sarah <> wrote in message <>... > Hi all > > I have made a loop which outputs a number of numbers. Ie e=123 or e=125. I would like to count the frequency of the numbers. How would I do this. > > Thanks Hi Convert number to string and get the length of string e.g x=1234; length(num2str(x)) HTH, Sai...

Using anonymous functions with Curve Fitting Toolbox
Is it not possible to use anonymous functions when defining a nonlinear fit model using the Curve Fitting Toolbox? I have an m-file named 'planckian.m' which computes the blackbody radiation as a function of frequency for a given temperature, ie L = planckian(x, T) returns a vector of intensities L for an input vector of frequencies x and a scalar temperature T. I also have an anonymous function tau that returns a transmission value at a given frequency x, i.e. tau = @(x) interp1(wavenumbers, transmittance, x) Both wavenumbers and transmittance are defined and I can use tau without...

Generate matrice with positive eigenvalues
Hi, How can I generate a 100x100 matrix with positive eigenvalues? Thanks, Alan One way: M=rand(100); A=M'*M; HTH, Greg Alan wrote: > > > Hi, > > How can I generate a 100x100 matrix with positive eigenvalues? > > Thanks, > > Alan On 2006-10-24 22:22 Alan said the following: > Hi, > > How can I generate a 100x100 matrix with positive eigenvalues? > > Thanks, > > Alan Hi Alan! Here are som hints: What happens if you have an n by n array V and orthogonalize it? What happens if you multiply V by V.' (the transpose of V)? Imag...

How to use GUI
It is in continuation of my Hindi to Unicode font transliteration program that is successfully working in perl. The program runs from msdos prompt. It reads a input file and converts the contents to give an output file in utf8 encoding. However, now I want to do away with dos part, and want it to work under winxpsp2. I want it to have a input text box in which I would paste the contents from clipboard (text copied to clipboard from some other software). I will press a key to convert, and it should give me the converted rtf8/unicode text in another text box which I should be able to copy to...

Adding two numbers of high precision results in a number of low precision??
Hi, I have the following question. In a pretty long code (so I won't send everything) at some point the following loop occurs: > For[i=1,i<=3,i++, > bTemp[i,0,j]=bTemp[i,0,0]+Q[i,j]; > Print["Precisie bTemp[",i,",0,0] = ",Precision[bTemp[i,0,0]]]; > Print["Precisie Q[",i,",",j,"] = ",Precision[Q[i,j]]]; > Print["Precisie bTemp[",i,",",0,",",j,"] = ",Precision[bTemp[i,0,j]]]; > ]; (* einde For *) ("Precisie" is Dutch for "precision&qu...

Matlab/Ansys Optimization with fmincon (Input variables not changing)
I am currently working on getting matlab to run an ansys model, retrieve principal stresses, and feedback into a matlab optimizer, specifically fmincon. My issue is not one of communication of variables (everything seems to be passing well between the 2 programs), however, fmincon evaluates the objective function with the same design variables for every iteration. In other words, it takes my initial guess and uses it for every iteration as if it is not changing the input variables based upon the feedback it is receiving. I have the same problem regardless of the initial guess I make. If I ...

problems redirecting an open file to stdin using dup2()
Hello, I have a module that is part of larger project that is giving me trouble, so I setup an example. Brief ===== I simply want to open a text file and make the contents avaliable through stdin that way a bourne shell script I wrote will execute properly. The shell script is expecting input from stdin. This program will be executing on a UNIX machine and communicating with the shell. Code =====START====== #include <stdio.h> #include <stdlib.h> const char cmd[] = "./" ; /* Shell Script */ const char FILE_NAME[] = "tf.txt" ; /* File to open */ ...

Market Growing for Refurbished, Used iPods
By Antony Bruno The popular iPod Nano and the just-released video iPod are expected to lead a surge of holiday sales for Apple Computer. Research firm Fulcrum Global Partners predicts Apple will sell 10 million iPods in the fourth quarter, a strong follow-up to the 7 million sold in the previous quarter. But not all of these sales will be to new iPod owners. Piper Jaffray analysts say about 30 percent of the iPod purchasers are now repeat buyers who are either replacing an existing, earlier-generation iPod or adding to their range of styles (such as an iPod Shuffle and a video iP...

newbie: precision question
I'm a newbie learning python, so forgive for, what may seem to some, like a stupid question. I understand the basic integer and fp type, but what I'm having a little trouble are the long type and infinite precision type. Also, when I do >>> math.pi - (math.sqrt(math.pi))**2. I get >>>4.4408920985006262e-016 Please, could someone in just a few words, in newbie speak, explain why does that happen ? And what do the types actually mean ? What I mean, how can something have infinite precision but still not return zero as a result. (Btw, I always thought floating poin...

special symbol when use in matrix enlarging
x=12; p=[]; p=[p x'];//what is the meaning of ' You are adding an element to p. I'd imagine you found this code in a loop. So, let's assume p already has a few values in it x = 6; p = [1:5]; % creates an array p = [p x]; % adds element x to array % also '%' is utilized for comments this will give you p = 1 2 3 4 5 6 akira32 wrote: > > > x=12; > p=[]; > p=[p x'];//what is the meaning of ' hi, the single quote ('), makes the matrix transpose, see the help files on 'arithmetic operations'. when you concatenate arrays you need to...