Debian Codegraph @

t/results/append_header_dos

raw
1 From [email protected] Wed Jul 1 13:17:17 1998
2 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
3 id AA10324; Wed, 1 Jul 1998 13:17:17 -0400
4 Received: from comp.uark.edu ([email protected] [130.184.252.197])
5 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id LAA00083
6 for <[email protected]>; Wed, 1 Jul 1998 11:56:44 -0400 (EDT)
7 Received: from comp.uark.edu (IDENT:[email protected] [130.184.201.233])
8 by comp.uark.edu (8.9.0/8.9.0) with ESMTP id KAA12202;
9 Wed, 1 Jul 1998 10:56:30 -0500 (CDT)
10 Sender: [email protected]
11 Message-Id: <[email protected]>
12 Date: Wed, 01 Jul 1998 10:56:30 -0500
13 From: Douglas Blank <[email protected]>
14 Organization: University of Arkansas, CS
15 X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.33 i686)
16 Mime-Version: 1.0
17 To: Aaron Edsinger <[email protected]>
18 Cc: handy <[email protected]>
19 Subject: Re: Serial Interface
20 References: <[email protected]>
21 Content-Type: text/plain; charset=us-ascii
22 Content-Transfer-Encoding: 7bit
23 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
24
25 Aaron Edsinger wrote:
26
27 > Hello,
28 > I've been having some problems using my HandyBoard to talk directly to my
29 > PC via the serial interface. I disable Interactive C and then Poke() and
30 > Peek() as has been described on this list. I send short character strings
31 > from my PC to the HandyBoard under Windows 95. If I send strings longer
32 > than 2 characters, it seems that some of the characters get lost. This
33 > behavior seems to be affected by repositioning or slightly modifying the
34 > code, suggesting perhaps a timing issue.
35
36 Although there is the HEXMON program, I too, have been trying to do what
37 you describe, and encountered the same problems. I found it to be a
38 timing issue, and, through trial and error, have a found some settings
39 that seem to work most of the time.
40
41 My goal was to make C code that looked the same when compiled and run on
42 the Host is the code that ran under IC.
43
44 I am including the host and HB programs here. If anyone knows of a
45 better way of communicating, please let us know.
46
47 -Doug Blank
48
49 =====================================================================
50 [email protected] Douglas Blank, University of Arkansas
51 Assistant Professor Computer Science
52 ==================== http://www.uark.edu/~dblank ====================
53
54 This code was written for MS C++4.0 running on Win95.
55
56 //************** BEGIN: serial_HOST.c
57
58 /* VC++4.0 HandyBoard Host Programming System
59 Dr. Douglas S. Blank
60 University of Arkansas, Department of Computer Science
61 www.uark.edu/~dblank
62
63 This code runs on a host PC.
64 */
65
66 #include <ctype.h>
67 #include <conio.h>
68 #include <stdlib.h>
69 #include <stdio.h>
70
71 #include "serial_HOST.h"
72
73 void main(int argc, char *argv[])
74 {
75 motor(0, 100);
76 motor(1, 100);
77 motor(2, 100);
78 motor(3, 100);
79 sleep(1000);
80 motor(0, -100);
81 motor(1, -100);
82 motor(2, -100);
83 motor(3, -100);
84 sleep(1000);
85 ao();
86 print("\nThis is a test");
87 printf("Knob is %d\n", knob() );
88 printf("Analog(0) is %d\n", analog(0));
89 printf("Digital(0) is %d\n", digital(0));
90 printf("Analog(1) is %d\n", analog(1));
91 printf("Digital(1) is %d\n", digital(1));
92 printf("Analog(2) is %d\n", analog(2));
93 printf("Digital(2) is %d\n", digital(2));
94 printf("Analog(3) is %d\n", analog(3));
95 printf("Digital(3) is %d\n", digital(3));
96 printf("Analog(4) is %d\n", analog(4));
97 printf("Digital(4) is %d\n", digital(4));
98 printf("Analog(5) is %d\n", analog(5));
99 printf("Digital(5) is %d\n", digital(5));
100 printf("Analog(6) is %d\n", analog(6));
101 printf("Digital(6) is %d\n", digital(6));
102 printf("Analog(7) is %d\n", analog(7));
103 printf("Digital(7) is %d\n", digital(7));
104 printf("Analog(8) is %d\n", analog(8));
105 printf("Digital(8) is %d\n", digital(8));
106 printf("Analog(9) is %d\n", analog(9));
107 printf("Digital(9) is %d\n", digital(9));
108 printf("Analog(10) is %d\n", analog(10));
109 printf("Digital(10) is %d\n", digital(10));
110 printf("Analog(11) is %d\n", analog(11));
111 printf("Digital(11) is %d\n", digital(11));
112 printf("Analog(12) is %d\n", analog(12));
113 printf("Digital(12) is %d\n", digital(12));
114 printf("Analog(13) is %d\n", analog(13));
115 printf("Digital(13) is %d\n", digital(13));
116 printf("Analog(14) is %d\n", analog(14));
117 printf("Digital(14) is %d\n", digital(14));
118 printf("Analog(15) is %d\n", analog(15));
119 printf("Digital(15) is %d\n", digital(15));
120 beep();
121 sleep(1000);
122 while (! stop_button() ) {
123 sprintf(buffer, "%d.0", (knob() * 10));
124 tone( buffer, "0.1");
125 }
126 }
127
128 //************** END: serial_HOST.c
129
130 //************** BEGIN: serial_HOST.h
131
132 /* VC++4.0 HandyBoard Host Programming System
133 Dr. Douglas S. Blank
134 University of Arkansas, Department of Computer Science
135 www.uark.edu/~dblank
136 */
137
138 #define MOTOR 0
139 #define AO 1
140 #define ANALOG 2
141 #define DIGITAL 3
142 #define PRINTF 4
143 #define KNOB 5
144 #define BEEP 6
145 #define TONE 7
146 #define START_BUTTON 8
147 #define STOP_BUTTON 9
148 #define QUIT 113
149
150 #define sleep(NUM) _sleep(NUM)
151 #define SERIALWAIT 5
152
153 unsigned short PORT = 0x3f8; // LPT1: 0x378 COM1: 0x3f8
154
155 int send(int i) {
156 int retval;
157 retval = _outp( PORT, i);
158 _sleep(SERIALWAIT);
159 return retval;
160 }
161
162 int receive() {
163 int retval;
164 retval = _inp( PORT);
165 _sleep(SERIALWAIT);
166 retval = _inp( PORT);
167 return retval;
168 }
169
170 void hangup() {
171 send(QUIT);
172 }
173
174 void print(char buffer[]) {
175 int i;
176 send(PRINTF);
177 for (i = 0; buffer[i] != 0; i++)
178 send(buffer[i]);
179 send('\0');
180 }
181
182 void motor(int motornum, int power) {
183 send(MOTOR);
184 send(motornum);
185 send(power + 100); // taken off on the other end
186 }
187
188 int analog(int sensor) {
189 send(ANALOG);
190 send(sensor);
191 return receive();
192 }
193
194 int digital(int sensor) {
195 send(DIGITAL);
196 send(sensor);
197 return receive();
198 }
199
200 void ao() {
201 send(AO);
202 }
203
204 int knob() {
205 send(KNOB);
206 return receive();
207 }
208
209 void beep() {
210 send(BEEP);
211 }
212
213 void tone(char f1[], char f2[]) {
214 int i;
215 send(TONE);
216 for (i = 0; f1[i] != 0; i++)
217 send(f1[i]);
218 send('\0');
219 for (i = 0; f2[i] != 0; i++)
220 send(f2[i]);
221 send('\0');
222 _sleep((unsigned long) (atof(f2) * 1000)); // to keep from
223 overflowing serial line
224 }
225
226 void interactive()
227 {
228 char c;
229 char key = ' ';
230 while (key != 'q') {
231 key = getch();
232 send(key);
233 printf("Sent %c\n", key);
234 c = receive();
235 printf("Got %c as a return value\n", c);
236 }
237 }
238
239 int start_button() {
240 send(START_BUTTON);
241 return receive();
242 }
243
244 int stop_button() {
245 send(STOP_BUTTON);
246 return receive();
247 }
248 //************** END: serial_HOST.h
249
250 //************** BEGIN: serial_HB.c
251
252 /* VC++4.0 HandyBoard Programming System
253 (Parts taken from other HB programs)
254 Dr. Douglas S. Blank
255 University of Arkansas, Department of Computer Science
256 www.uark.edu/~dblank
257
258 This code runs on the HB
259 */
260
261 #define MOTOR 0
262 #define AO 1
263 #define ANALOG 2
264 #define DIGITAL 3
265 #define PRINTF 4
266 #define KNOB 5
267 #define BEEP 6
268 #define TONE 7
269 #define START_BUTTON 8
270 #define STOP_BUTTON 9
271 #define QUIT 113
272
273 int _isspace(int a) /* returns 1 for space or tab, 0
274 otherwise */
275 /* internal routine used by atof() and
276 cgets() */
277
278 {
279 return ((a == 32) || (a == 9)); /* 32 is space, 9 is tab */
280 }
281
282 /*****************************************************************************/
283
284 int _isdigit(int a) /* returns 1 if a digit 0-9, 0 otherwise */
285 /* internal routine used by atof() */
286
287 {
288 return ((a >= 48) && (a <= 57)); /* 48 is '0', 57 is '9' */
289 }
290
291 float atof(char s[]) /* Convert a string containing a number in
292 ASCII */
293 /* form (integer, float, or exponential float)
294 to a */
295 /* float. Strips whitespace characters (space
296 and */
297 /* tab) from the front of the string, but
298 stops */
299 /* parsing at the first (unexpected)
300 non-numeric */
301 /* character if the string has garbage at the
302 end. */
303 /* This means that " 34.3foo78" translates to
304 34.3. */
305 /* Modified from atof() function in the
306 standard */
307 /* library of the Hi-Tec C compiler for
308 CP/M. */
309 /* Note: all string literals converted to
310 decimal */
311 /* form because IC can't deal with string
312 literals */
313 /* in math
314 calculations. */
315 /* Also note: very ugly code because IC will
316 not */
317 /* allow any math operations on pointers! Thus,
318 the */
319 /* the number string has to be treated as an
320 array! */
321 /* Also also note: no error handling; assumes
322 that */
323 /* the string is a valid representation of a
324 number! */
325 /* Valid range for exponential-format numbers
326 is */
327 /* approximately 2.0e-38 to
328 3.4e+38. */
329
330 {
331 int i=0; /* index into string array */
332 int sign=0; /* mantissa sign flag: 0=positive,
333 1=negative */
334 int exp0=0; /* mantissa exponent counter */
335 int eexp=0; /* E-form exponent counter */
336 int expsign=0; /* exponent sign flag: 0=positive,
337 1=negative */
338 float m=0.0; /* mantissa accumulator */
339
340 /* skip any leading whitespace (space, tab) */
341 while (_isspace(s[i]))
342 i++; /* skip it */
343
344 /* check for mantissa sign */
345 if (s[i] == 45) /* 45 is '-' */
346 {
347 sign = 1; /* flag minus sign */
348 i++; /* point to next */
349 }
350 else if (s[i] == 43) /* 43 is '+' */
351 i++; /* point to next */
352
353 /* now get all digits up to either a decimal point or an e/E */
354 while (_isdigit(s[i]))
355 {
356 m = 10.0*m + (float)(s[i] - 48); /* 48 is '0' */
357 i++; /* point to next */
358 }
359
360 /* no more digits, so check for decimal point */
361 if (s[i] == 46) /* 46 is '.' */
362 {
363 i++; /* point to next */
364 /* get all digits after decimal point */
365 while (_isdigit(s[i]))
366 {
367 exp0--;
368 m = 10.0*m + (float)(s[i] - 48); /* 48 is '0' */
369 i++; /* point to next */
370 }
371 }
372
373 /* check for e/E exponential form */
374 if ((s[i] == 101) || (s[i] == 69)) /* 101 is 'e', 69 is 'E' */
375 {
376 i++; /* point to next */
377 /* check for exponent sign */
378 if (s[i] == 45) /* 45 is '-' */
379 {
380 expsign = 1; /* flag negative exponent */
381 i++; /* point to next */
382 }
383 else if (s[i] == 43) /* 43 is '+' */
384 i++; /* point to next */
385
386 /* now get exponent */
387 while (_isdigit(s[i]))
388 {
389 eexp = eexp*10 + s[i] - 48; /* 48 is '0' */
390 i++; /* point to next */
391 }
392
393 /* adjust exponent sign */
394 if (expsign)
395 eexp = -eexp; /* make it negative */
396 }
397
398 /* compute absolute value of final float */
399 exp0 += eexp;
400 while (exp0 < 0) /* for negative exponents */
401 {
402 m = m / 10.0;
403 exp0++;
404 }
405 while (exp0 > 0) /* for positive exponents */
406 {
407 m = m * 10.0;
408 exp0--;
409 }
410
411 /* adjust final float sign from mantissa */
412 if (sign)
413 return (-m); /* negative */
414 else
415 return (m); /* positive */
416 }
417
418 void disable_pcode_serial()
419 /* necessary to receive characters using serial_getchar */
420 {
421 poke(0x3c, 1);
422 }
423
424 void reenable_pcode_serial()
425 /* necessary for IC to interact with board again */
426 {
427 poke(0x3c, 0);
428 }
429
430 /*
431 ======================================================================
432 For sending and receiving single bytes, you can use Randy's IC code:
433 */
434
435 void serial_putchar(int c)
436 {
437 while (!(peek(0x102e) & 0x80)); /* wait until serial transmit empty
438 */
439 poke(0x102f, c); /* send character */
440 }
441
442 int serial_getchar()
443 {
444 while (!(peek(0x102e) & 0x20)); /* wait for received character */
445 return peek(0x102f);
446 }
447
448 void main(void) {
449 int pos, c = ' ', var1, var2;
450 float f1, f2;
451 char buffer[80];
452 disable_pcode_serial();
453 beep();
454 printf("\nSerial IO Mode!");
455 printf("Listening...");
456 msleep(500L);
457 while (c != 'q') {
458 c = serial_getchar();
459 /* printf("[%d] ", c); */
460 if (c == MOTOR) {
461 var1 = serial_getchar();
462 var2 = serial_getchar() - 100;
463 motor(var1, var2);
464 } else if (c == AO) {
465 ao();
466 } else if (c == ANALOG) {
467 var1 = serial_getchar();
468 serial_putchar(analog(var1));
469 } else if (c == DIGITAL) {
470 var1 = serial_getchar();
471 serial_putchar(digital(var1));
472 } else if (c == PRINTF) {
473 pos = 0;
474 while (c != 0) {
475 buffer[pos++] = c;
476 c = serial_getchar();
477 }
478 buffer[pos] = '\0';
479 printf(buffer);
480 } else if (c == TONE) {
481 pos = 0;
482 c = serial_getchar();
483 while (c != 0) {
484 buffer[pos++] = c;
485 c = serial_getchar();
486 }
487 buffer[pos] = '\0';
488 f1 = atof(buffer);
489 pos = 0;
490 c = serial_getchar();
491 while (c != 0) {
492 buffer[pos++] = c;
493 c = serial_getchar();
494 }
495 buffer[pos] = '\0';
496 f2 = atof(buffer);
497 tone(f1, f2);
498 } else if (c == START_BUTTON) {
499 serial_putchar(start_button());
500 } else if (c == STOP_BUTTON) {
501 serial_putchar(stop_button());
502 } else if (c == BEEP) {
503 beep();
504 } else if (c == KNOB) {
505 serial_putchar(knob());
506 }
507 }
508 reenable_pcode_serial();
509 printf("\nHB Mode!");
510 }
511
512 //************** END: serial_HB.c
513
514 From [email protected] Wed Jul 1 02:44:06 1998
515 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
516 id AA22669; Wed, 1 Jul 1998 02:44:06 -0400
517 Received: from mail3.sirius.com (mail3.sirius.com [205.134.253.133])
518 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id CAA13214
519 for <[email protected]>; Wed, 1 Jul 1998 02:01:55 -0400 (EDT)
520 Received: from edsinger (ppp-asfm03--126.sirius.net [205.134.240.126])
521 by mail3.sirius.com (8.8.7/Sirius-8.8.7-97.08.12) with ESMTP id XAA26862
522 for <[email protected]>; Tue, 30 Jun 1998 23:01:54 -0700 (PDT)
523 Message-Id: <[email protected]>
524 From: "Aaron Edsinger" <[email protected]>
525 To: "handy" <[email protected]>
526 Subject: Serial Interface
527 Date: Wed, 1 Jul 1998 02:06:39 +0100
528 X-Msmail-Priority: Normal
529 X-Priority: 3
530 X-Mailer: Microsoft Internet Mail 4.70.1162
531 Mime-Version: 1.0
532 Content-Type: text/plain; charset=ISO-8859-1
533 Content-Transfer-Encoding: 7bit
534 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
535
536 Hello,
537 I've been having some problems using my HandyBoard to talk directly to my
538 PC via the serial interface. I disable Interactive C and then Poke() and
539 Peek() as has been described on this list. I send short character strings
540 from my PC to the HandyBoard under Windows 95. If I send strings longer
541 than 2 characters, it seems that some of the characters get lost. This
542 behavior seems to be affected by repositioning or slightly modifying the
543 code, suggesting perhaps a timing issue.
544
545 Why might this be? Is there any way to check for an error situation?
546
547 Thanks for any help,
548 Aaron
549 From [email protected] Thu Jul 16 03:13:49 1998
550 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
551 id AA23518; Thu, 16 Jul 1998 03:13:49 -0400
552 Received: from hq.freegate.com ([208.226.86.1])
553 by aleve.media.mit.edu (8.8.7/ML970927) with SMTP id CAA18991
554 for <[email protected]>; Thu, 16 Jul 1998 02:17:47 -0400 (EDT)
555 Received: (qmail+freegate 6968 invoked by alias); 16 Jul 1998 06:17:38 -0000
556 Received: from dialip-04.hq.freegate.com (HELO freegate.com) (208.226.86.222)
557 by hq.freegate.com with SMTP; 16 Jul 1998 06:17:38 -0000
558 Message-Id: <[email protected]>
559 Date: Wed, 15 Jul 1998 23:21:14 -0700
560 From: Chuck McManis <[email protected]>
561 Reply-To: [email protected]
562 Organization: Freegate Corporation
563 X-Mailer: Mozilla 4.04 [en] (Win95; I)
564 Mime-Version: 1.0
565 To: David Rye <[email protected]>
566 Cc: [email protected]
567 Subject: Re: Handyboard/RWP without p-code
568 References: <[email protected]>
569 Content-Type: text/plain; charset=us-ascii
570 Content-Transfer-Encoding: 7bit
571
572 Get a copy of icc11 v5.0 or later (from www.imagecraft.com) and use the
573 handyboard library from their site.
574
575 --Chuck
576
577 From [email protected] Thu Jul 16 03:42:38 1998
578 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
579 id AA24945; Thu, 16 Jul 1998 03:42:38 -0400
580 Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
581 by aleve.media.mit.edu (8.8.7/ML970927) with SMTP id CAA07415
582 for <[email protected]>; Thu, 16 Jul 1998 02:44:58 -0400 (EDT)
583 Received: from Aus.Sun.COM ([129.158.80.6]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id XAA29734; Wed, 15 Jul 1998 23:44:52 -0700
584 Received: from war.Aus.Sun.COM by Aus.Sun.COM id QAA03011
585 (SMI-8.6/SMI-4.1 for <>); Thu, 16 Jul 1998 16:44:50 +1000
586 Received: from drone by war.Aus.Sun.COM (SMI-8.6/SMI-SVR4)
587 id QAA10921; Thu, 16 Jul 1998 16:44:20 +1000
588 Message-Id: <[email protected]>
589 Date: Thu, 16 Jul 1998 16:41:56 +1000 (EST)
590 From: Scott Seaton - Systems Consultant - ESG <[email protected]>
591 Reply-To: Scott Seaton - Systems Consultant - ESG <[email protected]>
592 Subject: Re: Handyboard/RWP without p-code
593 To: [email protected], [email protected]
594 Mime-Version: 1.0
595 Content-Type: MULTIPART/mixed; BOUNDARY=Troop_of_Baboons_752_000
596 X-Mailer: dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 sun4u sparc
597 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
598
599 --Troop_of_Baboons_752_000
600 Content-Type: TEXT/plain; charset=us-ascii
601 Content-MD5: i/HKSIa/Vk0mZT5ml+q21A==
602
603 Hi
604
605 I suggest that you contact ImageCraft.
606 http://www.imagecraft.com/software/index.html or [email protected]
607
608 They have a C compiler for 68HC11 CPU's that will do what you want, including a
609 library for the HandyBoard (see attached e-mail) !
610
611 I have no affiliation with ImageCraft (other than as a satisfied customer).
612
613 Hope this helps
614 Scott
615 ==============================================================================
616 ,-_|\ Scott Seaton - Sun Enterprise Services - Systems Consultant
617 / \ Sun Microsystems Australia Pty Ltd E-mail : [email protected]
618 \_,-\_+ 828 Pacific Highway Phone : +61 2 9844 5381
619 v Gordon, N.S.W., 2072, AUSTRALIA Fax : +61 2 9844 5161
620 ==============================================================================
621
622 --Troop_of_Baboons_752_000
623 Content-Type: MESSAGE/rfc822; name=Mailbox
624 Content-Description: Mailbox
625
626 From [email protected] Fri Jul 10 18:59:26 1998
627 Return-Path: <[email protected]>
628 Received: from Aus.Sun.COM by war.Aus.Sun.COM (SMI-8.6/SMI-SVR4)
629 id SAA14426; Fri, 10 Jul 1998 18:59:26 +1000
630 Received: from earth.sun.com by Aus.Sun.COM id SAA24238
631 (SMI-8.6/SMI-4.1 for <<[email protected]>>); Fri, 10 Jul 1998 18:59:48 +1000
632 Received: from iisesun.iise.CSIRO.AU (iisesun.iise.csiro.au [130.155.5.44])
633 by earth.sun.com (8.8.8/8.8.8) with SMTP id BAA18609
634 for <[email protected]>; Fri, 10 Jul 1998 01:59:44 -0700 (PDT)
635 Received: from lists1.best.com (lists1.best.com [206.86.8.15]) by iisesun.iise.CSIRO.AU (SMI-8.6/8.6.12-IISE-SWA) with ESMTP id SAA25847 for <[email protected]>; Fri, 10 Jul 1998 18:49:31 +1000
636 Received: (from daemon@localhost) by lists1.best.com (8.9.0/8.8.BEST) id BAA15320 for [email protected]; Fri, 10 Jul 1998 01:04:34 -0700 (PDT)
637 Message-Id: <[email protected]>
638 From: Christina Willrich & Richard Man <[email protected]>
639 Subject: icc11 Handyboard library available
640 Date: Fri, 10 Jul 1998 00:58:49 -0700
641 BestServHost: lists.best.com
642 MIME-Version: 1.0
643 Content-Type: text/plain; charset="us-ascii"
644 Sender: [email protected]
645 Errors-To: [email protected]
646 Reply-To: [email protected]
647 To: [email protected]
648 content-length: 399
649 Status: RO
650 X-Status: $$$$
651 X-UID: 0000000001
652
653 At long last, I dusted off Chuck McManis Handyboard library and ported it
654 to V5. No reason why it can't work with V4.5 either ;-) Anyway, to try it
655 out, point your browser to
656
657 ftp://ftp.imagecraft.com/pub/libhb.zip
658
659 Chuck really did a great job with the LCD. There are commands to scroll,
660 move etc. Make sure you try the lcdtest2.c test.
661
662 // richard
663 [email protected] http://www.imagecraft.com
664
665
666 --Troop_of_Baboons_752_000--
667
668 From [email protected] Mon Jul 27 18:34:05 1998
669 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
670 id AA00723; Mon, 27 Jul 1998 18:34:05 -0400
671 Received: from theory.phys.vt.edu (theory.phys.vt.edu [128.173.176.33])
672 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id RAA19984
673 for <[email protected]>; Mon, 27 Jul 1998 17:22:26 -0400 (EDT)
674 Received: from localhost (wallace@localhost)
675 by theory.phys.vt.edu (8.8.5/8.8.5) with SMTP id RAA00312
676 for <[email protected]>; Mon, 27 Jul 1998 17:22:24 -0400 (EDT)
677 Date: Mon, 27 Jul 1998 17:22:24 -0400 (EDT)
678 From: Mark Wallace <[email protected]>
679 To: [email protected]
680 Subject: sonar.c for the handyboard
681 Message-Id: <[email protected]>
682 Mime-Version: 1.0
683 Content-Type: TEXT/PLAIN; charset=US-ASCII
684 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
685
686 Hello,
687 I have a handyboard and 6500 series poloroid ultrasonic ranging
688 system. I have downloaded the sonar.c programs used to drive the
689 transducer for distance measurements. There appears to be a problem, or
690 atleast I think there is, with it. The sonar device is supposed to give
691 distances of up to 35ft but the TCNC time register is 16 bit and in the
692 program it says "if ((peekwork(0x100e)-start_time) < 0)" too much time has
693 elapsed and it returns -1. Therefore as soon as about 32700 counts goes
694 by, that value will go negative. I believe hex goes from 0 to 32768 then
695 -32768 to -1. In this case the difference will be < 0 if the object
696 is greater then about 9 ft. I have taken this out of the program and can
697 get accurate measurements up to atleast 30 ft but I have to look at the
698 value given and add multiples of 2^16 to it to figure out where it is.
699 Taking this out of the program also can get you stuck if you really are
700 out of range.
701 I have looked on the motorola web pages to see about this clock
702 and it says that the clock goes till it reachs $ffff and then flags
703 somewhere that there is an overflow and then starts over. I don't know
704 how to find out were in the chip this information might be stored. I know
705 the TCNT time register is at 0x100e from the notes on Simplified Sonar for
706 the Handy Board but I don't know where that overflow flag is stored. I
707 thought that maybe by setting this flag and using it in the loop you might
708 be about to get a greater distance out of you measurement.
709 Another question I have is about IC. I would like to display
710 numbers greater then 32000 and right now there are several int type
711 variables and normal C comands don't seem to work to make a "long" or any
712 other type that are larger then 32000. How does IC handle larger numbers?
713 I am only a student and don't have much experience with this stuff
714 so I would appreciate any feedback I can get on either of these problems.
715 Thanks.
716
717 Mark Wallace
718
719 e-mail [email protected]
720 [email protected]
721 Web page http://sps1.phys.vt.edu/~mwallace/index.html
722
723 "What a waste it would be after 4 billion tortuous years of evolution if
724 the dominant organism contrived its own self-destruction"
725 Carl Sagan
726
727
728 From [email protected] Wed Aug 12 13:10:06 1998
729 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
730 id AA07529; Wed, 12 Aug 1998 13:10:06 -0400
731 Received: from quackerjack.cc.vt.edu ([email protected] [198.82.160.250])
732 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id MAA05729
733 for <[email protected]>; Wed, 12 Aug 1998 12:13:53 -0400 (EDT)
734 Received: from sable.cc.vt.edu (sable.cc.vt.edu [128.173.16.30])
735 by quackerjack.cc.vt.edu (8.8.8/8.8.8) with ESMTP id MAA20678
736 for <[email protected]>; Wed, 12 Aug 1998 12:20:09 -0400 (EDT)
737 Received: from research10.phys.vt.edu (dhcp9.phys.vt.edu [128.173.176.166])
738 by sable.cc.vt.edu (8.8.8/8.8.8) with SMTP id MAA05159
739 for <[email protected]>; Wed, 12 Aug 1998 12:13:51 -0400 (EDT)
740 Message-Id: <[email protected]>
741 X-Sender: [email protected] (Unverified)
742 X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32)
743 Date: Wed, 12 Aug 1998 12:13:45 -0400
744 To: [email protected]
745 From: Mark Wallace <[email protected]>
746 Subject: serial library for C++
747 Mime-Version: 1.0
748 Content-Type: text/plain; charset="us-ascii"
749 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
750
751 Hello,
752 I have a handy board with poloroid transducers and I am trying use the
753 results of my distance measurments in a C++ program on the computer. I
754 have found programs on the handyboard web page that should alow the
755 handyboard to transmit information over the serial line. What I am looking
756 for is if anyone knows were I could find a serial for Microsofts
757 Visual C++ 5.0. I would like to find one that is free or sharware but any
758 information on any serial that will work would be appreciated.
759 Thanks.
760 Mark Wallace
761
762 e-mail [email protected]
763 [email protected]
764 web page http://sps1.phys.vt.ede/~mwallace
765
766 "What a waist it would be after 4 billion tortuous years of evolution if
767 the dominant organism contrived its own self-distruction"
768 Carl Sagan
769
770
771 From [email protected] Wed Aug 12 13:42:19 1998
772 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
773 id AA13439; Wed, 12 Aug 1998 13:42:19 -0400
774 Received: from mail3.sirius.com (mail3.sirius.com [205.134.253.133])
775 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id MAA10630
776 for <[email protected]>; Wed, 12 Aug 1998 12:48:27 -0400 (EDT)
777 Received: from aarone (ppp-asfm05--041.sirius.net [205.134.241.41])
778 by mail3.sirius.com (8.8.7/Sirius-8.8.7-97.08.12) with SMTP id JAA20821;
779 Wed, 12 Aug 1998 09:48:24 -0700 (PDT)
780 Message-Id: <[email protected]>
781 From: "Aaron Edsinger" <[email protected]>
782 To: "Mark Wallace" <[email protected]>
783 Cc: "handy" <[email protected]>
784 Subject: Re: serial library for C++
785 Date: Wed, 12 Aug 1998 12:53:41 -0700
786 Mime-Version: 1.0
787 Content-Type: text/plain;
788 charset="iso-8859-1"
789 Content-Transfer-Encoding: 7bit
790 X-Priority: 3
791 X-Msmail-Priority: Normal
792 X-Mailer: Microsoft Outlook Express 4.72.2106.4
793 X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4
794 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
795
796
797 Check out this site. It works well. The only problem I had was timing
798 issues when trying to read and write to the port too quickly.
799
800 http://www.codeguru.com/show.cgi?general=/misc/misc_toc.shtml
801
802
803 -----Original Message-----
804 From: Mark Wallace <[email protected]>
805 To: [email protected] <[email protected]>
806 Date: Wednesday, August 12, 1998 9:25 AM
807 Subject: serial library for C++
808
809
810 >Hello,
811 > I have a handy board with poloroid transducers and I am trying use the
812 >results of my distance measurments in a C++ program on the computer. I
813 >have found programs on the handyboard web page that should alow the
814 >handyboard to transmit information over the serial line. What I am looking
815 >for is if anyone knows were I could find a serial library for Microsofts
816 >Visual C++ 5.0. I would like to find one that is free or sharware but any
817 >information on any serial librarys that will work would be appreciated.
818 >Thanks.
819 >Mark Wallace
820 >
821 > e-mail [email protected]
822 > [email protected]
823 >web page http://sps1.phys.vt.ede/~mwallace
824 >
825 >"What a waist it would be after 4 billion tortuous years of evolution if
826 >the dominant organism contrived its own self-distruction"
827 > Carl Sagan
828 >
829
830 From [email protected] Thu Jul 16 03:42:38 1998
831 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM)
832 id AA24945; Thu, 16 Jul 1998 03:42:38 -0400
833 Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
834 by aleve.media.mit.edu (8.8.7/ML970927) with SMTP id CAA07415
835 for <[email protected]>; Thu, 16 Jul 1998 02:44:58 -0400 (EDT)
836 Received: from Aus.Sun.COM ([129.158.80.6]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id XAA29734; Wed, 15 Jul 1998 23:44:52 -0700
837 Received: from war.Aus.Sun.COM by Aus.Sun.COM id QAA03011
838 (SMI-8.6/SMI-4.1 for <>); Thu, 16 Jul 1998 16:44:50 +1000
839 Received: from drone by war.Aus.Sun.COM (SMI-8.6/SMI-SVR4)
840 id QAA10921; Thu, 16 Jul 1998 16:44:20 +1000
841 Message-Id: <[email protected]>
842 Date: Thu, 16 Jul 1998 16:41:56 +1000 (EST)
843 From: Scott Seaton - Systems Consultant - ESG <[email protected]>
844 Reply-To: Scott Seaton - Systems Consultant - ESG <[email protected]>
845 Subject: Re: Handyboard/RWP without p-code
846 To: [email protected], [email protected]
847 Mime-Version: 1.0
848 Content-Type: MULTIPART/mixed; BOUNDARY=Troop_of_Baboons_752_000
849 X-Mailer: dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 sun4u sparc
850 X-Mailfolder: t/mailboxes/mailarc-1-dos.txt
851
852 --Troop_of_Baboons_752_000
853 Content-Type: TEXT/plain; charset=us-ascii
854 Content-MD5: i/HKSIa/Vk0mZT5ml+q21A==
855
856 Hi
857
858 I suggest that you contact ImageCraft.
859 http://www.imagecraft.com/software/index.html or [email protected]
860
861 They have a C compiler for 68HC11 CPU's that will do what you want, including a
862 library for the HandyBoard (see attached e-mail) !
863
864 I have no affiliation with ImageCraft (other than as a satisfied customer).
865
866 Hope this helps
867 Scott
868 ==============================================================================
869 ,-_|\ Scott Seaton - Sun Enterprise Services - Systems Consultant
870 / \ Sun Microsystems Australia Pty Ltd E-mail : [email protected]
871 \_,-\_+ 828 Pacific Highway Phone : +61 2 9844 5381
872 v Gordon, N.S.W., 2072, AUSTRALIA Fax : +61 2 9844 5161
873 ==============================================================================
874
875 --Troop_of_Baboons_752_000
876 Content-Type: MESSAGE/rfc822; name=Mailbox
877 Content-Description: Mailbox
878
879 From [email protected] Fri Jul 10 18:59:26 1998
880 Return-Path: <[email protected]>
881 Received: from Aus.Sun.COM by war.Aus.Sun.COM (SMI-8.6/SMI-SVR4)
882 id SAA14426; Fri, 10 Jul 1998 18:59:26 +1000
883 Received: from earth.sun.com by Aus.Sun.COM id SAA24238
884 (SMI-8.6/SMI-4.1 for <<[email protected]>>); Fri, 10 Jul 1998 18:59:48 +1000
885 Received: from iisesun.iise.CSIRO.AU (iisesun.iise.csiro.au [130.155.5.44])
886 by earth.sun.com (8.8.8/8.8.8) with SMTP id BAA18609
887 for <[email protected]>; Fri, 10 Jul 1998 01:59:44 -0700 (PDT)
888 Received: from lists1.best.com (lists1.best.com [206.86.8.15]) by iisesun.iise.CSIRO.AU (SMI-8.6/8.6.12-IISE-SWA) with ESMTP id SAA25847 for <[email protected]>; Fri, 10 Jul 1998 18:49:31 +1000
889 Received: (from daemon@localhost) by lists1.best.com (8.9.0/8.8.BEST) id BAA15320 for [email protected]; Fri, 10 Jul 1998 01:04:34 -0700 (PDT)
890 Message-Id: <[email protected]>
891 From: Christina Willrich & Richard Man <[email protected]>
892 Subject: icc11 Handyboard library available
893 Date: Fri, 10 Jul 1998 00:58:49 -0700
894 BestServHost: lists.best.com
895 MIME-Version: 1.0
896 Content-Type: text/plain; charset="us-ascii"
897 Sender: [email protected]
898 Errors-To: [email protected]
899 Reply-To: [email protected]
900 To: [email protected]
901 content-length: 399
902 Status: RO
903 X-Status: $$$$
904 X-UID: 0000000001
905
906 At long last, I dusted off Chuck McManis Handyboard library and ported it
907 to V5. No reason why it can't work with V4.5 either ;-) Anyway, to try it
908 out, point your browser to
909
910 ftp://ftp.imagecraft.com/pub/libhb.zip
911
912 Chuck really did a great job with the LCD. There are commands to scroll,
913 move etc. Make sure you try the lcdtest2.c test.
914
915 // richard
916 [email protected] http://www.imagecraft.com
917
918
919 --Troop_of_Baboons_752_000--
920