PIC18F67J60 Ethernet ingest

Push DS18B20 readings from a Microchip PIC18F67J60 using the classic TCP/IP Stack in MPLAB X. Onboard Ethernet MAC/PHY and the same LAN HTTPS relay as the Uno shield.

Close-up of white Cat-5e Ethernet cables with RJ45 connectors
Probe JSON usually leaves the LAN over Ethernet or a nearby relay, not the public internet directly. Photo: DiscDepotDundee.co.uk. CC BY-SA 4.0

Microchip PIC18F67J60 has an onboard Ethernet MAC and 10BASE-T PHY. This sample is MPLAB X + XC8 C on the classic Microchip TCP/IP Stack (MLA Ethernet demo)—not Arduino, not Python, not Zephyr. Same ingest JSON over the LAN HTTP→HTTPS relay.

The MLA stack does not ship a maintained HTTPS client for Cloudflare. Keep the MCU on HTTP to a Pi/NAS relay, same pattern as Uno + W5100 and STM32 Zephyr.

Parts

Parts for a PIC18 Ethernet freeze probe
Part Why Buy
PIC18F67J60 board Onboard MAC + PHY + RJ45. PICkit / ICD for flash. Microchip PIC18F67J60 · Amazon search
Waterproof DS18B20 Default sample pin RD0 (change if your demo uses it). Adafruit DS18B20 · Amazon
4.7kΩ resistor Pull-up to the board’s 1-Wire VDD (level-shift if IO is 5V-only). Amazon 4.7k
Ethernet drop DHCP or static IP in the MLA demo. Relay host on the same LAN. Cat5e to your switch.

Wiring

  • DS18B20 VDD → board logic VDD (often 3.3V; check the demo schematic)
  • DS18B20 GND → GND
  • DS18B20 data → RD0, 4.7k pull-up (edit OW_* macros if needed)
  • RJ45 → LAN. PICkit for flash; UART for 115200 logs

Build and flash

  1. Open Dashboard → Devices and download PIC18 main.c (ingest path filled in).
  2. On a LAN host:
    python3 sketches/relay/push_https_forward.py --listen 0.0.0.0:8080 \
      --upstream https://thermaltrace.dev
  3. Set INGEST_HOST to that machine (dotted IPv4).
  4. Install MPLAB X + XC8. Open an MLA TCPIP Ethernet demo for PIC18F67J60, keep stack sources, add this module, call ThermalTraceAppInit / ThermalTraceAppTask from the demo main loop next to StackTask(), build, flash.
  5. UART 115200: link/DHCP ok, then POST through the relay. Sensor key temp1 imports on first POST.

Repo drop-in: sketches/microchip/pic18f67j60_ds18b20_ingest/

Related

Amazon buy links may include an Associates tag. Adafruit and other vendor links are direct (Adafruit does not run an affiliate program). ThermalTrace may earn a commission from qualifying Amazon purchases at no extra cost to you.

FAQ

Can a PIC18F67J60 post to ThermalTrace?
Yes. Drop-in MLA TCP/IP Stack C in MPLAB X: onboard Ethernet MAC/PHY, DS18B20 on RD0, HTTP to the LAN TLS relay. Guide: thermaltrace.dev/about/pic18-ethernet-ingest.

Why not HTTPS from the PIC?
The classic Microchip TCP/IP Stack does not ship a maintained HTTPS client for Cloudflare. The LAN relay keeps the MCU on HTTP, same as Uno W5100 and STM32 Zephyr.

Is this Arduino or XC8?
XC8 / MPLAB X on the MLA Ethernet demo. Not an Arduino .ino.