Hi,
I have a board using attiny816 (not using any xplained mini board)
I have a blue LED connected with PB5 of the tiny816. Was working fine yesterday afternoon but this morning, I saw the blue LED turning on when I just do the following simple code. (I was just doing a simple LED blink to see what happened, but I currently removed the toggling part at this time).
But when I have the blinking part added, the LED blinking seems to operate normal, making me believe that the PB5 on the tiny816 is working fine. I also have an ambient light sensor on the same board I'm using and my ambient light sensor code appears to turn on and off the blue LED at the right time and LED appears to be ok as expected but was trying to figure out why sometimes I see LED turned on when I ONLY have the instruction to set port B pin 5 as output and nothing else in other code.
What may be going on? I'm confused...
I am only setting Port B Pin 5 as an output, and that's all. I've done that many times on previous stuff without any issue, but this is the first time I've encountered this issue.
#include <avr/io.h> int main(void) { // set pin 5 as output PORTB.DIRSET = PIN5_bm; }