cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

Hello everybody,

   

can somebody please help me to resolve my problem? Actually there is no communication between ADXL345 and PSOC4 BLE. I used both I2C Slave Addresses Ox1D and Ox53--> No reaction 

   

In attachment you find my project.

   

regards

   

Ziad

0 Likes
1 Solution
rola_264706
Honored Contributor II

Did you put pull up resistors on the Data lines? Also to use address 53 you  must ground pin 12 on the chip. Also the pins you selected don't seem like they are correct.  I un-clicked the lock on the pins and regenerated the program an it moved the pins.

View solution in original post

0 Likes
6 Replies
rola_264706
Honored Contributor II

Did you put pull up resistors on the Data lines? Also to use address 53 you  must ground pin 12 on the chip. Also the pins you selected don't seem like they are correct.  I un-clicked the lock on the pins and regenerated the program an it moved the pins.

View solution in original post

0 Likes
Bob_Marlowe
Expert II

Line 22

   

  void ADXL345_GetGxyz(float* x, float* y, float* z);

   


is nonsense.

   

You have got multiple identical file names: I2C.c and I2C.h Your sources conflict with the generated files.

   

 

   

Bob

Anonymous
Not applicable

Thank you Bob, Thank you bobgoar,

   

1. I correct the nonsense to ADXL345_GetGxyz(&x, &y, &z);  and renamed the I2C.h and I2C.c in I2CMaster.h and I2CMaster.c.
2. I change the Pin for SCL and SDA like the program want after unlocked them and rebuild.
Actually the program don´t show any errors but the I2C still don´t work. Any additional suggestions?

   

In attachment you find my actual project.

   

regards

   

Ziad

0 Likes
Anonymous
Not applicable

Ok. I correct the function I2C_init1 and i have some signal on my Oxilloscope . But on the Bridge control Panel i use following operation: R 53@acc p  the system answer all the time with r 53- FF- p.
@bobgoar: my board have all ready an 10 Kohm Pull down resistor . See: https://learn.adafruit.com/assets/36127

   

regards

   

Ziad

0 Likes
Bob_Marlowe
Expert II

Sure? You need pull UP resistors 😉

   

 

   

Bob

0 Likes
Bob_Marlowe
Expert II

There is a misunderstanding about your stopbit and the way I2C works.

   

Writing to slave Count bytes
I2C_MasterWriteBuf(SlaveAddress,DataPtr,Count,I2C_MODE_COMPLETE_XFER);

   

Reading from Slave sending register byte first:
I2C_MasterWriteBuf(SlaveAddress,&RegAddress,1,I2C_MODE_NO_STOP);
I2C_MasterReadBuf(SlaveAddress,DataPtr,Count,I2C_MODE_REPEAT_START);

   


Bob