Steve
Thus, am I right in saying that if I want the keypad scanner to interfere the least with the rest of the program execution, then I must switch the AUTOREPEAT OFF?
Steve
Thus, am I right in saying that if I want the keypad scanner to interfere the least with the rest of the program execution, then I must switch the AUTOREPEAT OFF?
If you don't define AutoRepeat, the program will spin in round until you release the keys.
To make a short storyUse AutoRepeat and SCAN_ONCE... i should have written that routine in a different way...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Maybe using Darrel's Instant Interrupts? Just an idea...
When I have some spare time I'll try it to have a true multitasking keyboard scanner.
Ioannis
I have noted this discussion on Pull Up resistors. I am running the PIC18F series chip and it in the documentation says it supports a weak pull up setting internally in the chip. Could I get any discussion of this relative to the pull up resistors on Vcc. Also Pull Ups as I understand their function is to bring the voltage on the pin up a little so that when the transistor in the chip is triggered only slightly the pin will appear digitally to have tripped.
As such what values do you think these resistors should be generally?
If the support is internal, does this mean we still have to place the external resistors?
Thanks to all.
Generally, a pullup resistor (or a pulldown) is used to keep a pin from 'floating', which basically happens when nothing is driving the pin. The pin's voltage floats around due to induced voltages from traces around it, the weather, humidity, your hand, etc.etc...
Another reason is that the pin might be an 'open drain' ('open collector' for older school types). This means that the pin only has a switching transistor to pull it low, and not high. So you connect a resistor of about 4.7K to Vcc across it. This provide a couple of mA (@ 5v) at most to keep the pin high.
The internal pullups are valued at around 100K, which means they'll only provide about 50uA of current to hold it high. If you connect a load of much more than 50uA to that pin (a load resistance of much more than 100K), you'll be able to draw that pin low.
Most likely, even though you're using the internal pullups, sometimes, depending on the outside circuitry, yes, you'll have to add a small pullup resistor.
Generally speaking, a pullup resistor's value is either 4.7K or 10K, depending.
Make the resistance too low, and you draw unneccessary current and it won't allow external circuitry to pull the pin low.
Make the resistance too high, and you might not have enough current to pull the pin high like you wanted in the first place.
Stick with 4.7K, and you should be fine.
Bookmarks