-
Notifications
You must be signed in to change notification settings - Fork 2
/
smcss.LST
737 lines (718 loc) · 29 KB
/
smcss.LST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 1
C51 COMPILER V9.00, COMPILATION OF MODULE SMCSS
OBJECT MODULE PLACED IN smcss.OBJ
COMPILER INVOKED BY: C:\Program Files\Keil\C51\BIN\C51.EXE smcss.c BROWSE DEBUG OBJECTEXTEND
line level source
1 /* Description:
2 *
3 * Author:
4 */
5
6 #include <reg51.h>
7 #include <stdio.h>
8
9 #define NAME "Step Motor Control System Server"
10 #define VERSION "1.4"
11
12 #define MAX_CODE_LENGTH 48
13 #define CODE_BODY_LENGTH 9
14 #define CODE_FOOT_LENGTH 3
15
16 unsigned char xdata RES[MAX_CODE_LENGTH] = 0;
17 unsigned char byte_count = 0;
18 unsigned char byte_count_current = 0;
19
20 unsigned char xdata code_data[MAX_CODE_LENGTH] = 0;
21 unsigned char code_length = 0;
22 unsigned char code_id = 0;
23
24 unsigned int timer0_number = 0;
25
26 sbit pwm0 = P1^1;
27 sbit pwm1 = P1^2;
28
29 sfr ISP_DATA = 0xE2;
30 sfr ISP_ADDRH = 0xE3;
31 sfr ISP_ADDRL = 0xE4;
32 sfr ISP_CMD = 0xE5;
33 sfr ISP_TRIG = 0xE6;
34 sfr ISP_CONTR = 0xE7;
35
36
37 /******************************************************************************
38 * Delay function use timer with flow time 100 us, unit is 100 us.
39 *****************************************************************************/
40 void delay100u(unsigned char t)
41 {
42 1 TR0 = 1;
43 1 while (timer0_number < (t * 1))
44 1 {
45 2 }
46 1 TR0 = 0;
47 1
48 1 timer0_number = 0;
49 1 }
50
51
52 /******************************************************************************
53 * Delay function use timer with flow time 100 us, unit is ms.
54 *****************************************************************************/
55 void delay(unsigned char t)
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 2
56 {
57 1 TR0 = 1;
58 1 while (timer0_number < (t * 10))
59 1 {
60 2 }
61 1 TR0 = 0;
62 1
63 1 timer0_number = 0;
64 1 }
65
66
67 /******************************************************************************
68 * ISP functions
69 *****************************************************************************/
70 void ISP_ERA()
71 {
72 1 ISP_CMD = 0x03;
73 1 ISP_TRIG = 0x46;
74 1 ISP_TRIG = 0xb9;
75 1 delay(10);
76 1 }
77
78 unsigned char ISP_READ(unsigned char x)
79 {
80 1 ISP_ADDRL = x;
81 1 ISP_CMD = 0x01;
82 1 ISP_TRIG = 0x46;
83 1 ISP_TRIG = 0xb9;
84 1 delay(1);
85 1 return(ISP_DATA);
86 1 }
87
88 void ISP_WRITE(unsigned char y, unsigned char add)
89 {
90 1 ISP_DATA = y;
91 1 ISP_ADDRL = add;
92 1 ISP_CMD = 0x02;
93 1 ISP_TRIG = 0x46;
94 1 ISP_TRIG = 0xb9;
95 1 delay(10);
96 1 }
97
98
99 /******************************************************************************
100 * send_char
101 *****************************************************************************/
102 void send_char(unsigned char a)
103 {
104 1 ES = 0;
105 1
106 1 if (a == '\n')
107 1 {
108 2 SBUF = 0x0D;
109 2 while(TI != 1)
110 2 {
111 3 }
112 2 TI = 0;
113 2
114 2 SBUF = 0x0A;
115 2 while(TI != 1)
116 2 {
117 3 }
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 3
118 2 TI = 0;
119 2 }
120 1 else
121 1 {
122 2 SBUF = a;
123 2 while(TI != 1)
124 2 {
125 3 }
126 2 TI=0;
127 2 }
128 1
129 1 ES = 1;
130 1 }
131
132
133 /******************************************************************************
134 * Send string
135 *****************************************************************************/
136 void send_string(unsigned char * p)
137 {
138 1 while (* p != '\0')
139 1 {
140 2 send_char(* p);
141 2 p = p + 1;
142 2 }
143 1 }
144
145
146 /******************************************************************************
147 * Send string in interrupt.
148 *****************************************************************************/
149 void send_string_interrupt(unsigned char * p)
150 {
151 1 while (* p != '\0')
152 1 {
153 2 send_char(* p);
154 2 p = p + 1;
155 2 }
156 1 }
157
158 /******************************************************************************
159 * Send number as a string.
160 *****************************************************************************/
161 void send_number(unsigned char p)
162 {
163 1 TI = 1;
164 1 printf("%bd", p);
165 1 while (TI == 0)
166 1 {
167 2 }
168 1 TI = 0;
169 1 }
170
171
172 /******************************************************************************
173 * Send a hex as a string.
174 *****************************************************************************/
175 void send_hex(unsigned char p)
176 {
177 1 TI = 1;
178 1 printf("%02bX", p);
179 1 while (TI == 0)
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 4
180 1 {
181 2 }
182 1 TI = 0;
183 1 }
184
185
186 /******************************************************************************
187 * Welcome message.
188 *****************************************************************************/
189 void welcome()
190 {
191 1 send_string("================================================================================\n");
192 1 send_string(" ");
193 1 send_string(NAME);
194 1 send_string("\n");
195 1 send_string("\n");
196 1
197 1 send_string("Version : ");
198 1 send_string(VERSION);
199 1 send_string("\n");
200 1 send_string("Max code length : ");
201 1 send_number(MAX_CODE_LENGTH);
202 1 send_string("\n");
203 1 send_string("Code body length : ");
204 1 send_number(CODE_BODY_LENGTH);
205 1 send_string("\n");
206 1 send_string("\n");
207 1 send_string("For more detial information, please read the program manual in OUYANG Lab.\n");
208 1 send_string("================================================================================\n");
209 1 send_string("\n");
210 1 }
211
212 /******************************************************************************
213 * RAM code information
214 *****************************************************************************/
215 void code_information_ram()
216 {
217 1 unsigned char i;
218 1
219 1 send_string("RAM code information\n");
220 1 send_string(" code id : ");
221 1 send_number(code_id);
222 1 send_string("\n");
223 1
224 1 send_string(" code length: ");
225 1 send_number(code_length);
226 1 send_string("\n");
227 1
228 1 send_string(" code data : ");
229 1 for (i = 0; i < code_length; i ++)
230 1 {
231 2 send_hex(code_data[i]);
232 2 send_string(" ");
233 2 }
234 1 send_string("\n");
235 1 send_string("\n");
236 1 }
237
238 /******************************************************************************
239 * EEPROM code information
240 *****************************************************************************/
241 void code_information_eeprom()
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 5
242 {
243 1 unsigned char i;
244 1 unsigned char code_eeprom_length;
245 1
246 1 code_eeprom_length = ISP_READ(0xFF);
247 1
248 1 send_string("EEPROM code information\n");
249 1 send_string(" code length: ");
250 1 send_number(code_eeprom_length);
251 1 send_string("\n");
252 1
253 1 send_string(" code data : ");
254 1 for (i = 0; i < code_eeprom_length; i ++)
255 1 {
256 2 send_hex(ISP_READ(i));
257 2 send_string(" ");
258 2 }
259 1 send_string("\n");
260 1 send_string("\n");
261 1 }
262
263
264 /******************************************************************************
265 * Read data from EEPROM and save in global array "code_data".
266 *****************************************************************************/
267 void load_code()
268 {
269 1 unsigned char i;
270 1
271 1 code_length = ISP_READ(0xFF);
272 1
273 1 if (
274 1 (code_length == 0xFF) ||
275 1 (code_length < (CODE_BODY_LENGTH + CODE_FOOT_LENGTH))
276 1 )
277 1 {
278 2 code_length = 0;
279 2
280 2 send_string("Storage is empty.\n");
281 2 send_string("\n");
282 2 }
283 1 else
284 1 {
285 2 for (i = 0; i < code_length; i ++)
286 2 {
287 3 code_data[i] = ISP_READ(i);
288 3 }
289 2
290 2 send_string("Code loaded.\n");
291 2 send_string("\n");
292 2 }
293 1 }
294
295
296 /******************************************************************************
297 * Tempary save data.
298 *****************************************************************************/
299 void save_code(unsigned char l_data[], unsigned char l_length)
300 {
301 1 unsigned char i;
302 1
303 1 code_id = code_id + 1;
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 6
304 1 code_length = l_length;
305 1
306 1 for (i = 0; i < l_length; i ++)
307 1 {
308 2 code_data[i] = l_data[i];
309 2 }
310 1
311 1 send_string("Code saved.\n");
312 1 send_string("\n");
313 1 }
314
315 /******************************************************************************
316 * Write data to eeprom.
317 *****************************************************************************/
318 void write_code(unsigned char l_data[], unsigned char l_length)
319 {
320 1 unsigned char i;
321 1
322 1 ISP_ERA();
323 1 ISP_WRITE(l_length, 0xFF);
324 1
325 1 for (i = 0; i < l_length; i ++)
326 1 {
327 2 ISP_WRITE(l_data[i], i);
328 2 }
329 1
330 1 send_string("Code written.\n");
331 1 send_string("\n");
332 1 }
333
334
335 /******************************************************************************
336 * Drive stepping motor according data from global array -- code_data.
337 *****************************************************************************/
338 void run(unsigned char l_data[], unsigned char l_length)
339 {
340 1 unsigned char i;
341 1 unsigned char cycle_count;
342 1 unsigned char step_count;
343 1 unsigned char part_interval_high_count;
344 1 unsigned char back_step_count;
345 1 unsigned char back_part_interval_high_count;
346 1
347 1 send_string("Running ...\n");
348 1
349 1 for (i = 0; i < (l_length - CODE_FOOT_LENGTH); i = i + CODE_BODY_LENGTH)
350 1 {
351 2 for(cycle_count = 0; cycle_count < l_data[i+4]; cycle_count ++)
352 2 {
353 3 for(step_count = 0; step_count < l_data[i+1]; step_count ++)
354 3 {
355 4 if((l_data[i] & 0xF0) == 0xF0)
356 4 {
357 5 /*
358 5 * Direction is "F", mark as -CW
359 5 */
360 5 pwm0 = 0;
361 5 delay100u(l_data[i] & 0x0F);
362 5 pwm0 = 1;
363 5 delay100u(l_data[i] & 0x0F);
364 5 }
365 4 else
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 7
366 4 {
367 5 /*
368 5 * Direction is "0", mark as +CW
369 5 */
370 5 pwm1 = 0;
371 5 delay100u(l_data[i]);
372 5 pwm1 = 1;
373 5 delay100u(l_data[i]);
374 5 }
375 4 }
376 3
377 3 /*
378 3 * Delay.
379 3 */
380 3
381 3 for(part_interval_high_count = 0; part_interval_high_count < l_data[i+2]; part_interval_high_c
-ount ++)
382 3 {
383 4 delay(255);
384 4 delay(1);
385 4 }
386 3 delay(l_data[i+3]);
387 3
388 3 if ((l_data[i] & 0xF0) == 0xF0)
389 3 {
390 4 /*
391 4 * When the direction is "F", execute back action.
392 4 */
393 4 for (back_step_count = 0; back_step_count < l_data[i+6]; back_step_count ++)
394 4 {
395 5 pwm1 = 0;
396 5 delay100u(l_data[i+5]);
397 5 pwm1 = 1;
398 5 delay100u(l_data[i+5]);
399 5 }
400 4
401 4 /*
402 4 * Delay.
403 4 */
404 4
405 4 for (back_part_interval_high_count = 0; back_part_interval_high_count < l_data[i+7]; back_
-part_interval_high_count ++)
406 4 {
407 5 delay(255);
408 5 delay(1);
409 5 }
410 4 delay(l_data[i+8]);
411 4 }
412 3 }
413 2 }
414 1
415 1 send_string("Running finished.\n");
416 1 send_string("\n");
417 1 }
418
419
420 /******************************************************************************
421 * Process data in global array "RES".
422 *****************************************************************************/
423 void process_data()
424 {
425 1 // Catch current byte count for follow judgement.
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 8
426 1 byte_count_current = byte_count;
427 1
428 1 if (
429 1 (byte_count_current >= (CODE_BODY_LENGTH + CODE_FOOT_LENGTH)) &&
430 1 (((byte_count_current - CODE_FOOT_LENGTH) % CODE_BODY_LENGTH) == 0) &&
431 1 (
432 1 ((RES[0] & 0xF0) == 0xF0) ||
433 1 ((RES[0] & 0xF0) == 0x00)
434 1 )
435 1 )
436 1 {
437 2 /*
438 2 * This is a command for store code data.
439 2 */
440 2 if (
441 2 (RES[byte_count_current-1] == 0x00) &&
442 2 (RES[byte_count_current-2] == 0x00) &&
443 2 (RES[byte_count_current-3] == 0x00)
444 2 )
445 2 {
446 3 /*
447 3 * This is a command for temparily store code data.
448 3 */
449 3 byte_count = 0;
450 3 save_code(RES, byte_count_current);
451 3 }
452 2 else if (
453 2 (RES[byte_count_current-1] == 0x11) &&
454 2 (RES[byte_count_current-2] == 0x11) &&
455 2 (RES[byte_count_current-3] == 0x11)
456 2 )
457 2 {
458 3 /*
459 3 * This is a command for immediately execute code data.
460 3 */
461 3 byte_count = 0;
462 3 run(RES, byte_count_current);
463 3 }
464 2 else
465 2 {
466 3 /*
467 3 * Need more.
468 3 */
469 3 }
470 2 }
471 1 else if (
472 1 (byte_count_current >= 5) &&
473 1 (RES[byte_count_current-1] == 0xEE) &&
474 1 (RES[byte_count_current-2] == 0xEE) &&
475 1 (RES[byte_count_current-3] == 0xEE) &&
476 1 (RES[byte_count_current-4] == 0xEE) &&
477 1 (RES[byte_count_current-5] == 0xEE)
478 1 )
479 1 {
480 2 /*
481 2 * This is a command for reset byte count.
482 2 */
483 2 byte_count = 0;
484 2 send_string("Reset send byte count.\n");
485 2 send_string("\n");
486 2 }
487 1 else if (
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 9
488 1 (byte_count_current >= 5) &&
489 1 (RES[byte_count_current-1] == 0xEF) &&
490 1 (RES[byte_count_current-2] == 0xEF) &&
491 1 (RES[byte_count_current-3] == 0xEF) &&
492 1 (RES[byte_count_current-4] == 0xEF) &&
493 1 (RES[byte_count_current-5] == 0xEF)
494 1 )
495 1 {
496 2 /*
497 2 * This is a command for start action.
498 2 */
499 2 byte_count = 0;
500 2 run(code_data, code_length);
501 2 }
502 1 else if (
503 1 (byte_count_current >= 5) &&
504 1 (RES[byte_count_current-1] == 0xE0) &&
505 1 (RES[byte_count_current-2] == 0xE0) &&
506 1 (RES[byte_count_current-3] == 0xE0) &&
507 1 (RES[byte_count_current-4] == 0xE0) &&
508 1 (RES[byte_count_current-5] == 0xE0)
509 1 )
510 1 {
511 2 /*
512 2 * This is a command for display ram code information.
513 2 */
514 2 byte_count = 0;
515 2 code_information_ram();
516 2 }
517 1 else if (
518 1 (byte_count_current >= 5) &&
519 1 (RES[byte_count_current-1] == 0xE1) &&
520 1 (RES[byte_count_current-2] == 0xE1) &&
521 1 (RES[byte_count_current-3] == 0xE1) &&
522 1 (RES[byte_count_current-4] == 0xE1) &&
523 1 (RES[byte_count_current-5] == 0xE1)
524 1 )
525 1 {
526 2 /*
527 2 * This is a command for display eeprom code information.
528 2 */
529 2 byte_count = 0;
530 2 code_information_eeprom();
531 2 }
532 1 else if (
533 1 (byte_count_current >= 5) &&
534 1 (RES[byte_count_current-1] == 0xE5) &&
535 1 (RES[byte_count_current-2] == 0xE5) &&
536 1 (RES[byte_count_current-3] == 0xE5) &&
537 1 (RES[byte_count_current-4] == 0xE5) &&
538 1 (RES[byte_count_current-5] == 0xE5)
539 1 )
540 1 {
541 2 /*
542 2 * This is a command for Write data to EEPROM.
543 2 */
544 2 byte_count = 0;
545 2 write_code(code_data, code_length);
546 2 }
547 1 else if (
548 1 (byte_count_current >= 5) &&
549 1 (RES[byte_count_current-1] == 0xE6) &&
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 10
550 1 (RES[byte_count_current-2] == 0xE6) &&
551 1 (RES[byte_count_current-3] == 0xE6) &&
552 1 (RES[byte_count_current-4] == 0xE6) &&
553 1 (RES[byte_count_current-5] == 0xE6)
554 1 )
555 1 {
556 2 /*
557 2 * This is a command for load data from EEPROM.
558 2 */
559 2 byte_count = 0;
560 2 load_code();
561 2 }
562 1 else
563 1 {
564 2 /*
565 2 * Give more.
566 2 */
567 2 }
568 1 }
569
570
571 /******************************************************************************
572 * Initial
573 *****************************************************************************/
574 void initial()
575 {
576 1 // Timer 1 mode 2
577 1 TMOD = 0x20;
578 1
579 1 // Timer 1, serial port bitrate 9600
580 1 TH1 = 0xFD;
581 1 TL1 = TH1;
582 1
583 1 // Serial port mode 1
584 1 SCON = 0x50;
585 1 PCON = 0x00;
586 1
587 1 // Serial port interrupt open.
588 1 ES = 1;
589 1
590 1 // Timer 0 mode 2
591 1 TMOD = TMOD | 0x02;
592 1
593 1 // Timer 0, flow time is 50 us
594 1 TH0 = 0xA4;
595 1 TL0 = TH0;
596 1
597 1 // Timer0 interrupt
598 1 ET0 = 1;
599 1
600 1 // Main interrupt open.
601 1 EA = 1;
602 1
603 1 // Timer 1 begin to count.
604 1 TR1 = 1;
605 1
606 1 // ISP
607 1 ISP_CONTR = 0x9A;
608 1 ISP_ADDRH = 0x21;
609 1 ISP_ADDRL = 0x00;
610 1 }
611
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 11
612
613 /******************************************************************************
614 * Main
615 *****************************************************************************/
616 void main()
617 {
618 1 initial();
619 1
620 1 welcome();
621 1
622 1 load_code();
623 1
624 1 while (1)
625 1 {
626 2 process_data();
627 2 }
628 1 }
629
630
631 /******************************************************************************
632 * Interrupt for serial port UART
633 *****************************************************************************/
634 void uart_interrupt0() interrupt 4
635 {
636 1 if (RI == 1)
637 1 {
638 2 /*
639 2 * Is a recieve interrupt.
640 2 */
641 2 RI = 0;
642 2
643 2 RES[byte_count] = SBUF;
644 2 byte_count = byte_count + 1;
645 2
646 2 if (byte_count > MAX_CODE_LENGTH)
647 2 {
648 3 byte_count = 0;
649 3 }
650 2 else
651 2 {
652 3 }
653 2
654 2 if (
655 2 (byte_count >= 5) &&
656 2 (RES[byte_count-1] == 0xEA) &&
657 2 (RES[byte_count-2] == 0xEA) &&
658 2 (RES[byte_count-3] == 0xEA) &&
659 2 (RES[byte_count-4] == 0xEA) &&
660 2 (RES[byte_count-5] == 0xEA)
661 2 )
662 2 {
663 3 /*
664 3 * MCU reset, even though when running.
665 3 */
666 3 byte_count = 0;
667 3 send_string_interrupt("**** RESET ****\n");
668 3 send_string_interrupt("\n");
669 3 ISP_CONTR = ISP_CONTR | 0x20;
670 3 }
671 2 else
672 2 {
673 3 }
C51 COMPILER V9.00 SMCSS 11/10/2017 20:57:05 PAGE 12
674 2 }
675 1
676 1 if (TI == 1)
677 1 {
678 2 /*
679 2 * Is a transport interrupt.
680 2 */
681 2 }
682 1 }
683
684 /******************************************************************************
685 * Interrupt for Timer 0 overflow
686 *****************************************************************************/
687 void timer0_interrupt() interrupt 1
688 {
689 1 timer0_number = timer0_number + 1;
690 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2076 ----
CONSTANT SIZE = 516 ----
XDATA SIZE = 96 ----
PDATA SIZE = ---- ----
DATA SIZE = 6 18
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)