diff options
author | RossTheRoss <msattr@gmail.com> | 2020-02-22 19:58:57 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2020-02-22 19:58:57 -0600 |
commit | 40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34 (patch) | |
tree | 65b870de5587aa07d2eb79fca40ba0e356fbd3f3 /Lab3.X/numpad.c | |
parent | Merge origin/master (diff) | |
download | ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar.gz ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar.bz2 ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar.lz ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar.xz ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.tar.zst ee2361-40e6fa2722fa3c37edbc0d0faa5a1164c7a68e34.zip |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
(Lab 3 partially working)
Diffstat (limited to 'Lab3.X/numpad.c')
-rw-r--r-- | Lab3.X/numpad.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lab3.X/numpad.c b/Lab3.X/numpad.c new file mode 100644 index 0000000..fcd87cc --- /dev/null +++ b/Lab3.X/numpad.c @@ -0,0 +1,9 @@ +#include "xc.h"
+void initKeyPad(void) {
+ TRISA = 0b0000000000011111; //set port A to inputs,
+ LATA = 0x0000; //Set all of port A to LOW
+ CNPU1bits.CN11PUE = 1;
+ CNPU1bits.CN12PUE = 1;
+ CNPU1bits.CN13PUE = 1;
+ CNPU1bits.CN14PUE = 1;
+}
|