GPIO ports w/o internal pullups

Hi, I'm trying to get data from a keypad by sampling the upper nibble followed by the lower nibble. However, my target MCU apparently only has GPIO pins that have internal pullup resistors, and it doesn't seem to be programmable like say an Atmel AVR. Here's my algorithm, assuming I'm using port 0

1) Set port0 to input, port0 output 2) Enable input pullups, output 0. 3) Read key from port 0 4) Set port0 to output, port0 input 5) Enable input pullups, output 0(reverse #2). 6) OR key and port 0

Now, without internal programmable pullups I won't be able to do #2 & #5. Would it be ok if I use fixed external pullups? I suppose it's still ok since it just gets rid of the floating input, and when output is 0(GND) the pullup won't matter?

Thanks.

Reply to
goister
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.