OpenCores
URL https://opencores.org/ocsvn/mips789/mips789/trunk

Subversion Repositories mips789

[/] [mips789/] [branches/] [avendor/] [bench/] [demo/] [demo.c] - Blame information for rev 15

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 mcupro
#include "..\..\clib\dvc_lib.h"
2
 
3
void main2()
4
{
5
    unsigned char i=0 ;
6
 
7
    uart0_putstr((char*)"HELLO CPU WORLD!\nThis is MIPS789 Running\n");
8
    LCD_init();
9
    LCD_write_string(0,0," THIS'S MIPS789");
10
    LCD_write_string(0,1,"MIPS789 demo...");
11
    while(1)
12
    { if(i==0)
13
          uart0_putstr((char*)"HI can you see me?\n");
14
        dis_byte(i++);
15
        dly_us(100*1000);
16
        led1_off();
17
        led2_off();
18
        /*
19
        if(get_key1()&&get_key2())
20
        {
21
            led1_off();
22
            led2_off();
23
            LCD_write_string(0,1,"Ready to RCV ");
24
            uart0_putstr((char*)"I am ready to rcv program...\n");
25
            download();
26
        }
27
        else
28
        */
29
        if(get_key1())
30
        {
31
            LCD_write_string(0,1,"hello key1      ");
32
            led1_on();
33
            uart0_putstr((char*)"you have pressed key1\n");
34
            while(get_key1());
35
                LCD_write_string(0,1,"MIPS789 demo...");
36
        }
37
        else if(get_key2())
38
        {
39
           LCD_write_string(0,1,"hello key2      ");
40
            led2_on();
41
             uart0_putstr((char*)"you have pressed key2\n");
42
            while(get_key2());
43
            LCD_write_string(0,1,"MIPS789 demo...");
44
        }
45
 
46
    }
47
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.