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 05-04-2011, 09:48 PM   #4701 (permalink)
EcoModder
 
Join Date: Mar 2010
Location: New Zealand
Posts: 181
Thanks: 0
Thanked 33 Times in 20 Posts
I used AVR Studio to compile it and PonyProg with a home made interface to program it. There is a difference between the way some of these things handle the fuse bits - that may be something to look at, you may not be setting those the way you think you are.

__________________
Sometimes I sits and thinks and sometimes I just sits.
  Reply With Quote
The Following User Says Thank You to harlequin2 For This Useful Post:
Camaro (05-05-2011)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-04-2011, 10:27 PM   #4702 (permalink)
AC-DC enthusiast
 
mrbigh's Avatar
 
Join Date: Nov 2009
Location: Long Island, NY
Posts: 282

Dual-PWR PHEV - '04 Toyota Prius

Kopper - '79 Bradley Bradley GT-II
Thanks: 123
Thanked 54 Times in 37 Posts
Programming

Well, I'm in need of some help also with the initial programming of the 1K Amp controller PCB.
After a long wait for the controller parts ordering and back orders, today I received my AVR STK500 ISP clone Programmer from a china distributor with some programming cable interface.
The controller board is assembled, I have 5Vdc out of the regulator, in VTG pin of the ISP 6 pin port; I have also +15VDC of the DC-DC converter output BUT no LED signage; it doesn't blink.
I just downloaded and installed AVR Studio 5.0 and Cougar_S1K_DC Controller_Firmware_v0_1 from the WIKI (cougar.c and cougar.d)
to start my atmega programming.
Now I'm stuck, what to do? I couldn't find anywhere a tutorial on the programming of this micro through the P&S files.
Nor that I know if I have a hardware malfunction, but I have a perfect 5 VDC in the buss. I was assuming that the LED will blink somehow but if the micro is not programed........?
HELP
__________________
. .. .. . .......
Prius Absolutum Dominium . ..........KOPPER
PHEV conversion since Dec 2006.. . .... .Future EV
. . . . . . . .CALCars # 27. . . . . . . . . . ..on the works now !!
. . . . . . . . . . . . . . . . .. . ........
  Reply With Quote
Old 05-04-2011, 10:36 PM   #4703 (permalink)
AC-DC enthusiast
 
mrbigh's Avatar
 
Join Date: Nov 2009
Location: Long Island, NY
Posts: 282

Dual-PWR PHEV - '04 Toyota Prius

Kopper - '79 Bradley Bradley GT-II
Thanks: 123
Thanked 54 Times in 37 Posts
Quote:
Originally Posted by LouMan View Post
WOW! speaking of needing a help PDF I just ask about the same thing a few minutes ago MrBigH hehehehehe
Seems that we are in the same boat....
Lets wait for the programming gurus
__________________
. .. .. . .......
Prius Absolutum Dominium . ..........KOPPER
PHEV conversion since Dec 2006.. . .... .Future EV
. . . . . . . .CALCars # 27. . . . . . . . . . ..on the works now !!
. . . . . . . . . . . . . . . . .. . ........
  Reply With Quote
Old 05-05-2011, 12:04 AM   #4704 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Ohio
Posts: 16
Thanks: 8
Thanked 15 Times in 6 Posts
mmm... I guess I'm not the only one with programming questions. I've checked my high low fuse bits (not a straight forward task with AVRDUDE), and they seem fine, except my oscillator is set as an external RC oscillator. Is that ok? We use a crystal on the board not a resistor capacitor, maybe that's the problem.
  Reply With Quote
Old 05-05-2011, 12:10 AM   #4705 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Ohio
Posts: 16
Thanks: 8
Thanked 15 Times in 6 Posts
Mrbigh,
I'm not using the same setup as you, but I'll try to help. On your progammer, you may have to switch the order of the pins on the end. I don't know if this problem was changed on the 1000amp boards, but on the 50amp boards the ISP pins are mirrored. Meaning that pins 1 and 2 need to be switch, 3 and 4, and 5 and 6.
  Reply With Quote
Old 05-05-2011, 12:24 AM   #4706 (permalink)
EcoModder
 
Join Date: Mar 2010
Location: New Zealand
Posts: 181
Thanks: 0
Thanked 33 Times in 20 Posts
Quote:
Originally Posted by Camaro View Post
mmm... I guess I'm not the only one with programming questions. I've checked my high low fuse bits (not a straight forward task with AVRDUDE), and they seem fine, except my oscillator is set as an external RC oscillator. Is that ok? We use a crystal on the board not a resistor capacitor, maybe that's the problem.
I don't think it will oscillate if you set it for external RC then use a xtal. Never tried it, but I think that may be your problem. No oscillator means it will take a long time to do anything.......
I have an oscilloscope and one of the first things I always check when powering up a uC board for the first time is that the oscillator is running.

Its been a while since I used the Atmel set up as I have been playing with PICs for a while. And my PonyProg has a home made interface, but it did all go together quite easily.
__________________
Sometimes I sits and thinks and sometimes I just sits.
  Reply With Quote
Old 05-05-2011, 01:08 AM   #4707 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Ohio
Posts: 16
Thanks: 8
Thanked 15 Times in 6 Posts
Quote:
Originally Posted by harlequin2 View Post
I don't think it will oscillate if you set it for external RC then use a xtal. Never tried it, but I think that may be your problem. No oscillator means it will take a long time to do anything.......
I have an oscilloscope and one of the first things I always check when powering up a uC board for the first time is that the oscillator is running.

Its been a while since I used the Atmel set up as I have been playing with PICs for a while. And my PonyProg has a home made interface, but it did all go together quite easily.
Ok, my test programs worked when it was set to the external RC (weird), and they run faster now that I set the fuses for external crystal. BUT courgar.c code still does nothing. The green GR9 led comes on but that's it. What am I missing? PC6 is reset, Watch dog timer is 1 (not always on), SPIEN is 0 (I can serial program), CKOPT is 0 (high speed), EESAVE is 1, my boot size is 256, my boot reset is at 0xF00. Is the boot loader my problem... thinking out loud...
  Reply With Quote
Old 05-05-2011, 01:59 AM   #4708 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Ohio
Posts: 16
Thanks: 8
Thanked 15 Times in 6 Posts
Nope, not the boot loader...
  Reply With Quote
Old 05-05-2011, 02:00 AM   #4709 (permalink)
EcoModder
 
Join Date: Mar 2010
Location: New Zealand
Posts: 181
Thanks: 0
Thanked 33 Times in 20 Posts
Sorry, but my Cougar is i nstalled and running in my car so I can't check anything. All I can suggest is that you stick in some debugging code such as pick a point early on in the program and turn on (or off) a led or something so you can see if the program gets that far. If you can get that to happen, then keep moving your code along to where it doesn't work.
Its not a bad idea to write a little subroutine to turn a led on, wait a bit and turn it off, then you can just put in a call at various points.
That's about all I can suggest, maybe someone else has a setup closer to what you are doing and can help?
For what it is worth PonyProg can be downloaded here PonyProg - Serial device programmer and the serial interface is just a converter from RS232 to the Atmel ISP logic levels. It'll work with just about any hex file but needs a COM port - doesn't work with USB.

Just an afterthought: if your own code works OK and you say it does, it must be something in the Cougar code that is not compatible with your setup, so the debugging idea will be the way to go.
__________________
Sometimes I sits and thinks and sometimes I just sits.
  Reply With Quote
Old 05-05-2011, 02:17 AM   #4710 (permalink)
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,362
Thanked 1,202 Times in 765 Posts
I've done quite a bit of software updates, so I'm not sure about the code that was uploaded to the wiki. I'm pretty sure it has problems with it. It was just a rough draft. Too bad I don't know how to do the evil "subversion" or whatever it's called.

__________________
kits and boards
  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 3431 05-04-2022 06:43 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 05: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