Hello, I'm new to developing microcontrollers and I have recently started using the FRDM-KE06Z. I'm trying to interface with a VL6180x for a university project but I cannot understand how to use I2C to interact with it. I have done a few tutorials on processor expert which I assume I should be using (Codewarrior IDE).
Any help or similar tutorials would be great.
Fraser
( http://www.st.com/content/ccc/resource/technical/document/datasheet/c4/11/28/86/e6/26/44/b3/DM001126... proximity time of flight sensor I'm using)
Hi Fraser Law,
If you want to use the FRDM-KE06 work with your I2C light sensor, you need to know these points:
1. KE06 I2C code,
You can refer to the sample code, please download it from this link:
FRDM-KEXX Driver Library Package
You can find the code in folder:KEXX_DRIVERS_V1.2.1_DEVD\kexx_drv_lib\build\iar\ke06
There has two master I2C code:I2C_MasterInt_demo and I2C_MasterPoll_demo.
I2C_MasterInt is the I2C interrupt code, I2C_MasterPoll is the polling code.
2. Know the I2C communication data which your sensor needed.
You can check your sensor datasheet, find the what I2C command, data it need, then use the KE06 as the I2C master to send these data, and get the according data from your sensor.
You can modify the code in the official KE drivers which I recommended you .
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I'll try have a look tomorrow and let you know - thank you!
Hi Fraser Law,
OK, any question after you check it, just let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
http://www.utasker.com/kinetis/FRDM-KE06Z.html
This contains KE06 I2C support and also simulation so that it is easy to use, study and connect to other devices.
Regards
Mark