Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of display_nums2 by
Diff: display.cpp
- Revision:
- 0:0f1c2bf6ab4e
- Child:
- 1:3d6796759d45
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/display.cpp Wed Feb 28 15:56:29 2018 +0000
@@ -0,0 +1,33 @@
+#include <io_pins.h>
+#include <display.h>
+#include <mbed.h>
+
+SPI display_ctr(MOSI, MISO, SCLK);
+DigitalOut dsp_ncs(LOAD);
+Serial pc(USBTX, USBRX);
+
+
+
+
+
+void send_data(int dat){
+ dsp_ncs = 0;
+ display_ctr.write(dat); //configures the decode register
+ dsp_ncs = 1;
+}
+
+void bin2bcd_array_mod(int *bcdArr, int num){
+ int i = 0;
+ while(num>0){
+ bcdArr[i] = num%10;
+ num = num/10;
+ i = i+1;
+}
+
+
+//void bin2bcd_array_sprintf(int *bcdArr, int num){
+// pc.printf("ahh");
+//
+//
+//}
+}
\ No newline at end of file
