From 98850dad7260f2dc33e5726222be4decdf098e18 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Sun, 23 Feb 2020 19:38:25 -0600 Subject: I hate this (Lab 3 partially working again) --- Lab3.X/display.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Lab3.X/display.c') 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; -- cgit v1.2.3