I posted awhile back where I thought I got it working but couldn't test it, turns out it wasn't working. It is now.
To set it to an Input use:
DDRE = B00000000;
To use the input pullup resistor use:
PORTE =B00000100;
Should be able leave it alone and use it as a regular input
To set it as an Output use:
DDRE = B00000100;
To set it high use:
PORTE =B00000100;
And for low:
PORTE =B00000000;
Note: This will affect the only other pin on PortE as well, so if you want to use D7 at the same time then you must change the code accordingly , D7 is Bit 6.
For example, to set both as outputs :
DDRE = B01000100;
Hope this helps someone
Hey Tom,
I'm trying to make some sense of it.
I have a 680 Ohm Res to my PE2 that connects to GND.
On the datasheet I read:
"• HWB – Port E, Bit 2
HWB allows to execute the bootloader section after reset when tied to ground during external reset pulse. The
HWB mode of this pin is active only when the HWBE fuse is enable. During normal operation (excluded Reset),
this pin acts as a general purpose I/O."
In English language, what does that mean/do?
If I ground my PE2 pin what does happen?
If I, instead, have it HIGH, what would change?
If I simply remove this resistor, what would it change?
Hardware Bootloader Activation, I am understanding that it would influence things only when I Burn Bootload / program my board the 1st time, with my USBtinyISP, for instance.
My board works with this config, but I'd like to know deeper why's.
Here is my documentation:
http://luizbueno.fabcloud.io/me/Electronics.html
Best regards,
Luiz Bueno