future
Joined: 14 May 2004 Posts: 330
|
Loop to read tables going infinite |
Posted: Sat May 22, 2004 10:48 pm |
|
|
I'm starting with C, seeing how things are...
I did this:
Code: | const char ter[256] = { 00, 01, 02, 03, 04, 05, 06, 07,10, 11, 12, 13, 14, 15, 16, 17,
10, 11, 12, 13, 14, 15, 16, 17,10, 11, 12, 13, 14, 15, 16, 17,
20, 21, 22, 23, 24, 25, 26, 27,10, 11, 12, 13, 14, 15, 16, 17,
30, 31, 32, 33, 34, 35, 36, 37,10, 11, 12, 13, 14, 15, 16, 17,
40, 41, 42, 43, 44, 45, 46, 47,10, 11, 12, 13, 14, 15, 16, 17,
50, 51, 52, 53, 54, 55, 56, 57,10, 11, 12, 13, 14, 15, 16, 17,
60, 61, 62, 63, 64, 65, 66, 67,10, 11, 12, 13, 14, 15, 16, 17,
10, 11, 12, 13, 14, 15, 16, 17,10, 11, 12, 13, 14, 15, 16, 17,
20, 21, 22, 23, 24, 25, 26, 27,10, 11, 12, 13, 14, 15, 16, 17,
30, 31, 32, 33, 34, 35, 36, 37,10, 11, 12, 13, 14, 15, 16, 17,
40, 41, 42, 43, 44, 45, 46, 47,10, 11, 12, 13, 14, 15, 16, 17,
50, 51, 52, 53, 54, 55, 56, 57,10, 11, 12, 13, 14, 15, 16, 17,
60, 61, 62, 63, 64, 65, 66, 67,10, 11, 12, 13, 14, 15, 16, 17,
10, 11, 12, 13, 14, 15, 16, 17,10, 11, 12, 13, 14, 15, 16, 17,
20, 21, 22, 23, 24, 25, 26, 27,10, 11, 12, 13, 14, 15, 16, 17,
30, 31, 32, 33, 34, 35, 36, 37,10, 11, 12, 13, 14, 15, 16, 17 };
for(index=0; index<=255; index++) {
delay_ms(1);
putc(ter[index]);
}; |
It goes to a infinite loop sending chars via serial port.
Compiler is 3.190.
Does anyone know what I am doing wrong? |
|