----------------------------------------------------------------------------- File: ftp://cherupakha.media.mit.edu/pub/projects/6270/hobbytip/6270seri.txt By: fredm@media.mit.edu ----------------------------------------------------------------------------- From fredm@media.mit.edu Mon Sep 4 10:06:33 1995 Received: from fredmac.media.mit.edu by aleve.media.mit.edu; (5.65/1.1/06Jun95-8.2MPM) id AA21096; Mon, 4 Sep 1995 10:06:22 -0400 X-UIDL: 810223676.000 Date: Mon, 4 Sep 1995 10:06:22 -0400 Message-Id: <9509041406.AA21096@aleve.media.mit.edu> From: fredm@media.mit.edu (Fred G. Martin) To: kkv@inel.gov Subject: Re: 6.270 question Newsgroups: comp.robotics.misc References: <427jji$46p@mica.inel.gov> Organization: MIT Media Laboratory (A copy of this message has also been posted to the following newsgroups: comp.robotics.misc) In article <427jji$46p@mica.inel.gov>, kkv@inel.gov wrote: > I have several robots built with the 6.270 board. I would like to > program them to send sensor data over a cable to a PC, but so far I > haven't found any information on how to do this. I'm using Interactive > C. I'm sure there is a way to do this, and if anyone knows how I would > really appreciate some help. There is a zero-page variable named "ignoreserial" that will cause the runtime pcode to ignore serial communications from the host CPU. If you set the variable, then you can use low-level 6811 register serial interactions to read and write to the serial line. In the current distribution of Interactive C, the "ignoreserial" variable is assembled at address 0x3c. So to turn off the standard serial interactions, you would say: poke(0x3c, 1); after which you can transmit data by poking it into the 6811 transmit/receive buffer, which is at address 0x102f: poke(0x102f, ); After doing this, you should wait until the data is transmitted before sending another byte. This is done by testing the 0x80 bit of the serial status register: while (!(peek(0x102e) & 0x80)); For more information about the 6811's serial, get its Motorola data book. Hope this helps. -Fred -- Fred Martin | fredm@media.mit.edu | (617) 253-5108 | 20 Ames St. Rm. E15-320 Epistemology and Learning Group, MIT Media Lab | Cambridge, MA 02139 USA