I have some code running fine on some boards with ATMEGA328Ps, communicating using PJON onewire on D12, outputting some LEDS and taking some analogue inputs.
I'm in the process of making some more of these boards and the MCUs I've managed to order are the PB variant (my bad not checking the site properly). I've got the Bootloader loaded and code uploading but one of the LED outputs isn't working (D7) and the onewire doesn't seem to be working.
On the original boards D7 is pulled down to almost 0 when switched low, but on the new boards it only goes down to about 2.5V. The other Digital pins get pulled down to about 1.5v
I'm at a bit of a loss now. I don't understand why D7 is being pulled down lower than the other pins and why on the newer MCUs, which are supposed to be compatible, it's only going down to about 2.5v.
D12 appears to be behaving when I test it as a straight output pin so maybe that issue is a question for the PJON people...
Weird - sure it's all wired correctly? The PB should be pin and binary compatible with the P (youd have two i/o pins tied to power and ground, but since P code wouldn't touch that port register, they do be inputs and it would be fine).
The PB is strictly better than the P (and cheaper). I use them with minicore - that handful of extra pins is just enough that I dont need an I2C backpack for the screen on my party-light controllers, which makes my life way easier (it was a flaming bitch mechanically with the backpack, as I needed a cutout in the PCB to make them fit into the enclosure, but without the backpack, I just solder the pins from the screen onto my board, and they also look way cooler when i open them to show people).
Just done a sanity check. Everything meters out fine. There's nothing wrong with the PCBs as I've already made up 2 of this batch with the P MCUs and they work fine. I've just swapped the PB MCU with a P series one from an old Nano clone I had lying around and that one works fine. The PJON works fine too so it's definitely the controller :O/
Oh yes, I’ve done that already. As I said, this code is already working perfectly on an identical board with the P series mcu. Just with the PB variant it doesn’t seem to want to do digital write to this one pin, only pwm analogue write.
Not much to share really. For that pin (and in fact all the output data pins) it's just VCC, through a resistor and led, to the MPU pin. The PJON pin is just directly connected from data pin 12 to the onewire bus.