- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure? You need pull UP resistors 😉
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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