View Single Post
Old 12-22-2008, 03:41 PM   #30 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,553

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 372
Thanked 297 Times in 188 Posts
Program with step by step instructions

Hello! OK, so I have carefully tested the small controller, and watched the results on the oscilloscope. Finally, the software appears to be without any errors, and is much simpler and easier to read now. I think I'll run the bike controller at 4kHz. It may irritate dogs in the neighborhood, but it will keep switching losses down, and it's just a first draft. Well, second draft if you count the 5v 0.01amp one.

To compile this program, download the FREE Atmel AVR Studio!
Atmel AVR Studio


To compile the program, change the file name to end with .c instead of .txt

It wouldn't let me upload it here unless it was in ".txt" format.

There are a lot of page references in PWMAndInputTest.txt. They refer to the PDF of the documentation for the ATMega8. It can be found HERE!
Also, the code assumes you are using the PDIP version of the chip (28 pin version).
Attached Files
File Type: txt PWMAndInputTest.txt (4.8 KB, 365 views)
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.

Last edited by MPaulHolmes; 12-22-2008 at 11:13 PM..
  Reply With Quote