Dallas DS18B20 - problem with address decoding
I am implementing my own SW for getting data from DS18B20, but I've been stuck on decoding address for a while - "receiving" only zeros as a result. Here is my code: #include <avr/io.h> #include "DS18B20_driver.h" #include <util/delay.h> #include "debug_uart.h" //delete #include <stdio.h> //delete //High_level_funcitons void dallas_get_address(uint8_t* address){ reset_pulse(); _delay_ms(2); write_byte(0x33); //READ ROM command; read_rom(address); uart_send_string("Dallas address is: \n"); for(int j = 0; j < 8; j++){ char buffer[3]; sprintf(buffer, "%02X", address[j]); uart_send_string(buffer);
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.