deperkin
Joined: 04 Feb 2009 Posts: 83 Location: PA
|
i2c affecting interrupts |
Posted: Fri Apr 17, 2009 7:38 am |
|
|
Hello all!
I am trying to implement (and get working correctly) my i2c bus and RS232. I would also like to use interrupts.
I don't believe there is a need to post the code I have for this yet, since I have a vague question.
Am I really stuck with using the SCL and SDA pins?
I would prefer using these (on my 18F2331) for interrupts.
Since I only have three interrupts I would rather use these pins for INT1 and INT2 and have i2c communicate using two other pins.
Is this possible??
I have:
Code: | #define LCD_XMIT PIN_A3 //LCD serial transmit
#define LCD_RCV PIN_A3 //pin reused (receive not required
#define DEVICE_SDA PIN_C4 //i2c SDA line
#define DEVICE_SLC PIN_C5 //i2c SLC line
#define RS232_XMIT PIN_C6 //RS232 serial transmit
#define RS232_RCV PIN_C7 //RS232 serial receive
//**************************************************
#use rs232(baud=2400,parity=N,xmit=LCD_XMIT,rcv=LCD_RCV,bits=8,invert,stream=LCD)
#use rs232(baud=115200,xmit=RS232_XMIT,rcv=RS232_RCV,parity=N,bits=8,stream=COMP)
#use i2c(master,sda=DEVICE_SDA,scl=DEVICE_SLC) |
Thanks as always,
deperkin |
|