I am wondering if anyone has tried communicating with I2C/TWI Devices under bit cloud,( specifically Serialnet)
I need to send a code to an external device and also read data back
I am using Serialnet 2.6 on custom hardware
Any basic examples would be appreciated.
Thanks
Phil
[Bitcloud 128RFA1]I2C send and read
Any info on this? now migrating to zigbit 900, serialnet. need to send some initialisation data to a sensor chip, and read back the results.
the chip is working well, all hardware is done, I am using Peter Flury's TWI library on my test board currently, but as I move the board to bitcloud, I want to ensure I can format it correctly as to not upset bitcloud :) any basic examples on how to send 1 byte to a device, then read 1 byte back within bitcloud would be helpful.
thanks
LM73 BSP driver from ZigBit SDK is a good example.
yeah, looking through that now.
To add that to the serialnet program, do I have to implement the whole sensors.c program, or can I cut it down a bit?
Just use i2c-related HAL_* functions, there are like 3 of them.
thanks Alex
I want to implement in Bitcloud a driver for a sensor that use I2C protocol to communicate .
I am following the LM73 BSP example. In that example there is:
#define LM73_DATA_REGISTER 0x00 #define LM73_CONFIGURATION_REGISTER 0x01 #define LM73_UPPER_LIMIT_REGISTER 0x02 #define LM73_LOWER_LIMIT_REGISTER 0x03 #define LM73_CONTROL_STATUS_REGISTER 0x04 #define LM73_IDENTIFICATION_REGISTER 0x07
but they are not used.
I don't understand how to use*i2c*-related HAL_* functions to read, for example, LM73_CONFIGURATION_REGISTER.
Just use plain TWI register access, I'm pretty sure there is a code that works with LM73 somewhere on the net.
I want to use humidity sensor SHT21. Can you explain:
Just use plain TWI register access
?
Read chapter 25 of the datasheet ("2-wire Serial Interface"). It should give you enough information on how to write your own code.
Hello!
If i search for "2-wire Serial Interface" on Atmel site, there is nothing that show an i2c*-related HAL_ implementation example. I just want to see an example of code using those functions. Is there any document about that?
Thank-you!
This post is from 3 years ago. Please don't reply to old topics. If you struggle to find what you're after start a new topic.
While the chip you're using is an ATSAMR21, wireless chip, it woul dbe best to ask this question on the arm forum. Another suggestion is to use google as it has a better search engine or change your search criteria.
Finally, ASF comes with an example, if you search in relation to it, you would come up with an example similar to: http://asf.atmel.com/docs/latest/sam0.applications.asf_programmers_manual.atsamr21/html/asfdoc_sam0_sercom_i2c_slave_callback_use_case.html