Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 06-07-2009, 11:11 PM   #1621 (permalink)
EcoModding Lurker
 
slurryguy's Avatar
 
Join Date: Feb 2009
Location: MO
Posts: 37
Thanks: 0
Thanked 3 Times in 2 Posts
Paul quoting "The Golden Girls"...


I sure hope you don't quote the Golden Girls to your students. You would never live that down. EVER!

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 06-08-2009, 02:16 AM   #1622 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
If you want something small and powerful (rather than fast) Wombat is your name. They are the sort of animal that when confronted with a fence don't bother going around, over or under. Shortest route will do.
  Reply With Quote
Old 06-08-2009, 05:15 AM   #1623 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Bucharest,RO and Copenhagen,DK
Posts: 42
Thanks: 0
Thanked 1 Time in 1 Post
Paul, would you please commit your changes to the svn? I'm loading the software to my simple test board to work on (and test) the serial communication part and I would like to use the latest version (the one that eliminated waiting for AD conversion end).
Once I've tested (succesfully) the serial link logging I will commit my changes to the svn for your evaluation.
  Reply With Quote
Old 06-08-2009, 08:53 AM   #1624 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 17 Times in 14 Posts
Holy crap, a lot happened this weekend.

Paul - mixed up pins and wrong size holes... you can file that under "isht happens". Even with a dozen eyes on it, it still happens.

Re: (128+64+blah blah blah), vs 0xFD - Both are wrong. Use a #define with a good descriptive value. No "Magic Numbers" in programming.
  Reply With Quote
Old 06-08-2009, 09:09 AM   #1625 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Jacksonville, Florida
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by slurryguy View Post
Death Wish 10:

What if Oprah dressed in a Bikini and sat on the hood of an EV like a car babe? How would the controller withstand this kind of pressure situation?
Why not ask her and see?
MySpace.com - The Oprah Winfrey Show - 55 - Female - Illinois - www.myspace.com/theoprahwinfreyshow
What could it hurt? (Other than it crushing the car into oblivion....)
  Reply With Quote
Old 06-08-2009, 09:16 AM   #1626 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MazdaMatt View Post
Holy crap, a lot happened this weekend.

Paul - mixed up pins and wrong size holes... you can file that under "isht happens". Even with a dozen eyes on it, it still happens.

Re: (128+64+blah blah blah), vs 0xFD - Both are wrong. Use a #define with a good descriptive value. No "Magic Numbers" in programming.
Agreed, a set of MASK values is a good plan.

#define BIT0_MASK 0x0001;

then you can use the mask and !mask to & and | as you please.
  Reply With Quote
Old 06-08-2009, 09:20 AM   #1627 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Dear Oprah,
Our association would like to raise the profile of Electric Vehicles and consider that a photo shoot with you draped over a vehicle clad in an electric blue bikini would ........I'm feeling faint....



The bad news is that her show is on our TVs over here, nowhere is safe!!
  Reply With Quote
Old 06-08-2009, 09:55 AM   #1628 (permalink)
EcoModding Lurker
 
Join Date: Nov 2008
Location: Georgia
Posts: 19
Thanks: 1
Thanked 4 Times in 3 Posts
Quote:
Originally Posted by squiggles View Post
Being picky again, and I am sure I am stating something that has been said before. However in my opinion this

PORTB &= (128 + 64 + 32 + 16 + 8 + 4 + 1); // this sets PB1 (the pwm output) to 0 at startup. Notice '2' is missing!


Is better written as
PORTB &= 0xFD; // this clears PB1 (the pwm output) at startup.

I appreciate that hexadecimal may be unfamiliar at first, believe me if you are going to be programming regularly it is highly advisable to become familiar with HEX.
Also in programming speak you don't "set" something to "0".
An even better representation would be in binary if the compiler allows for it.

PORTB &= 0b11111101;

It gives more clarity than either the bitmask or the hex representation.

ga2500ev
  Reply With Quote
Old 06-08-2009, 10:03 AM   #1629 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Again I agree, unfortunately Kernihan & Ritchie did not include it in their design and it has not been adopted by the ANSI standard so it is compiler dependent and not portable.
Having said that it seems that there are plenty of non standard compilers out there these days, so the thought of portability seems to have disappeared to some extent. Which is amusing as it was one of the primary considerations in the development of 'C'.
  Reply With Quote
Old 06-08-2009, 10:59 AM   #1630 (permalink)
EcoModding Lurker
 
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58

2010 Prius - '10 Toyota Prius IV
Last 3: 51.4 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
Seriously guys. Grab the code and refactor to your heart's content but let the man complete his work. None of this would have gotten off the ground if it weren't for Paul just doing it. So let's chill on the criticisms and cheer for the progress. I agree with dcb, get it done, then clean it up. The code is not that complex (though I need to have a look at the latest to see why Paul is storing the SREG as it's pushed on the stack for you during an interrupt).

To use the SVN analogy, let this tree grow before you try to prune it

My 2 cents.

  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control MPaulHolmes Fossil Fuel Free 3480 05-04-2022 05:43 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 04:10 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com