Page 1 of 1

Pull-up

Posted: Mon Jan 03, 2022 4:48 pm
by Dutch
Hi,

In my ATmega328P i needed to configure the reset input as I/O input. I can do that by setting the RSTDISBL high during programing so PC6 becomes an IO pin. works.
Unfortunately it looks like the pullup is still activated. i probably need to insert an small C-CODE block in my program to switch it off.

in the datasheet i found some example code but for me unclear what to put in the block. The datasheet

i tried something but all gave me an compile error :wink: who can show me :?
328.JPG
328.JPG (64.83 KiB) Viewed 3227 times
Flowcode2.fcfx
(6.64 KiB) Downloaded 140 times
328-2.JPG
328-2.JPG (49.24 KiB) Viewed 3227 times

Re: Pull-up

Posted: Mon Jan 03, 2022 11:18 pm
by medelec35
Hi.
With ATMEGA328
To enable WPU, set the pin for output high, then change to an input.
To disable WPU, set the pin for output low, then change to an input.

Re: Pull-up

Posted: Wed Jan 05, 2022 7:01 pm
by Dutch
Thanks medelec. trying that but to no luck yet. must be the pin is still connected to reset function. if i switch it off i need to high voltage reset the unit and dont have those tools. already have a couple i cant reprogram anymore. il try switching WPU for another pin on and off first.