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
display.cpp
- Committer:
- billymark
- Date:
- 2018-02-28
- Revision:
- 0:0f1c2bf6ab4e
- Child:
- 1:3d6796759d45
File content as of revision 0:0f1c2bf6ab4e:
#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");
//
//
//}
}
