Author |
Message |
Topic: INT_SSP w/ INT_RB |
TYDOM17
Replies: 7
Views: 14010
|
Forum: General CCS C Discussion Posted: Mon Jun 26, 2017 10:16 am Subject: INT_SSP w/ INT_RB |
Ttelmah,
Great information, thanks for sharing! |
Topic: INT_SSP w/ INT_RB |
TYDOM17
Replies: 7
Views: 14010
|
Forum: General CCS C Discussion Posted: Mon Jun 26, 2017 9:03 am Subject: INT_SSP w/ INT_RB |
PCM programmer,
Here is my interrupt enable code:
/////////////////////////// INITIALIZE INTERRUPTS ///////////////////////////
ENABLE_INTERRUPTS(INT_SSP);
ENABLE_ ... |
Topic: INT_SSP w/ INT_RB |
TYDOM17
Replies: 7
Views: 14010
|
Forum: General CCS C Discussion Posted: Fri Jun 23, 2017 4:34 pm Subject: INT_SSP w/ INT_RB |
from page 125,126 of the datasheet, all RB0-7 have a programmable weak pull-up available.
On my schematic:
B0 floating
B1 is pulled high through external 2k resistor
B2 is pulled high through ex ... |
Topic: INT_SSP w/ INT_RB |
TYDOM17
Replies: 7
Views: 14010
|
Forum: General CCS C Discussion Posted: Fri Jun 23, 2017 4:27 pm Subject: INT_SSP w/ INT_RB |
PCM programmer,
Thank for the quick response.
I have defined pullups as follows in my main prior to enabling INT_RB:
////////////////// PORT B SETUP FOR INT_RB ////////////////////////////////// ... |
Topic: INT_SSP w/ INT_RB |
TYDOM17
Replies: 7
Views: 14010
|
Forum: General CCS C Discussion Posted: Fri Jun 23, 2017 4:01 pm Subject: INT_SSP w/ INT_RB |
Hello PicMasters,
Wondering if anyone else out there has used INT_SSP with INT_RB at the same time and run into the problem of I2C communication spuriously triggering INT_RB interrupts?
I can post ... |
Topic: I2C Clone |
TYDOM17
Replies: 8
Views: 16544
|
Forum: General CCS C Discussion Posted: Thu Jun 15, 2017 4:17 pm Subject: I2C Clone |
Yikes, I found my mistake.
Sometimes typing things out really forces you too look at everything.
My mistake was in responding with multiple i2c_write commands back to back in my ... |
Topic: I2C Clone |
TYDOM17
Replies: 8
Views: 16544
|
Forum: General CCS C Discussion Posted: Thu Jun 15, 2017 1:44 pm Subject: I2C Clone |
Sorry in advance for the long reply – I’ve tried to keep this short.
Prototype ISR routine works
I now have a working prototype at my desk with master and slave getting along nicely using the ... |
Topic: I2C Clone |
TYDOM17
Replies: 8
Views: 16544
|
Forum: General CCS C Discussion Posted: Tue May 16, 2017 4:29 pm Subject: I2C Clone |
Thanks for the help jeremiah,
You are right I was reading the I2C address as data, I will remove this.
I will follow the example in the book and then run a check on the address byte value outsid ... |
Topic: I2C Clone |
TYDOM17
Replies: 8
Views: 16544
|
Forum: General CCS C Discussion Posted: Tue May 16, 2017 1:34 pm Subject: I2C Clone |
All,
I'm trying to clone the I2C slave behavior of an obsolete part.
What's working now
Today I can talk between master and slave using the example slave and 2401.c examples. I can request and ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Tue May 02, 2017 2:46 pm Subject: I2C Problems after Porting To PIC18F25K22 |
update:
After cutting almost all I2C code from the INT_EXT (in my case I must have I2C enabled and read registers from the accel to clear a latch 1st) the program is behaving very well.
It did ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Wed Apr 26, 2017 8:55 am Subject: I2C Problems after Porting To PIC18F25K22 |
PCM programmer/Ttelmah/jeremiah,
Thank you for the great input, you all clearly have some great experience to draw from. I will be making some changes to the interrupt routine including the removal ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Tue Apr 25, 2017 4:34 pm Subject: I2C Problems after Porting To PIC18F25K22 |
I have disabled SR, CCP4 as follows:
#byte SRCON0 = 0xF47 //SR LATCH
#byte SRCON1 = 0xF46 //SR LATCH
#byte CCP4CON = 0xF57 //SR LATCH
SRCON0 = 0x00; //SR LATCH DISSABLED
SRCON1 = 0x00; / ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Tue Apr 25, 2017 12:55 pm Subject: I2C Problems after Porting To PIC18F25K22 |
Ttelmah,
I am looking at pages 142,143 of the data sheet now - your are right that there are quite a few more peripherals than the 20k part.
I can set the appropriate SLRCON and CCP3COM registers ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Tue Apr 25, 2017 11:31 am Subject: I2C Problems after Porting To PIC18F25K22 |
PCM programmer,
Tried the FORCE_HW and no change in behavior while running the I2C scanner test code.
However after some messy code drag and drop in my main application loop I am able to talk to ... |
Topic: I2C Problems after Porting To PIC18F25K22 |
TYDOM17
Replies: 15
Views: 30056
|
Forum: General CCS C Discussion Posted: Tue Apr 25, 2017 10:07 am Subject: I2C Problems after Porting To PIC18F25K22 |
1. Before you do that, check if you accidentally swapped the SDA and SCL
lines going to the Si7021 chip on your new board layout.
2. If possible, check for continuity between the PIC and pins ... |
|