Jose Luu
/
LCD_ILI9320_lines_tester
Pulses in sequence all the lines connected to the LCD controler
Revision 4:241a1638010b, committed 2016-12-15
- Comitter:
- jluu
- Date:
- Thu Dec 15 18:19:42 2016 +0000
- Parent:
- 3:f57d754b1814
- Commit message:
- ADF4351 line testing
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f57d754b1814 -r 241a1638010b main.cpp --- a/main.cpp Thu Nov 06 10:13:20 2014 +0000 +++ b/main.cpp Thu Dec 15 18:19:42 2016 +0000 @@ -1,12 +1,45 @@ #include "mbed.h" -DigitalOut myled(LED1); +DigitalOut KEY1(PD_2); +// ILI932x myLCD(PAR_8, PortA, PC_8, PC_6, PC_12, PC_11, PC_10, PB_14,"myLCD",240U,320U); // Parallel 8bit, Port, CS, reset, RS, WR, RD for F401 +DigitalOut PortA_0(PA_0); +DigitalOut PortA_1(PA_1); +DigitalOut PortA_2(PA_2); +DigitalOut PortA_3(PA_3); +DigitalOut PortA_4(PA_4); +DigitalOut PortA_5(PA_5); +DigitalOut PortA_6(PA_6); +DigitalOut PortA_7(PA_7); + +DigitalOut _CS(PC_8); +DigitalOut _reset(PC_6); +DigitalOut _RS(PC_12); +DigitalOut _WR(PC_11); +DigitalOut _RD(PC_10); +DigitalOut _LE(PC_14); + +#define PulseLine(P) {P=1;wait_ms(1);P=0;} int main() { while(1) { - myled = 1; // LED is ON - wait(0.2); // 200 ms - myled = 0; // LED is OFF - wait(1.0); // 1 sec + KEY1 = 1; + wait_ms(10); + KEY1 = 0; + PulseLine(PortA_0); + PulseLine(PortA_1); + PulseLine(PortA_2); + PulseLine(PortA_3); + PulseLine(PortA_4); + PulseLine(PortA_5); + PulseLine(PortA_6); + PulseLine(PortA_7); + PulseLine(_CS); + PulseLine(_reset); + PulseLine(_RS); + PulseLine(_WR); + PulseLine(_RD); + PulseLine(_LE); + wait_ms(10); + } }