I replaced the UNO with a 4808 (on my PCB), and just get nothing. I used a scope to measure the DQ pin, and cannot see any communication.
If I use blink on PIN_PD6 I see the single changing.
I used the "One wire" and "dallas" libraries and the arduino code (single sensor) as in the link I sent.
This works fine.
I then disconnected the UNO and connected my 4808 board (32pin) which has the MegaCoreX.
I just updated the sensor pin to: #define ONE_WIRE_BUS PIN_PD6
/*********
Rui Santos
Complete project details at http://randomnerdtutorials.com
Based on the Dallas Temperature Library example
*********/
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS PIN_PD6
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void)
{
Serial.begin(9600);
sensors.begin();
}
void loop(void){
sensors.begin();
sensors.requestTemperatures();
Serial.print("T=");
Serial.println(sensors.getTempCByIndex(0));
delay(1000);
}
But this does not work. and I don’t see any communication when probing DQ leg with my oscilloscope.
As I can figure out, there is something that does not work with the "one wire" and the 4808.