View Single Post
  #77   Spotlight this post!  
Unread 15-09-2003, 13:39
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Re: Programming language and current limitations

Quote:
Originally posted by TechnocratiK
The RCs we're using could definitely use improvement One of the biggest faults of these microcontrollers is their inability to properly calculate with negative numbers. Sure, floating-point values would be a nice frill, but when working with a gyro, it'd be nice for the value of 1 / -1 not to equal 0.
The current Basic Stamp based microcontroller fully supports signed arithmetic (well, at least for addition subtraction; I believe it also works for multiplication and division). Two's-compliment numbers work perfectly (the real question would be why they wouldn't). However, the only thing that doesn't support negative numbers are the input and output devices. So this is probably much more a problem of the additional hardware than the Basic Stamp directly.

The real stupidity with the Basic Stamp math is its lack of order-of-operations.

Matt
Reply With Quote