View Single Post
Old 05-31-2009, 06:27 PM   #1511 (permalink)
MPaulHolmes's Avatar
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,119 Times in 734 Posts
Those sound like good variable names. I did global for everything at first because I wasn't sure what I wanted to be local, and I didn't want to re-initialize variables each time. It's a practice that old school 3d video game programmers, a la Andree Lamothe, did in the late 80's & early 90s.

I believe the interrupts are re-enabled by resetting the SREG register to what it was before disabling interrupts, rather than using sti(). It works in the simulator, as far as I can tell, but in the car, even the high pedal lockout isn't working! I think there is a fundamental problem with the old hardware from the blown up control section. Voltage spikes are now much worse in the control section than when I first tested it on the first controller that blew up. I really don't think the software is all to blame. I can't really do much until I get a new oscilloscope, which will be very soon, either by a friend that's checking on some for me, or by getting another on Ebay.

kits and boards
  Reply With Quote