Author |
Message |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Thu Jun 18, 2020 6:33 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
That was it! All I had was 150uf cap but it did the trick. There was nothing wrong with code or I2C bus, the spike from the sensor turning on was locking up the PIC. Thanks to everyone for their he ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Wed Jun 17, 2020 5:30 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
Ttelmah and PCM Programmer, I think you are on to something. I will try your suggestions and I'm thinking there is a power problem as well. Carefully hidden in datasheet it says the PAJ spikes to 80 ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 4:41 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
In thinking about it, I have an obvious question. Why does the PIC stop? If the PAJ is 'not ready' to run then when I send 0x72 0x01 to enable it, it should just have a NACK on the I2C line. And it ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 3:40 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
I changed the code section where I initialize the registers:
for (i = 0; i < 219; i++) {
data[0] = initRegisterArray[i][0];
data[ ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 1:15 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
void paj7620SelectBank(int8 bank) {
int8 ack;
int8 data[2];
data[0] = 0xEF;
data[1] = bank;
ack = i2c_transfer_out(PAJ7620_write,data, ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 10:02 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
I injected your #use statement but no luck, same results. I am firmly convinced there is no problem with the I2C bus, it must be failing on enable because some other register is not correct. I just ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 8:50 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
Unfortunately I spoke too soon. In the 'short' code example I selected bank 1 only once but that at start is really only waking up the PAJ, you have to do it twice:
paj7620SelectBank(1);
paj7620Sel ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 8:16 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
Sorry, in six posts above I had written PAJ7620_write is 0xE6.
I think you are on to something about the write to that register only. I changed the main code to:
void main() {
int ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Tue Jun 16, 2020 6:52 am Subject: I2C problem with sensor PAJ7620U2 [Solved] |
Ttelmah, good effort and I did try the SMBUS option that you suggested but same results. The board is fully compatible from 3.3V to 5V, it has voltage regulator and data line level shifters. Below i ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Mon Jun 15, 2020 4:41 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
// DEVICE ID
#define PAJ7620_ID 0x73
#define PAJ7620_write 0xE6
#define PAJ7620_read 0xE7
Pull ups are 2.2K. Also, please keep in mind the hundreds of other writes function correctly ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Mon Jun 15, 2020 4:13 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
It is hard to find on some of the datasheets. Check this out:
https://files.seeedstudio.com/wiki/Xadow_Gesture_v1.0/res/PAJ7620U2_Datasheet_V0.8_20140611.pdf
On page 8 (complete description), 33 (i ... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Mon Jun 15, 2020 3:19 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
Thank you for the suggestion. In a way that's what I tried to do with the mainloop:
MAINLOOP_WAIT() ; //10ms
if(count>0) count--;
if(count==1)
{
... |
Topic: I2C problem with sensor PAJ7620U2 [Solved] |
ddevices
Replies: 27
Views: 59556
|
Forum: General CCS C Discussion Posted: Mon Jun 15, 2020 1:45 pm Subject: I2C problem with sensor PAJ7620U2 [Solved] |
I have an I2C problem and any help would be very much appreciated. My chip is the PIC18LF2550 and compiler is PCWHD V5.093c. The I2C chip that I’m attempting to connect to is the PAJ7620U2 on DFRo ... |
|