View Single Post
Old 07-13-2009, 12:31 PM   #1995 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,119 Times in 734 Posts
Problems COMPLETELY SOLVED!!!!!! WILL EXPLAIN LATER! MUST GO TO SCHOOL!!!!!!!!! hahaha! ya!

Basically it's perfect now. No hardware changes necessary for anyone (well I had to replace my bad ATMega8 since I ruined it in the testing)!!!!!! Coding mistake!

OK, I'll just say it now:

I set PB2 as output, but then in InitPWM(), I accidentally set PB2 to input when I do this:

DDRB = 0b00000010;

I accidentally did = instead of:

DDRB |= 0b00000010;

So, PB2 was set as an input, so when I would try to use it as an output, since I would have to pulse it low, it would say to me, I WILL NOT GO LOW AND RESET THAT OVERCURRENT EVENT! I'M AN INPUT!!! It was really quite rude, actually.

EXPLANATION OF overcurrent diode et. al. soon! must go to school! ya!
__________________
kits and boards
  Reply With Quote