Pull-up

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Dutch
Posts: 102
Joined: Mon Aug 19, 2013 8:38 am
Location: Netherlands
Has thanked: 24 times
Been thanked: 5 times
Contact:

Pull-up

Post 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 2895 times
Flowcode2.fcfx
(6.64 KiB) Downloaded 133 times
328-2.JPG
328-2.JPG (49.24 KiB) Viewed 2895 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Pull-up

Post 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.
Martin

Dutch
Posts: 102
Joined: Mon Aug 19, 2013 8:38 am
Location: Netherlands
Has thanked: 24 times
Been thanked: 5 times
Contact:

Re: Pull-up

Post 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.

Post Reply