- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
does anyone have a App or library for using OneWire/1 -Wire EEPROMs, Sensors, with the XMC series?
Thanks
- Tags:
- IFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes i have some code for the DS18B20 Sensor with the xmc4500. Thats working with DAVE 4 Apps (Digital IO). I could share it over dropbox or you give me your mail adress.
Best regards
Andi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Andi_H ,
I have an XMC4700 and I'm trying to make it work with the DS18B20, do you still have the code and by any chance could send it to me.
Best regards,
nibu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are several libraries that can be ported easily.
https://github.com/jensnielsen/ds18b20
https://github.com/farshield/ds18b20
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response. I will test the links you provided.
Regards,
Ilde
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there are several libraries available for using OneWire/1-Wire EEPROMs and sensors with the XMC series microcontrollers. One popular library is the Dallas Semiconductor OneWire library which provides a simple interface for communicating with 1-Wire devices.
To use this library with XMC microcontrollers, you will need to modify the code to work with the specific hardware and pin configuration of your XMC device. Here is an example of how to use the OneWire library with the XMC1100 series:
#include <xmc_gpio.h>
#include "OneWire.h"
#define ONEWIRE_PORT P2_6
int main(void)
{
// Initialize GPIO module
XMC_GPIO_Init();
// Set the OneWire pin to output mode
XMC_GPIO_SetMode(ONEWIRE_PORT, XMC_GPIO_MODE_OUTPUT_PUSH_PULL);
// Initialize the OneWire library with the OneWire pin
OneWire_Init(&ONEWIRE_PORT);
// Search for all connected 1-Wire devices on the bus
uint8_t i;
uint8_t addr[8];
uint8_t count = 0;
while (OneWire_Search(addr))
{
count++;
}
// Print the number of connected devices
printf("Found %d 1-Wire devices.\n", count);
return 0;
}
Note that this is just a basic example and you will need to add additional code to read and write data to your specific 1-Wire devices. Additionally, you may need to adjust the pin configuration to match your specific hardware setup.