Re: Confused about synchronous communications




"Jan Panteltje" <pNaonStpealmtje@xxxxxxxxx> wrote in message
news:fd0vdn$5ru$1@xxxxxxxxxxxxxxxxxx
On a sunny day (Fri, 21 Sep 2007 16:46:53 GMT) it happened "Jon Slaughter"
<Jon_Slaughter@xxxxxxxxxxx> wrote in
<1ASIi.6266$FO2.4616@xxxxxxxxxxxxxxxxxxxxxxxxxx>:

For your i2c communication it seems like you don't you any interrupts or
polling? If thats the case then I shouldn't have any problem. Although
I'm
reading up on kernel mode drivers in windows at the moment I really don't
want to go that route if I don't have too.

Thanks,
Jon

i2c has the advantage that it works on a multitasking system (Linux or
mswindows).
If the communication is interrupted by a task switch, the system will just
wait
a few milliseconds.
'polling' does not apply here, as you can change the clock (scl), and then
read the
input (sda), so you have full control.
The routines have a delay that you can set (soft delay), in a more modern
version
in Linux one could use usleep(), a non-clockspeed dependent delay.

What I plan on doing is timing how long it takes to send a bit to the
port... actually it takes about 3us in my C++ non-managed code using a
kernel mode driver and it about 7us in C#. I'll time a delay routine so I
know just how much to delay. The only problem is that task switching will,
in general, extend these delays quite a bit. But if I don't have to poll
then its no problem.

Essentially if all communications is governed by the clock line, the master
is the only one that can control it, and arbitrary frequency shifts in won't
screw up the communications then its no problem.

I believe all are true but I'm not 100%.

Thanks,
Jon


.



Relevant Pages

  • Re: Confused about synchronous communications
    ... For your i2c communication it seems like you don't you any interrupts or ... If the communication is interrupted by a task switch, ... 'polling' does not apply here, as you can change the clock, and then read the ... The routines have a delay that you can set, ...
    (sci.electronics.design)
  • Re: MVME5100 memory write access over 1Kb crashes card
    ... Assuming that you are using TCP/IP for communication between the ... cards using the VME dual-port RAM, the problem is probably that you ... your interrupts area (the first 4 interrupts, ...
    (comp.os.vxworks)
  • Re: Help speed up RS-232 communications!
    ... communication to a custom PCB. ... I set the connection settings such that the input buffer is not ... delay is coming from would be extremely helpful. ...
    (comp.soft-sys.matlab)
  • Re: Access STIMER(M) from COBOL program?
    ... This function (and CEEDLYM for delay in milliseconds) are available ... message is not the intended recipient or an authorized representative of the ... communication is strictly prohibited. ... attachments from your system. ...
    (bit.listserv.ibm-main)
  • Re: once upon a time... : linked tables
    ... once upon a time I read that the communication with the back end ... If you keep a persistent connection then that delay happens only once. ... You don't really have to create a "useless table" to do this though. ...
    (comp.databases.ms-access)