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

Subversion Repositories lwrisc

[/] [lwrisc/] [trunk/] [BENCH/] [test1/] [test1.c] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 mcupro
#include <16c57.h>//the is no 16f57.h file in the my version of ccs.so using it instered 
2
 
3
#byte DISP = 100
4
 
5
disp_byte(char c){
6
switch (c){
7
case 0:DISP ='0';break;
8
case 1:DISP ='1';break;
9
case 2:DISP ='2';break;
10
case 3:DISP ='3';break;
11
case 4:DISP ='4';break;
12
case 5:DISP ='5';break;
13
case 6:DISP ='6';break;
14
case 7:DISP ='7';break;
15
case 8:DISP ='8';break;
16
case 9:DISP ='9';break;
17
}
18
}
19
 
20
main(){
21
char i=0,j=0;
22
while(1){
23
        i=++i%10;
24
        disp_byte(i);
25
}
26
}
27
 

powered by: WebSVN 2.1.0

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