display test

Dependencies:   mbed

Fork of Microprocessors_Template by EECS397

Files at this revision

API Documentation at this revision

Comitter:
anr41
Date:
Tue Feb 20 16:57:59 2018 +0000
Parent:
0:24202d4eadef
Commit message:
display test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Jan 30 18:13:24 2018 +0000
+++ b/main.cpp	Tue Feb 20 16:57:59 2018 +0000
@@ -1,23 +1,32 @@
 /*******************************************************************************
 *EECS397
 *
-*Assignment Name: Lab 
+*Assignment Name: Lab 4 Part 1; Display_test
 *
 *Author(s): Ashley Roberson, Michael Codega
 *
 *Purpose:
 *
-*Last Modified: , 2018
+*Last Modified: February 15, 2018
 *
 *******************************************************************************/
 #include "mbed.h"
+#define DSP_TST_ON 0x0f01
 
+SPI display_ctr(PA_7, PA_6, PA_5);
+DigitalOut dsp_ncs(PC_7);
+
+int main()
+{
 
-int main(void) {
-    
-    
-    
-    
-    
-}    
-    
\ No newline at end of file
+    dsp_ncs = 1;
+    display_ctr.format(16, 0);
+
+    while(1) {
+        dsp_ncs = 0;
+        display_ctr.write(DSP_TST_ON);
+        dsp_ncs = 1;
+        wait(.5);
+    }
+
+}