Arduino UNO USB to FTDI "hotwire"?

I am trying to program a typhon LED controller that uses the arduino ATMega328P but needs an FTDI cable to program it. I DO have an Arduino UNO board where the chip is fried but the USB is still OK. Is there a way I can break out the programmer of the UNO board and use it on the FTDI connection for the LED controller?

Here is the Product I am trying to program. I need to invert the PWM values becuase the LED driver accepts an inverted signal (buckpuck).

http://www.boostled.com/collections/diy/products/typhon-led-controller-kit

Well, since downloading a sketch only requires a serial interface, I don't see you can't connect the power, ground, reset, Rx, Tx pins to the same on the LED.
May have to swap Rx/Tx if connecting one way doesn't work.

I think I am close. Now i am getting a sync error.

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Do i need to change anything for uploading. I think this device might have an ocillator and not a crystal

Does the board have a reset switch? Press & hold while you start the download.
When you see "downloading xxxx bytes of 32xxx" or simlar, release the reset button.
This will ensure the bootloader is ready to receive from the PC at the right time.

The board is resetting when I tell it to uplod a sketch. However, when i hold the reset button (on the uno board) it resets, but does not hold the reset until i let go.

I didn't see a Typhon schematic. You may have to find where the reset pin goes and jumper to the other side of a capacitor so the reset switch functions like it does on the Uno.

Pin 1 if it has a DIP part,

Pin 29 if its a 32-lead gull wing surface mount part like a Nano has

It looks like its loading sketches now. I set the board to Lillypad w/ atmega 238. Awesome! Thanks CrossRoads!

Now I just need to break this sketch down and see how I can inverse the PWM Values. 255=off and 0=all on. I'm not good enough at programming.. this might take a while.

Sketch can be found here http://www.boostled.com/pages/typhon-pre-programmed-sketch

or here Google Code Archive - Long-term storage for Google Code Project Hosting.

I think you need to invert the 'val' int in the setLed function here :

Change

    if (val > ledMax)  {val = ledMax;} 
    if (val < 0) {val = 0; } 
    
  analogWrite(ledPin, map(val, 0, 100, 0, 255));
  if(override){val=overpercent;}
  return val;

to something like this :

val=~val;

val=val&255;

    if (val > ledMax)  {val = ledMax;} 
    if (val < 0) {val = 0; } 
   
  analogWrite(ledPin, map(val, 0, 100, 0, 255));
  if(override){val=overpercent;}
  return val;

Texy

Texy, That seems to have done it... Now since I am inverting the output. I should use the same logic to invert the "maximum output" variable as well, right? Becuase right now the controller is asking for Max level. If you set it to %0.. you get full on and if you set it to 100% you get full off.. I'm still haveing trouble wrapping my head arounf the whole thing. I think I need to leave the code the same, but just change it exactly where it writes it to the pin.

Does this work to create a menu to "toggle" the values?

if(menuSelect == 4){
 if (checkButtonAction(&minus) || checkButtonAction(&plus)) {
   pwn_inverted = !pwn_inverted;
 }
 
   if(inverted == true)
  lcd.print("PWM Inverted: YES ");
   if(inverted == false)
  lcd.print("PWM Inverted: NO");


}

You can leave The original code and simply invert the values on the map function call, i.e. map(val,0,100,0,255) to map(val,0,100,255,0)

That is all you should need to do.

fm:
You can leave The original code and simply invert the values on the map function call, i.e. map(val,0,100,0,255) to map(val,0,100,255,0)

That is all you should need to do.

haha fm... whelp I was just about to make this post. Should have checked back sooner!

if(inverted){
  
  analogWrite(ledPin, map(val, 0, 100, 255, 0));
}
else{
  analogWrite(ledPin, map(val, 0, 100, 0, 255));
}