Andy's LEGO® Mindstorms® Page
About this site
  
What's New?
  
Standard Disclaimer
Quite C
  
Francesco Ferrara
  
Getting Started
  
Installing Quite C
  
Compiling a project
  
Sample Code
Chess
  
The Robot Chess Project
  
Programming Chess
  
First Attempt
  
Version 0
  
Version 1
  
The Program
  
The State of Play
  
The User Interface
  
The Move Generator
  
The Move Applier
  
The Rating Algorithm
  
The Search Algorithm
  
Putting it all together
  
The Robot
  
The Head
  
Moving the head
  
Movies
  
Downloads: Source Executables, MLCad Models
4-in-a-Robot
  
4-in-a-Robot - the Robot
  
The 4-in-a-Robot Base
  
The 4-in-a-Robot Delivery Mechanism
  
The 4-in-a-Robot Controller
  
4-in-a-Robot - the Code
  
The 4-in-a-Robot Algorithm
  
The 4-in-a-Robot Control Programming
  
The 4-in-a-Robot Robot-less version
  
Installing 4-in-a-robot
  
Playing the robotless 4-in-a-robot
  
View the source code
Speech
  
The problems with speech
  
Sounds familiar
  
H8 Timers Background
  
Trial and Error
  
Volume Zapper
  
Actually Speaking
  
Speak.c - the code
  
The VB code generator
Some ideas for the future
  
Room positioning robot
  
Neural Net Bot
  
Pianola
  
Text to speech
LEGO® Mindstorms® Links

[268703]

H8 Timers Background

  A bit of background info on how the 8 bit timers work on the H8 might be useful at this point, it's not too hard:

They're basically automatic counters. The speed at which they count is determined by a few status bits, and can be set to various divisions of the internal clock.

There are two values, called compare-matches, A and B.
You can set status flags to do combinations of the following things when the counter reaches A or B, or 'overflows' i.e. goes from 255 back to 0:

  • Set the output high
  • Set the output low
  • Toggle the output
  • Reset the counter
  • Fire an interrupt


Oh, and there's two of them 0 and 1. The 8 bit Timer 0's output is wired to the speaker on the RCX.

Simple really. Read the freindly manual (from Hitachi here), it's full of goodies


Back to: Sounds familiar

Show Topic: Speech

Next Page: Trial and Error