1From goldt@et.byu.edu Tue Jul 7 20:33:03 1998 2Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 3 id AA32480; Tue, 7 Jul 1998 20:33:03 -0400 4Received: from wormwood.ee.byu.edu (wormwood.ee.byu.edu [128.187.30.54]) 5 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id TAA30127 6 for <handyboard@media.mit.edu>; Tue, 7 Jul 1998 19:48:43 -0400 (EDT) 7Received: from wormwood (localhost [127.0.0.1]) by wormwood.ee.byu.edu with SMTP (8.7.6/8.7.1) id RAA26916 for <handyboard@media.mit.edu>; Tue, 7 Jul 1998 17:48:42 -0600 (MDT) 8Sender: goldt@ee.byu.edu 9Message-Id: <35A2B3D9.1260@et.byu.edu> 10Date: Tue, 07 Jul 1998 17:48:41 -0600 11From: "Timothy B. Gold" <goldt@et.byu.edu> 12X-Mailer: Mozilla 3.04Gold (X11; I; HP-UX B.10.20 9000/780) 13Mime-Version: 1.0 14To: handyboard@media.mit.edu 15Subject: Interrupt Handler for Serial communication 16Content-Type: multipart/mixed; boundary="------------18CC6AC44E2E" 17 18This is a multi-part message in MIME format. 19 20--------------18CC6AC44E2E 21Content-Type: text/plain; charset=us-ascii 22Content-Transfer-Encoding: 7bit 23 24Here's a bit of code that will buffer incoming serial information so 25that no information will be lost when transmitting to the handy board. 26There are two files: serial_isr.c and serial_isr.asm. You'll need to 27assemble the .asm file using as11_ic, and then both the .c file and the 28.icb file need to be loaded onto the handy board. I'm sure improvements 29could be made to the code to clean it up a little, but it's a start (and 30I haven't had any problems with it yet). Enjoy! 31 32--------------18CC6AC44E2E 33Content-Type: text/plain; charset=us-ascii; name="serial_isr.c" 34Content-Transfer-Encoding: 7bit 35Content-Disposition: inline; filename="serial_isr.c" 36 37/* C program to read serial port with interrupt service routine */ 38/* First version: Written by Anton Wirsch 20 Nov 1997 */ 39 40/* 41 42 Second Version: Written by Tim Gold 27 May 1998 43 BYU Robotics Lab 44 goldt@et.byu.edu 45 46 Really, the only thing left from the original code are a few 47 lines in the .asm file. Everything else I pretty much had to 48 rewrite from scratch to get it to work the way I wanted to. 49 But the orignal code by Anton was a very helpful starting point. 50 51 Needed files: serial_isr.c 52 serial_isr.icb 53 serial_isr.asm (needed to change the buffer size) 54 55 The buffer size here is 32 bytes (probably much larger than it needs 56 to be.) To change the buffer size, do the following: 57 1. Change the BUFFER_SIZE constant below to the 58 desired number of bytes. 59 2. Edit the line(s) in the serial_isr.asm which contain 60 the word "EDIT" in the comment so that the value 61 matches that of BUFFER_SIZE. 62 3. Recreate the serial_isr.icb file by typing the following: 63 > as11_ic serial_isr.asm 64 65 */ 66 67 68 69 70#define BUFFER_SIZE 32 /* change buffer size here -- see above */ 71 72/* various constants used by the program... */ 73#define BAUD 0x102b /* baud rate set to 9600 */ 74#define SCCR2 0x102d 75#define SCCR1 0x102c 76#define SCSR 0x102e 77#define SCDR 0x102f 78 79int buffer[BUFFER_SIZE]; /* this is the actual buffer */ 80 81 82void initSerial() 83{ 84 /* Call this routine to activate the serial interrupt handler. */ 85 int i,temp; 86 87 /* clear out buffer */ 88 for(i=0; i<BUFFER_SIZE; i++) 89 buffer[i] = 0; 90 91 /* clear vairous flags */ 92 DATA_FLAG = 0; 93 INCOMING = 0; 94 CURRENT = 0; 95 96 /* pass address of buffer to interrupt routine */ 97 buffer_ptr = (int) buffer; 98 BASE_ADDR = (int) buffer; 99 100 /* activate interrupt routine */ 101 temp = peek(SCCR2); 102 temp |= 0x24; 103 poke(SCCR2, temp); 104 poke(0x3c, 1); 105} 106 107void closeSerial() 108{ 109 int temp; 110 111 /* deactivate the interrupt routine */ 112 temp = peek(SCCR2); 113 temp &= 0xdf; 114 poke(SCCR2, temp); 115 READ_SERIAL = 0x0000; 116 poke(0x3c, 0); 117 118} 119 120void serialPutChar(int c) 121{ 122 /* call this function to write a character to the serial port */ 123 124 while (!(peek(0x102e) & 0x80)); 125 poke(0x102f, c); 126 127} 128 129 130int dataAvailable() 131{ 132 /* This function can be used to check to see if any data is available */ 133 return DATA_FLAG; 134} 135 136 137int serialGetChar() 138{ 139 /* Create blocking getchar for serial port... */ 140 int return_char; 141 142 /* loop until data is available */ 143 while(!DATA_FLAG); 144 145 /* get the character to return */ 146 return_char = buffer[CURRENT]; 147 148 /* check for wrap around... */ 149 CURRENT++; 150 if(CURRENT == BUFFER_SIZE) 151 CURRENT = 0; 152 if(CURRENT == INCOMING) 153 DATA_FLAG = 0; 154 return return_char; 155 156} 157 158 159 160 161 162--------------18CC6AC44E2E 163Content-Type: text/plain; charset=us-ascii; name="serial_isr.asm" 164Content-Transfer-Encoding: 7bit 165Content-Disposition: inline; filename="serial_isr.asm" 166 167/* This sets up the serial interrupt service routine */ 168/* First Version: Written by Anton L. Wirsch 20 Nov 1997 */ 169/* Second Version: Written by Tim Gold 27 May 1998 170 BYU Robotics Lab 171 goldt@et.byu.edu 172 173 Really, the only thing left from the original code are a few 174 lines in the .asm file. Everything else I pretty much had to 175 rewrite from scratch to get it to work the way I wanted to. 176 But the orignal code by Anton was a very helpful starting point. 177 178 Needed files: serial_isr.c 179 serial_isr.icb 180 serial_isr.asm (needed to change the buffer size) 181 182 The buffer size here is 32 bytes (probably much larger than it needs 183 to be.) To change the buffer size, do the following: 184 1. Change the BUFFER_SIZE constant in serial_isr.c to the 185 desired number of bytes. 186 2. Edit the line in this fils which contains 187 the word "EDIT" in the comment so that the value 188 matches that of BUFFER_SIZE. 189 3. Recreate the serial_isr.icb file by typing the following: 190 > as11_ic serial_isr.asm 191*/ 192 193 194/* change this line to match your library path... */ 195#include "/usr/local/ic/libs/6811regs.asm" 196 197 ORG MAIN_START 198variable_CURRENT: 199 FDB 00 * ptr to next data to be read by user 200 201variable_INCOMING: 202 FDB 00 * number of bytes received (circular count) 203 204variable_BASE_ADDR: 205 FDB 00 * base address of buffer (to be set by init routine) 206 207variable_DATA_FLAG: 208 FDB 00 * flag set when data is available 209 210variable_buffer_ptr: 211 FDB 00 * pointer to CURRENT buffer 212 213subroutine_initialize_module: 214/* change this line to match your library path... */ 215#include "/usr/local/ic/libs/ldxibase.asm" 216 217 ldd SCIINT,X 218 std interrupt_code_exit+1 219 ldd #interrupt_code_start 220 std SCIINT,X 221 222 rts 223 224interrupt_code_start: 225 ldad variable_INCOMING * store INCOMING into AB 226 cmpb #00 * compare B with 0 227 bhi skip * goto "skip" if (B > 0) 228 ldx variable_BASE_ADDR * STORE ADDRESS OF ARRY IN X 229 inx * SKIP THE FIRST (?) 230 inx * TWO BYTES (?) 231 inx * OFFSET TO THE HIGHER BYTE (?) 232 stx variable_buffer_ptr * SAVE PTR VALUE 233 bra cont 234 235skip: 236 ldx variable_buffer_ptr * load buffer pointer into x 237cont: 238 ldad variable_INCOMING * load INCOMING into AB 239 incb * increment INCOMING 240 cmpb #32 * compare B and 32 --EDIT TO CHANGE BUFFER SIZE-- 241 beq reset_count * if a=32, goto reset_count 242 bra cont1 243reset_count: 244 ldad #00 * set count to zero 245cont1: 246 stad variable_INCOMING * store AB into INCOMING 247 248 ldab SCSR * load SCSR (SCI status register) into B (why?) 249 ldab SCDR * load SCSR (SCI data register) into B 250 251 stab ,X * store data in array 252 inx * increment by two bytes 253 inx 254 stx variable_buffer_ptr * save the pointer value 255 ldad #01 * load 1 into AB 256 stad variable_DATA_FLAG * store AB into DATA_FLAG (indicating data is available) 257interrupt_code_exit: 258 jmp $0000 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275--------------18CC6AC44E2E-- 276 277 278 279From dakott@alpha.delta.edu Wed Jul 1 05:33:51 1998 280Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 281 id AA20653; Wed, 1 Jul 1998 05:33:51 -0400 282Received: from alpha.delta.edu (alpha.delta.edu [161.133.129.3]) 283 by aleve.media.mit.edu (8.8.7/ML970927) with SMTP id EAA12514 284 for <handyboard@media.mit.edu>; Wed, 1 Jul 1998 04:41:22 -0400 (EDT) 285Received: from pm295-18.dialip.mich.net by alpha.delta.edu; (5.65v3.0/1.1.8.2/06Jan97-0932AM) 286 id AA31111; Wed, 1 Jul 1998 04:44:45 -0400 287Received: from kott.my.domain (dakott@kott.my.domain [192.168.0.1]) 288 by kott.my.domain (8.8.8/8.8.5) with SMTP id WAA20239; 289 Tue, 30 Jun 1998 22:34:32 -0400 (EDT) 290Date: Tue, 30 Jun 1998 22:34:31 -0400 (EDT) 291From: David Kott <dakott@alpha.delta.edu> 292Sender: dakott@kott.my.domain 293To: brian-c@technologist.com 294Cc: handyboard@media.mit.edu 295Subject: Re: microcontroller 296In-Reply-To: <199806291430.KAA07909@web01.globecomm.net> 297Message-Id: <Pine.BSF.3.96.980630222514.20212A-100000@kott.my.domain> 298Mime-Version: 1.0 299Content-Type: TEXT/PLAIN; charset=US-ASCII 300 301On Mon, 29 Jun 1998 brian-c@technologist.com wrote: 302 303> -I'd like to say thanks to all the folks who replied 304> to my question on the microcontroller speeds. 305> 306> Here's another general question about them though. 307> Should any unused pins be left open or should they 308> be grounded? 309> 310 311Eeeeeeeeeeek! Outputs left floating, CMOS inputs taken to ground with a 3124.7K resistor... presuming, of course, that a Logic 0 on that input won't 313generate adverse effects, e.g. a grounded active low interrupt line 314might be a problem. Such inputs should be taken to +5 with a 4.7K 315resistor. 316 317Floating CMOS inputs have a tendency to oscillate with the merest whisper 318of a voltage. 319 320TTL inputs may be left floating. 321 322Driving an output externally will just heat up your CPU.. or worse. 323 324 -d 325 326-- 327 The box said "Requires Windows 95/NT or better"... 328 So I got Unix. 329 330Free the Source. Free your Computer... http://www.FreeBSD.org 331 http://www.NetBSD.org 332 http://www.OpenBSD.org 333 334From rshirk@sfgate.com Sun Mar 22 01:52:45 1998 335Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 336 id AA06355; Sun, 22 Mar 1998 01:52:45 -0500 337Received: from cyber.sfgate.com (cyber.sfgate.com [198.93.154.11]) 338 by aleve.media.mit.edu (8.8.7/ML970927) with SMTP id BAA23676 339 for <handyboard@media.mit.edu>; Sun, 22 Mar 1998 01:08:09 -0500 (EST) 340Received: from localhost by cyber.sfgate.com with smtp 341 (Smail3.2 #1) id m0yGduz-000Is1C; Sat, 21 Mar 1998 22:07:37 -0800 (PST) 342Date: Sat, 21 Mar 1998 22:07:37 -0800 (PST) 343From: Richard <rshirk@sfgate.com> 344X-Sender: rshirk@cyber 345To: handyboard@media.mit.edu 346Subject: Frob nobs and IR 347Message-Id: <Pine.SOL.3.96.980321212443.21628C-200000@cyber> 348Mime-Version: 1.0 349Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1804928587-890546857=:21628" 350 351 This message is in MIME format. The first part should be readable text, 352 while the remaining parts are likely unreadable without MIME-aware tools. 353 Send mail to mime@docserver.cac.washington.edu for more info. 354 355---559023410-1804928587-890546857=:21628 356Content-Type: TEXT/PLAIN; charset=US-ASCII 357 358OK...Im now pretty happy with states of things but I still have a few 359questions I hope you can help me answer. The code attached works and 360everything, but only when i take the bit about playing the songs out. 361 362problem 1) 363 It 364keeps saying that play is undefined. I saw that before and fixed it by 365changing the names of the labels of the songs. I tried it this time and 366it didnt work...i was wondering if anyone out there knows why it does this 367and how to correct it.... 368 369problem 2) 370 371I figured out (thanks to you guys) how to work the built in IR sensor to 372detect and act upon 4 signals. One is for behing hostile, 3 is for 373seeking, signal 5 is when it gets annoyed, and 7 it just beeps and ignores 374it. 375The signal for being Hostile responds quickly and prints H on the screen 376but the others lag and i was wondering if you knew why this was. 377 378-Richard 379 380---559023410-1804928587-890546857=:21628 381Content-Type: TEXT/PLAIN; charset=US-ASCII; name="xbump2.c" 382Content-Transfer-Encoding: BASE64 383Content-ID: <Pine.SOL.3.96.980321220737.21628D@cyber> 384Content-Description: 385 386LyogVGhpcyBpcyAoc2xpZ2h0bHkgbW9kaWZpZWQpIGRlZmF1bHQgdG91Y2gg 387bmF2aWdhdGlvbiAqLw0gICAgICAgICBjaGFyIHBuX3NvbmdbXT0gIjEjZCA0 388ZTNyM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GlmICgoIGtub2IoICkgKSA9 406PSAxMTYpDSAgICAgICAgICB7DSAgICAgICAgICAgICAgICBwcmludGYoIkhF 407TExPLCBKVURHRVMhXG4iKTsNICAgICAgICAgICAgICAgIG1zbGVlcCg1MDBM 408KTsNICAgICAgICAgIH0NICAgIH0NDSAgIHByaW50ZiggIlByZXNzIFNUQVJU 409XG4iICk7DSAgIHN0YXJ0X3ByZXNzKCk7ICAgLyogd2FpdCAndGlsIGJ1dHRv 410biBpcyBwcmVzc2VkICovDSAgIGJlZXAoKTsNICAgcHJpbnRmKCAiU3RhbmQg 411YmFjay4uLlxuIiApOw0gICBzbGVlcCggMS4wICk7IA0gICAvKiBpbml0aWF0 412ZSBmb3J3YXJkIG1vdGlvbiAqLw0gICBmZCggMiApOw0gICBmZCggMyApOw0g 413ICB3aGlsZSggMSApICAgLyogZmVlZGJhY2sgbG9vcCAqLw0gICB7DSAgICAg 414IGlmKCAhIGRpZ2l0YWwoIDcgKSApICAgLyogY2hlY2sgbGVmdCBidW1wZXIg 415Ki8NICAgICAgew0gICAgICAgICAvKiByZXZlcnNlICovDSAgICAgICAgIGJl 416ZXAoKTsNICAgICAgICAgYmsoIDIgKTsNICAgICAgICAgYmsoIDMgKTsNICAg 417ICAgICAgbXNsZWVwKCByZXZlcnNlX3RpbWUgKTsNDSAgICAgICAgIC8qIHR1 418cm4gcmlnaHQgKi8NICAgICAgICAgZmQoIDIgKTsNICAgICAgICAgYmsoIDMg 419KTsNICAgICAgICAgbXNsZWVwKCB0dXJuX3RpbWUgKTsNDSAgICAgICAgIC8q 420IHJlc2V0IGZvcndhcmQgbW90aW9uICovDSAgICAgICAgIHByaW50ZiggIjAi 421ICk7DSAgICAgICAgIGZkKCAyICk7DSAgICAgICAgIGZkKCAzICk7DQ0gICAg 422ICB9DQ0gICAgICBlbHNlIGlmKCAhIGRpZ2l0YWwoIDExICkgKSAgIC8qIGNo 423ZWNrIG1pZGRsZSBidW1wZXIgKi8NICAgICAgew0gICAgICAgICAvKiByZXZl 424cnNlICovDSAgICAgICAgIGJlZXAoKTsNICAgICAgICAgYmsoIDIgKTsNICAg 425ICAgICAgYmsoIDMgKTsNICAgICAgICAgbXNsZWVwKCByZXZlcnNlX3RpbWUg 426KTsNDSAgICAgICAgIC8qIHR1cm4gYXJvdW5kICovDSAgICAgICAgIGZkKCAy 427ICk7DSAgICAgICAgIGJrKCAzICk7DSAgICAgICAgIG1zbGVlcCggdHVybmFy 428b3VuZF90aW1lICk7DQ0gICAgICAgICAvKiByZXNldCBmb3J3YXJkIG1vdGlv 429biAqLw0gICAgICAgICBwcmludGYoICIxIiApOw0gICAgICAgICBmZCggMiAp 430Ow0gICAgICAgICBmZCggMyApOw0gICAgICB9DQ0gICAgICBlbHNlIGlmKCAh 431IGRpZ2l0YWwoIDE1ICkgKSAgIC8qIGNoZWNrIHJpZ2h0IGJ1bXBlciAqLw0g 432ICAgICB7DSAgICAgICAgIC8qIHJldmVyc2UgKi8NICAgICAgICAgYmVlcCgp 433Ow0gICAgICAgICBiayggMiApOw0gICAgICAgICBiayggMyApOw0gICAgICAg 434ICBtc2xlZXAoIHJldmVyc2VfdGltZSApOw0NICAgICAgICAgLyogdHVybiBs 435ZWZ0ICovDSAgICAgICAgIGJrKCAyICk7DSAgICAgICAgIGZkKCAzICk7DSAg 436ICAgICAgIG1zbGVlcCggdHVybl90aW1lICk7DQ0gICAgICAgICAvKiByZXNl 437dCBmb3J3YXJkIG1vdGlvbiAqLw0gICAgICAgICBwcmludGYoICIyIiApOw0g 438ICAgICAgICBmZCggMiApOw0gICAgICAgICBmZCggMyApOw0gICAgIH0NICAg 439ICBlbHNlIGlmKGlyX2RhdGEoIDAgKSA9PSAxMjggKSAvKkNoZWNrIElSIHJl 440Y2lldmVyKi8NICAgICAgew0gICAgICAgICAgcHJpbnRmKCJIIik7DSAgICAg 441ICAgIC8qIHR1cm4gcmlnaHQgKi8NICAgICAgICAgZmQoIDIgKTsNICAgICAg 442ICAgYmsoIDMgKTsNICAgICAgICAgbXNsZWVwKCB0dXJuX3RpbWUgKTsNICAg 443ICAgICAgIC8qQXR0YWNrLi4uUm9ib3QgaXMgSG9zdGlsZSAqLw0gICAgICAg 444ICAgYmVlcCgpOyANICAgICAgICAgIGZkKCAyICk7DSAgICAgICAgICBmZCgg 445MyApOw0gICAgICAgICAgYmVlcCgpOw0gICAgIH0NICAgICBlbHNlIGlmKGly 446X2RhdGEoIDAgKSA9PSAxMzAgKSAvKkNoZWNrIElSIHJlY2lldmVyKi8NICAg 447ICAgew0gICAgICAgICAgcHJpbnRmKCJTIik7DSAgICAgICAgIC8qIHR1cm4g 448cmlnaHQgKi8NICAgICAgICAgZmQoIDIgKTsNICAgICAgICAgYmsoIDMgKTsN 449ICAgICAgICAgbXNsZWVwKCB0dXJuX3RpbWUgKTsNICAgICAgICAgIC8qUm9i 450b3QgaXMgaW4gbG92ZSEgRG8gYSBsaWwgZGFuY2UhICovDSAgICAgICAgICBi 451ZWVwKCk7DSAgICAgICAgICBiZWVwKCk7IA0gICAgICAgICAgZmQoIDIgKTsN 452ICAgICAgICAgIGZkKCAzICk7DSAgICAgICAgICBtc2xlZXAoIHR1cm5fdGlt 453ZSApOw0gICAgICAgICAgYmsoIDIgKTsNICAgICAgICAgIGJrKCAzICk7DSAg 454ICAgICAgICBtc2xlZXAoIHJldmVyc2VfdGltZSApOyANICAgICAgICAgIC8q 455R28gZm9yd2FyZCEqLw0gICAgICAgICAgZmQoIDIgKTsNICAgICAgICAgIGZk 456KCAzICk7DSAgICAgICAgICBiZWVwKCk7DSAgICAgICAgICBiZWVwKCk7DSAg 457ICAgfQ0gICAgIGVsc2UgaWYoaXJfZGF0YSggMCApID09IDEzMiApIC8qQ2hl 458Y2sgSVIgcmVjaWV2ZXIqLw0gICAgICB7DSAgICAgICAgICBwcmludGYoIkEi 459KTsNICAgICAgICAvKiByZXZlcnNlICovDSAgICAgICAgIGJlZXAoKTsNICAg 460ICAgICAgYmsoIDIgKTsNICAgICAgICAgYmsoIDMgKTsNICAgICAgICAgbXNs 461ZWVwKCByZXZlcnNlX3RpbWUgKTsNICAgICAgICAgIC8qUm9ib3QgaXMgQW5u 462b3llZCEgVHVybnMgY29tcGxldGVseSBhcm91bmQgaW4gZGlndXN0Ki8gICAg 463ICAgDSAgICAgICAgIGJlZXAoKTsNICAgICAgICAgYmVlcCgpOyANICAgICAg 464ICAgYmVlcCgpOw0gICAgICAgICBmZCggMiApOw0gICAgICAgICBiayggMyAp 465Ow0gICAgICAgICBtc2xlZXAoIHR1cm5hcm91bmRfdGltZSApOw0gICAgICAg 466ICAgZmQoIDIgKTsNICAgICAgICAgIGZkKCAzICk7DSAgICAgICAgICBiZWVw 467KCk7DSAgICAgICAgICBiZWVwKCk7IA0gICAgICAgICAgYmVlcCgpOw0NICAg 468ICB9DSAgICAgZWxzZSBpZihpcl9kYXRhKCAwICkgPT0gMTM0ICkgLypDaGVj 469ayBJUiByZWNpZXZlciovDSAgICAgIHsNICAgICAgICAgIHByaW50ZigiSSIp 470Ow0gICAgICAgICAgLypSb2JvdCBkb2Vzbid0IGNhcmUgKi8NICAgICAgICAg 471IGJlZXAoKTsgDSAgICAgICAgICBiZWVwKCk7DSAgICAgICAgICBiZWVwKCk7 472IA0gICAgICAgICAgYmVlcCgpOw0gICAgICAgICAgZmQoIDIgKTsNICAgICAg 473ICAgIGZkKCAzICk7DSAgICAgICAgICBiZWVwKCk7DSAgICAgICAgICBiZWVw 474KCk7DSAgICAgICAgICBiZWVwKCk7IA0gICAgICAgICAgYmVlcCgpOw0gDSAg 475ICB9DQ0gICB9DX0N 476---559023410-1804928587-890546857=:21628-- 477 478From mwallace@sps1.phys.vt.edu Mon Aug 3 12:05:51 1998 479Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 480 id AA15988; Mon, 3 Aug 1998 12:05:51 -0400 481Received: from sps1.phys.vt.edu (sps1.phys.vt.edu [128.173.176.53]) 482 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id LAA12381 483 for <handyboard@media.mit.edu>; Mon, 3 Aug 1998 11:16:53 -0400 (EDT) 484Received: from localhost (mwallace@localhost) 485 by sps1.phys.vt.edu (8.8.7/8.8.7) with SMTP id LAA20283; 486 Mon, 3 Aug 1998 11:16:50 -0400 487Date: Mon, 3 Aug 1998 11:16:50 -0400 (EDT) 488From: Mark Wallace <mwallace@sps1.phys.vt.edu> 489To: alf.kuchenbuch@usa.net 490Cc: handyboard@media.mit.edu 491Subject: Re: Polaroid trouble again 492In-Reply-To: <35C5C521.446B@eikon.e-technik.tu-muenchen.de> 493Message-Id: <Pine.LNX.3.96.980803105221.20258A-100000@sps1.phys.vt.edu> 494Mime-Version: 1.0 495Content-Type: TEXT/PLAIN; charset=US-ASCII 496 497 I had this same problem when I got mine a few weeks ago. I ended up 498putting a capacitor from pin 1 to pin 3 on U2 of the sonar driver board. 499I also had to take out the 1k resistor from the BINH. It kept 500BINH at 1 V instead of Zero and that seamed to cause problems. 501 As for the 6 ft problem, it should be closer to 9 ft. I think 502the problem there is the IC code you used. If you used the code for 503SONAR.C from the HB web site then there is a problem with it. What that 504program does is take the difference in time from the internal clock. the 505problem is that in the code it says that if the difference between start 506time and currnet time is negative too much time has elapsed. Well, this 507has a 16 bit counter so when the difference is greater the about 32,700 it 508becomes negative. If you do the math, that means at about 9 ft that 509happens so it tell you you are out of range. 510 The way I fixed this was to slow the clock down. 511 512I looked up information on the motorola web page and found where the 513prescalers were for the clock. 514 If you want to slow it down by a factor of four you can just add 515this line to you program in sonar_init() 516 517 bit_set(0x1024, 1); 518 519I believe bit_set(0x1024, 2); will slow it down by a factor of 8 and 520bit_set(0x1024, 3); will slow it down by a factor of 16. 521 There are better ways of fixing this problem but they appear much 522more complicated. For example the motorola chip has an overflow flag that 523says when the internal clock flips. You could incorporate that into your 524code instead of slowing the clock down. Good luck and I hope this helps. 525 526Mark Wallace 527 528 e-mail mawalla3@vt.edu 529 mwallace@sps1.phys.vt.edu 530Web page http://sps1.phys.vt.edu/~mwallace/index.html 531 532"What a waste it would be after 4 billion tortuous years of evolution if 533the dominant organism contrived its own self-destruction" 534 Carl Sagan 535 536On Mon, 3 Aug 1998, Alf Kuchenbuch wrote: 537 538> Hi! 539> I am having trouble with my Polaroid sonar: 540> When I keep my HB hooked up 541> to external power, I will only get correct readings up to 20 inches. As 542> soon as I use battery power without hooking it up to external power, the 543> readings are correct up to 6 feet, not more! This sound like EMI, I 544> guess. I tried all the capacitor tricks from HB mailing list, but in 545> vain. Do you know a fix that works? 546> 547> Alf H. Kuchenbuch 548> 549 550 551From mawalla3@vt.edu Wed Aug 12 13:10:06 1998 552Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 553 id AA07529; Wed, 12 Aug 1998 13:10:06 -0400 554Received: from quackerjack.cc.vt.edu (root@quackerjack.cc.vt.edu [198.82.160.250]) 555 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id MAA05729 556 for <Handyboard@media.mit.edu>; Wed, 12 Aug 1998 12:13:53 -0400 (EDT) 557Received: from sable.cc.vt.edu (sable.cc.vt.edu [128.173.16.30]) 558 by quackerjack.cc.vt.edu (8.8.8/8.8.8) with ESMTP id MAA20678 559 for <Handyboard@media.mit.edu>; Wed, 12 Aug 1998 12:20:09 -0400 (EDT) 560Received: from research10.phys.vt.edu (dhcp9.phys.vt.edu [128.173.176.166]) 561 by sable.cc.vt.edu (8.8.8/8.8.8) with SMTP id MAA05159 562 for <Handyboard@media.mit.edu>; Wed, 12 Aug 1998 12:13:51 -0400 (EDT) 563Message-Id: <3.0.5.32.19980812121345.00796960@mail.vt.edu> 564X-Sender: mawalla3@mail.vt.edu (Unverified) 565X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) 566Date: Wed, 12 Aug 1998 12:13:45 -0400 567To: Handyboard@media.mit.edu 568From: Mark Wallace <mawalla3@vt.edu> 569Subject: serial library for C++ 570Mime-Version: 1.0 571Content-Type: text/plain; charset="us-ascii" 572 573Hello, 574 I have a handy board with poloroid transducers and I am trying use the 575results of my distance measurments in a C++ program on the computer. I 576have found programs on the handyboard web page that should alow the 577handyboard to transmit information over the serial line. What I am looking 578for is if anyone knows were I could find a serial for Microsofts 579Visual C++ 5.0. I would like to find one that is free or sharware but any 580information on any serial that will work would be appreciated. 581Thanks. 582Mark Wallace 583 584 e-mail mawalla3@vt.edu 585 mwallace@sps1.phys.vt.edu 586web page http://sps1.phys.vt.ede/~mwallace 587 588"What a waist it would be after 4 billion tortuous years of evolution if 589the dominant organism contrived its own self-distruction" 590 Carl Sagan 591 592 593From aarone@sirius.com Wed Sep 30 12:35:05 1998 594Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v4.0/1.1/06Jun95-8.2MPM) 595 id AA09172; Wed, 30 Sep 1998 12:35:05 -0400 596Received: from mail3.sirius.com (mail3.sirius.com [205.134.253.133]) 597 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id KAA02849 598 for <handyboard@media.mit.edu>; Wed, 30 Sep 1998 10:46:53 -0400 (EDT) 599Received: from aarone (ppp-asfm03--129.sirius.net [205.134.240.129]) 600 by mail3.sirius.com (8.8.7/Sirius-8.8.7-97.08.12) with SMTP id HAA08635; 601 Wed, 30 Sep 1998 07:46:49 -0700 (PDT) 602Message-Id: <008901bdec9a$76f469d0$63f186cd@aarone.sirius.com> 603From: "Aaron Edsinger" <aarone@sirius.com> 604To: "Keith - Lui" <luikeith@egr.msu.edu> 605Cc: "handy" <handyboard@media.mit.edu> 606Subject: Re: output to file 607Date: Wed, 30 Sep 1998 10:47:58 -0700 608Mime-Version: 1.0 609Content-Type: text/plain; 610 charset="iso-8859-1" 611Content-Transfer-Encoding: 7bit 612X-Priority: 3 613X-Msmail-Priority: Normal 614X-Mailer: Microsoft Outlook Express 4.72.2106.4 615X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 616 617Yes, 618 Write a dos/windows client that reads the serial line and then 619writes it to file using the C stdio library. 620 621 622-----Original Message----- 623From: Keith - Lui <luikeith@egr.msu.edu> 624To: handyboard@media.mit.edu <handyboard@media.mit.edu> 625Date: Wednesday, September 30, 1998 6:55 AM 626Subject: output to file 627 628 629>Dear all, 630> 631>I would like to output some HB data to a file, is that possible? 632> 633>Keith 634> 635 636 637 638From brian-c@technologist.com Mon Jul 6 11:54:19 1998 639Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) 640 id AA03667; Mon, 6 Jul 1998 11:54:19 -0400 641Received: from web04.globecomm.net (web04.globecomm.net [207.51.48.104]) 642 by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id TAA30534 643 for <handyboard@media.mit.edu>; Mon, 6 Jul 1998 19:24:28 -0400 (EDT) 644From: brian-c@technologist.com 645Received: (from root@localhost) by web04.globecomm.net (8.8.8/8.8.0) id TAA03097; Mon, 6 Jul 1998 11:24:27 -0400 (EDT) 646Date: Mon, 6 Jul 1998 11:24:27 -0400 (EDT) 647Message-Id: <199807062324.TAA03097@web04.globecomm.net> 648Content-Type: multipart/mixed; boundary="0-0-0-0-0-0-0-0-____====$%&" 649Mime-Version: 1.0 650To: Terri A Mortvedt <terrim@iastate.edu>, handyboard@media.mit.edu 651Subject: Re: Steppers 652 653--0-0-0-0-0-0-0-0-____====$%& 654Content-Type: text/plain 655Content-Transfer-Encoding: quoted-printable 656X-MIME-Autoconverted: from 8bit to quoted-printable by aleve.media.mit.edu id TAA30534 657 658Dear Terri, 659 660If the motors turn sparatically, that means the coils 661are probably not hooked up in the correct order. Try 662swapping them around and see if anything improves. 663 664The motors you are using are the bipolar type. There=20 665is a decent way of hooking up unipolar steppers to 666the HB at http://www.cctc.demon.co.uk/stepper.htm 667A basic difference between bipolar and unipolar is 668that unipolar motors have additional wires are=20 669connected to the power supply. Bipolars also have more 670torque. 671 672Using fd(); and bk(); commands to power steppers is 673probably a lot to handle. I recommend trying the=20 674method found on that link. There's even sample coding. 675You will have to modify some variables for the turn 676functions because your turning radius varies according 677to your distance between motors. 678 679I modified the step(); function to produce a gradual=20 680increase in speed, and a gradual decrease in speed once 681the specified steps are almost complete.=20 682 683I will attach my motors.c file as is. 684 685 686 687_________________________________________________ 688=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= 689=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF 690Brian Carvalho [ brian-c@ieee.org ] 691DeVRY Institute 692New Jersey 693_________________________________________________ 694=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= 695=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF 696--------------------------------------------------- 697Get free personalized email at http://www.iname.com 698 699--0-0-0-0-0-0-0-0-____====$%& 700Content-Type: application/octet-stream 701Content-disposition: inline; filename=Motors.c 702Content-Transfer-Encoding: base64 703 704 705 706LyogTW90b3JzLmMgKi8NCg0KLyoqKiBERUNMQVJBVElPTlMgKioqLw0KDQppbnQgRk9SV0FSRFMg 707PSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB2YXJpYWJsZXMgZm9yIGRpcmVj 708dGlvbiAqLw0KaW50IEJBQ0tXQVJEUyA9IDE7DQogDQppbnQgSEFMRlRVUk4gPSA3MDsgICAgICAg 709ICAgICAgICAgICAgICAgICAgICAgIC8qIHZhcmlhYmxlcyBmb3IgdHVybmluZyAqLw0KaW50IFFV 710QVJURVJUVVJOID0gSEFMRlRVUk4gLyAyOw0KIA0KaW50IFJJR0hUID0gMjsgICAgICAgICAgICAg 711ICAgICAgICAgICAgICAgICAgICAgLyogdmFsdWVzIGZvciB0dXJucyAqLw0KaW50IExFRlQgPSA4 712Ow0KDQppbnQgcmlnaHRfbW90b3JfcG9pbnRlciA9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AgICAgICAgICAvKiBncmFkdWFs 754IGxlZnQgdHVybiAqLw0Kew0KCQkJaW50IGk7DQoNCgkJCWZvciAoaT0wO2k8PUhBTEZUVVJOO2kr 755KykNCgkJCXsNCgkJCQkJICByaWdodF9zdGVwKEZPUldBUkRTKTsNCgkJCQkJICBzdGVwcGVyc19v 756dXQoKTsNCgkJCQkJICBtc2xlZXAoU0xPVyk7DQoJCQl9DQp9DQoNCg0Kdm9pZCBzdGVwIChpbnQg 757ZGlyLCBpbnQgbnVtc3RlcHMsIGludCBkZWxheSkNCnsNCiAgICAgICAgaW50IHN0ZXAsc3RwOw0K 758ICAgICAgICBpbnQgYmVnaW49bnVtc3RlcHMvMTA7DQoJaW50IGNvbnRpbnVlOw0KICAgICAgICBs 759b25nIGdyYWQ9KGxvbmcpYmVnaW47DQoNCglzeXN0ZW1fcHdtX29mZigpOw0KDQoJZm9yIChzdGVw 760PTA7c3RlcDxiZWdpbjtzdGVwKyspDQoJew0KCQltc2xlZXAoZ3JhZCk7DQoJCWxlZnRfc3RlcChk 761aXIpOw0KCQlyaWdodF9zdGVwKGRpcik7DQoJCXN0ZXBwZXJzX291dCgpOw0KCQljb250aW51ZT1z 762dGVwOw0KICAgICAgICAgICAgICAgIGdyYWQ9Z3JhZC0xTDsNCg0KCX0NCiAgICAgICAgd2hpbGUo 763Y29udGludWU8YmVnaW4qOSkNCgl7DQoJCW1zbGVlcCgobG9uZylkZWxheSk7DQoJCWxlZnRfc3Rl 764cChkaXIpOw0KCQlyaWdodF9zdGVwKGRpcik7DQoJCXN0ZXBwZXJzX291dCgpOw0KCQljb250aW51 765ZSsrOw0KICAgICAgICAgICAgICAgIHN0cD1jb250aW51ZTsNCgkgfQ0KDQogICAgICAgICB3aGls 766ZShzdHA8bnVtc3RlcHMpDQogICAgICAgICB7DQogICAgICAgICAgICAgIGRlbGF5PWRlbGF5KzE7 767DQogICAgICAgICAgICAgIG1zbGVlcCgobG9uZylkZWxheSk7DQogICAgICAgICAgICAgIGxlZnRf 768c3RlcChkaXIpOw0KICAgICAgICAgICAgICByaWdodF9zdGVwKGRpcik7DQogICAgICAgICAgICAg 769IHN0ZXBwZXJzX291dCgpOw0KICAgICAgICAgICAgICBzdHArKzsNCiAgICAgICAgIH0NCglhbygp 770Ow0KDQp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCg0K 771 772 773--0-0-0-0-0-0-0-0-____====$%&-- 774