From e9f3d4a56d10de933c9c22646a7b084ec3cff20f Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Fri, 24 Apr 2020 13:16:17 -0500 Subject: Add MORE stuff I forget to commit --- Lab5.X/Lab 5 Report.pdf | Bin 0 -> 45125 bytes Lab5.X/dist/default/debug/memoryfile.xml | 4 ++-- Lab5.X/lab5_lcd.c | 6 ++++-- Lab5.X/lab5_main.c | 4 ++-- Lab5.X/nbproject/Makefile-genesis.properties | 4 ++-- Lab5.X/nbproject/configurations.xml | 1 + Lab5.X/nbproject/private/private.xml | 6 +----- Lab5.X/strap012_Lab5.zip | Bin 0 -> 45577 bytes 8 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 Lab5.X/Lab 5 Report.pdf create mode 100644 Lab5.X/strap012_Lab5.zip (limited to 'Lab5.X') diff --git a/Lab5.X/Lab 5 Report.pdf b/Lab5.X/Lab 5 Report.pdf new file mode 100644 index 0000000..090ef8a Binary files /dev/null and b/Lab5.X/Lab 5 Report.pdf differ diff --git a/Lab5.X/dist/default/debug/memoryfile.xml b/Lab5.X/dist/default/debug/memoryfile.xml index 9f704b1..b444e63 100644 --- a/Lab5.X/dist/default/debug/memoryfile.xml +++ b/Lab5.X/dist/default/debug/memoryfile.xml @@ -11,8 +11,8 @@ bytes 65274 - 1086 - 64188 + 1125 + 64149 diff --git a/Lab5.X/lab5_lcd.c b/Lab5.X/lab5_lcd.c index 8c0af52..f9567ad 100644 --- a/Lab5.X/lab5_lcd.c +++ b/Lab5.X/lab5_lcd.c @@ -1,7 +1,9 @@ #include "xc.h" #include "lab5_lcd.h" #include "string.h" -#define CON 32 +//CON should be between 0 and 0xFF. +#define CON 0x00 + //Obligatory delay function void delay(long n){ for (n=n; n>0; n--) { @@ -31,7 +33,7 @@ void lcd_init(void) { lcd_cmd(0b00111000); // function set, normal instruction mode lcd_cmd(0b00111001); // function set, extended instruction mode lcd_cmd(0b00010100); // interval osc - lcd_cmd(0b01110000); // contrast C3-C0 + lcd_cmd((0b0111 << 4) + CON); // contrast C3-C0 lcd_cmd(0b01011110); // Ion, Bon, C5-C4 lcd_cmd(0b01101100); // follower control delay(266665); diff --git a/Lab5.X/lab5_main.c b/Lab5.X/lab5_main.c index b133335..6af5ea7 100644 --- a/Lab5.X/lab5_main.c +++ b/Lab5.X/lab5_main.c @@ -26,12 +26,12 @@ void setup(void) { int main(void) { setup(); - lcd_setCursor(0, 0); + lcd_setCursor(0,0); lcd_printStr("Hello"); lcd_setCursor(2,1); lcd_printStr("World!"); while (1) { - delay(500000); + delay(300000); left(); } } \ No newline at end of file diff --git a/Lab5.X/nbproject/Makefile-genesis.properties b/Lab5.X/nbproject/Makefile-genesis.properties index 0376466..b4b72a9 100644 --- a/Lab5.X/nbproject/Makefile-genesis.properties +++ b/Lab5.X/nbproject/Makefile-genesis.properties @@ -1,9 +1,9 @@ # -#Wed Apr 08 10:43:03 CDT 2020 +#Tue Apr 14 19:27:44 CDT 2020 default.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.35\\packs\\Microchip\\PIC24F-GA-GB_DFP\\1.2.101 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=859fc649e7017fd01769e2187e1537a7 default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.50\\bin -configurations-xml=26589ca1d802028c5a31cd15231825b7 +configurations-xml=c230c626988d1c5900bc0ce5cfd47f7f com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5db0f4d6bbe0ec2a1f1096ccfb9d7ad3 default.languagetoolchain.version=1.50 host.platform=windows diff --git a/Lab5.X/nbproject/configurations.xml b/Lab5.X/nbproject/configurations.xml index 3ea7dfd..c5c48be 100644 --- a/Lab5.X/nbproject/configurations.xml +++ b/Lab5.X/nbproject/configurations.xml @@ -194,6 +194,7 @@ + diff --git a/Lab5.X/nbproject/private/private.xml b/Lab5.X/nbproject/private/private.xml index f2aa828..6807a2b 100644 --- a/Lab5.X/nbproject/private/private.xml +++ b/Lab5.X/nbproject/private/private.xml @@ -2,10 +2,6 @@ - - file:/C:/Users/Ross/MPLABXProjects/EE2361Projects/Lab5.X/lab5_main.c - file:/C:/Users/Ross/MPLABXProjects/EE2361Projects/Lab5.X/lab5_lcd.c - file:/C:/Users/Ross/MPLABXProjects/EE2361Projects/Lab5.X/lab5_lcd.h - + diff --git a/Lab5.X/strap012_Lab5.zip b/Lab5.X/strap012_Lab5.zip new file mode 100644 index 0000000..62f6123 Binary files /dev/null and b/Lab5.X/strap012_Lab5.zip differ -- cgit v1.2.3