display test

Dependencies:   mbed

Fork of Microprocessors_Template by EECS397

main.cpp

Committer:
anr41
Date:
2018-02-20
Revision:
1:8dafc4763a73
Parent:
0:24202d4eadef

File content as of revision 1:8dafc4763a73:

/*******************************************************************************
*EECS397
*
*Assignment Name: Lab 4 Part 1; Display_test
*
*Author(s): Ashley Roberson, Michael Codega
*
*Purpose:
*
*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()
{

    dsp_ncs = 1;
    display_ctr.format(16, 0);

    while(1) {
        dsp_ncs = 0;
        display_ctr.write(DSP_TST_ON);
        dsp_ncs = 1;
        wait(.5);
    }

}