display test
Dependencies: mbed
Fork of Microprocessors_Template by
main.cpp@1:8dafc4763a73, 2018-02-20 (annotated)
- Committer:
- anr41
- Date:
- Tue Feb 20 16:57:59 2018 +0000
- Revision:
- 1:8dafc4763a73
- Parent:
- 0:24202d4eadef
display test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
anr41 | 0:24202d4eadef | 1 | /******************************************************************************* |
anr41 | 0:24202d4eadef | 2 | *EECS397 |
anr41 | 0:24202d4eadef | 3 | * |
anr41 | 1:8dafc4763a73 | 4 | *Assignment Name: Lab 4 Part 1; Display_test |
anr41 | 0:24202d4eadef | 5 | * |
anr41 | 0:24202d4eadef | 6 | *Author(s): Ashley Roberson, Michael Codega |
anr41 | 0:24202d4eadef | 7 | * |
anr41 | 0:24202d4eadef | 8 | *Purpose: |
anr41 | 0:24202d4eadef | 9 | * |
anr41 | 1:8dafc4763a73 | 10 | *Last Modified: February 15, 2018 |
anr41 | 0:24202d4eadef | 11 | * |
anr41 | 0:24202d4eadef | 12 | *******************************************************************************/ |
anr41 | 0:24202d4eadef | 13 | #include "mbed.h" |
anr41 | 1:8dafc4763a73 | 14 | #define DSP_TST_ON 0x0f01 |
anr41 | 0:24202d4eadef | 15 | |
anr41 | 1:8dafc4763a73 | 16 | SPI display_ctr(PA_7, PA_6, PA_5); |
anr41 | 1:8dafc4763a73 | 17 | DigitalOut dsp_ncs(PC_7); |
anr41 | 1:8dafc4763a73 | 18 | |
anr41 | 1:8dafc4763a73 | 19 | int main() |
anr41 | 1:8dafc4763a73 | 20 | { |
anr41 | 0:24202d4eadef | 21 | |
anr41 | 1:8dafc4763a73 | 22 | dsp_ncs = 1; |
anr41 | 1:8dafc4763a73 | 23 | display_ctr.format(16, 0); |
anr41 | 1:8dafc4763a73 | 24 | |
anr41 | 1:8dafc4763a73 | 25 | while(1) { |
anr41 | 1:8dafc4763a73 | 26 | dsp_ncs = 0; |
anr41 | 1:8dafc4763a73 | 27 | display_ctr.write(DSP_TST_ON); |
anr41 | 1:8dafc4763a73 | 28 | dsp_ncs = 1; |
anr41 | 1:8dafc4763a73 | 29 | wait(.5); |
anr41 | 1:8dafc4763a73 | 30 | } |
anr41 | 1:8dafc4763a73 | 31 | |
anr41 | 1:8dafc4763a73 | 32 | } |