aboutsummaryrefslogtreecommitdiffstats
path: root/Lab3.X/display.c
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2020-02-23 19:38:25 -0600
committerRossTheRoss <msattr@gmail.com>2020-02-23 19:38:25 -0600
commit98850dad7260f2dc33e5726222be4decdf098e18 (patch)
tree86e29b92b9225a358a484af3f460ce3c4abf6bad /Lab3.X/display.c
parentAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA (diff)
downloadee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar.gz
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar.bz2
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar.lz
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar.xz
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.tar.zst
ee2361-98850dad7260f2dc33e5726222be4decdf098e18.zip
I hate this (Lab 3 partially working again)
Diffstat (limited to 'Lab3.X/display.c')
-rw-r--r--Lab3.X/display.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lab3.X/display.c b/Lab3.X/display.c
index 2c2fd1f..5ad9c4f 100644
--- a/Lab3.X/display.c
+++ b/Lab3.X/display.c
@@ -2,17 +2,11 @@
#include "display.h"
//Functions used for Display
-
-void delay(long num) {
- long i;
- for (i; i < num; i++) {
- asm("nop");
- }
-}
void init7seg(void) {
TRISB = 0b0000000000000011; //and port B to outputs
LATB = 0x0000; //and all of port B to LOW
}
+
void showChar7seg(char myChar, enum DIGIT myDigit) {
LATB &= 0x00;
switch (myChar) {
@@ -65,7 +59,7 @@ void showChar7seg(char myChar, enum DIGIT myDigit) {
LATB ^= (0b01110001 << 2);
break;
default:
- LATB ^= (0b1010001 << 2);
+ LATB ^= (0b11111111 << 2);
break;
} //END OF SWITCH
LATB |= myDigit;