Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Generate an interrupt over I2C

Status
Not open for further replies.

PicChristmas

New Member
I have a light controller board with 18f2420 and would like to connect a 2nd board with an I2C bus. I'm looking for and easy way to pass the zero crossing (120 hz) interrupt from the 1st board to the second thru the I2C bus. The zero crossing must generate an interrupt or the slave poll the I2C so as act within 20 or 30 us of receiving the zero crossing. The plan is to use the same board for both the master and the slave but not have any AC components on the slave.
 
PicChristmas said:
I have a light controller board with 18f2420 and would like to connect a 2nd board with an I2C bus. I'm looking for and easy way to pass the zero crossing (120 hz) interrupt from the 1st board to the second thru the I2C bus. The zero crossing must generate an interrupt or the slave poll the I2C so as act within 20 or 30 us of receiving the zero crossing. The plan is to use the same board for both the master and the slave but not have any AC components on the slave.

My first thought is "why do you want to use an I2C bus?", do you already have other I2C IC's connected in the design?, or do you wish to connect multiple slave boards to the same bus?.

I2C is complicated and relatively slow, it's designed for a specific purpose - two wire communication between multiple IC's in electronics, simply to simplify the PCB layout.

If all you want to do is send an interrupt pulse all you need to do is connect single pins together and pulse the pin high (or low). The receiving PIC can either use 'interrupt on change on portb', or you could simply poll the pin? - depends what else it's doing?.

For that matter, why not just connect the zero crossing signal directly to both processors?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top