To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 22780
22779  |  22781
Subject: 
Re: Future Mindstorm Releases?
Newsgroups: 
lugnet.robotics
Date: 
Thu, 2 Sep 2004 19:05:34 GMT
Viewed: 
3066 times
  
In lugnet.robotics, Joe Strout wrote:
In lugnet.robotics, Mark Riley wrote:

A relatively simple way to hack together an {output} expander is to throw a
commercially available DCC controller into a brick\[1\]:

DCC?  As in <http://www.nmra.org/standards/dccbasic.html>?  I had to do a search
for that, this is the first I've heard of it.  Sounds interesting.

Doh! Sorry about that...  Yes, DCC stands for Digital Command Control and it is
used by model railroaders to control multiple locomotives on a train layout by
sending power and control information over the two train track rails.  For RCX
robotics, instead of the two rails, you'd just tie together multiple DCC bricks
using the standard 2-conductor Lego electrical wires.

There are some working links with more DCC information at the bottom of my DCC
page:

http://home.surewest.net/markril/Lego/dcc/index.html

Each one of these bricks can control two lamps and a motor.  Since each of
these DCC bricks is individually addressable, you could string many of the
bricks together on a single RCX output.

That's pretty cool.  How fast can you control those outputs?  And how difficult
is it to program?  (The NMRA link to the communications standard document is
broken.)

You can send about 120 motor commands per second.  Each DCC command is a packet
with 2 to 4 bytes and another byte for checksum.  It's difficult to give exact
packet rates because the duration of a bit differs depending on whether you're
sending a one or a zero.

The DCC driver for the RCX was written in H8 assembly language and involved some
cycle counting to get the timing just right.  But, now that that is written, all
you have to do is specify what bytes you want to send as a packet.  The driver
for BrickOS even has some helper functions that will assemble and send a packet
for you:

  dcc_speed126(3, 64);     // set motor output of brick 3 to 64 (half speed)
  dcc_speed126(17, -126);  // set motor 17 to full speed reverse
  dcc_speed126(1, 0);      // stop motor 1

  dcc_FL_F4(5, DCC_F1);    // turn on lamp 1 on brick 5

The DCC decoder modules cost as little as $16 US. Here's a post I made in
.trains about the inexpensive decoder used in the DCC brick pictured in my
earlier post:

http://news.lugnet.com/trains/?n=22422

Cheers,

Mark



Message has 1 Reply:
  DCC for the RCX
 
Snippage If you haven't seen this check it out. DCC for the RCX (URL) (20 years ago, 2-Sep-04, to lugnet.robotics)

Message is in Reply To:
  Re: Future Mindstorm Releases?
 
(...) DCC? As in (URL)? I had to do a search for that, this is the first I've heard of it. Sounds interesting. (...) That's pretty cool. How fast can you control those outputs? And how difficult is it to program? (The NMRA link to the communications (...) (20 years ago, 2-Sep-04, to lugnet.robotics)

35 Messages in This Thread:












Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR