Timing in Synch Comm.

How critical is keeping the timing relatively stable in synchronous communications? Obviously the slave is synched to the master's clock but is there ever any problems if the clock timing is extremely unstable? Say varying up to 10% on average but even peaking to 100% or more in rare circumstances.

I'm writing a windows app which sends data to the parallel port but because its pre-emptive there can be extreme latency in the timing. The data is always synched with the clock so there is no issue with that but just of the clock's frequency varying a great deal. I imagine since its synchronous comm. that it should matter but just wondering if there are instances it could?

Lets say, for example, that its a clock at 1Mhz but then stops completely for several ms. Could this cause any problem with any device?

I know its the nature of synchronous devices only to send/recv data on a clock transition and it would seem that frequency variations wouldn't matter but I just want to be sure that its not going to be an issue.

Thanks, Jon

Reply to
Jon Slaughter
Loading thread data ...

Yes, it can cause problems in some cases.

AVR Mega644 is indeed sensitive to the SPI clock irregularities while being programmed. It causes the programming to fail. I suppose the other new AVRs are sensitive to this, too. The older AVRs don't have this problem; you can interrupt the process at any moment for any long time.

This can be the issue - it is a fact. We can only speculate why it happens; perhaps, the internal state machines may have a timeout protection or something. I didn't believe it before I encountered that problem myself.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I believe the OP wasn't talking about SPI. But with SPI you are right. Many devices, even simple DACs and ADCs have time-out circuits in there and when SPICLK hasn't come for a certain period of time during a transmission they will abort for the affected data set.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

What else is the PC parallel port can be used for if not for the simulation of the SPI or I2C by bit banging?

I keep the 14-year old PC with Win98 exactly for this purpose: it is often the quickest way to get something to work.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Hey, I still print over it. Ok, I have a network printer but also another one here in the office that gets shared by a LPT auto-switch between two PCs. It's quicker to print and I don't have to get off my keester :-)

Yep, often the old stuff works better than anything that came later. This is also why there are things such as the old Eico tube voltmeter in the lab. That thing remains completely unfazed should a spike come along.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Actually I'm trying to do it any synch communications. SPI, I2C, and ICSP will be some of the protocols I'll try and implement. Kinda sucks that there is at time out and since SPI doesn't have an acknowledgement it makes it even works ;/

Reply to
Jon Slaughter

Thanks. This isn't what I wanted to hear though ;/ Is this a hardware issue or was it designed that way? If its designed that way then maybe its ok to some degree... unfortunately with SPI there is no way to know if it timed out or not?

Jon

Reply to
Jon Slaughter

There is no point in developing anything for the parallel port now. This is what you need:

formatting link

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Well, I wanted to hook directly up to some devices with minimum external circuitry. Eventually I might add support for usb and some other devices but at this point all I have is the parallel port.

I'm essentially just making something that is similar to WinPic. So if I wanted to program so some pics or play with some controllers that use some some communications method I could do it quite easily by just typing in the commands and have the program do the rest(its more work than that but it would only need to be done once).

Thanks, Jon

Reply to
Jon Slaughter

Yep, that's the modern way. Just keep in mind that many of those types of chips will only work as bus masters.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

But keep in mind that when your PC croaks the new one might no longer have a parallel port. Adapters might be available for a while but aren't

100% the same. Then all your work could be flushed down the drain. Personally I'd go RS232 since USB-RS232 should be available for a long time.
--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

The datasheet will usually tell you.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

The FT2232 can be glacially slow for bitbanged serial protocols.

Reply to
Paul Burke

BTW, in the old good DOS, it is possible to sample the LPT port with the rate of up to about 1.5 MHz. In many cases, this allows for the simulation of the slave modes as well as sniffing on the serial protocols.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I do that with a Dolch logic analyzer. From pre-DOS days :-)

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Joerg snipped-for-privacy@removethispacbell.net posted to sci.electronics.design:

I would not bet on that either, while USB ip is cheap ethernet ip is free like RS232 and RS485.

USB will survive in applications where "provable" hardware connections are still valuable (DRM). Eventually even that will collapse.

Reply to
JosephKK

But neither is easy from within applications such as Office. Most lab gear I have uses the old RS232 protocol over USB but to me as the user the fact that it's a physical USB layer becomes transparent. I can talk to it via Hyperterminal just like usual.

Considering USB/s market penetration I doubt that. USB simply works. What should possibly replace it anytime soon? Ok, wireless but that'll be a while.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.