Shop OBEX P1 Docs P2 Docs Learn Events
I2C and Interrupts — Parallax Forums

I2C and Interrupts

jondukejonduke Posts: 3
edited 2007-08-31 21:41 in General Discussion
First thanks to all that have provided documentation, examples, and many answers. I am a bit overwhelmed
with all the information you guys have provided.

Over the years I have used the BS2 for several fairly simple projects- with success thanks to a great product.

Now I'm switching over to SX family primarily the 28 using the BASIC compiler, simply because its faster and cheaper.

My first SX28 project completed is a battery monitor/controller that used the example clock/timer to display total usage and timed periods.
I used an ADC0831 to monitor battery voltage and low voltage dropout, HIGH and LOW commands to clock and read data from the AD.
(And yes the code is clunky, but hey it works)

Problem statement: I want to use multiple SX-28 chips on different boards and use the modified clock/timer code with interrupt
for both time display (whole minutes) and to display voltage/status readings from other data collection boards. ( Seven segment data w/6 displays.)
I plan to use a 4Mhz resonator on each processor.

Question: Since the I2C is synchronous does it provide a workaround for the timing issues associated with serial data transmission and interrups? Iwould plan to
use Clock/Display board as the master.

Many Thanks to All,
jon duke

Comments

  • BeanBean Posts: 8,129
    edited 2007-08-31 19:34
    Jon,
    Yes I2C should not be affected by interrupts.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The first rule to being successful is "Learn from your mistakes",
    The second rule is "Be willing to make mistakes"
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • jondukejonduke Posts: 3
    edited 2007-08-31 21:26
    Bean,
    Many, Many Thanks
    jon duke
  • JonnyMacJonnyMac Posts: 8,941
    edited 2007-08-31 21:27
    Here's a demo that proves it. This [noparse][[/noparse]simple] program reads the time from a DS1307 and sends it to a terminal program using an ISR-driven UART.
  • jondukejonduke Posts: 3
    edited 2007-08-31 21:41
    JonnyMac,
    1 demo >= 1000 words
    thanks jon duke
Sign In or Register to comment.