View Single Post
Unread 09/20/2013, 11:54 AM   #21
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I am using a gutted 12v 1a power supply inside the chauvet to power the arduino and the PWM circuit and to pin 5 of the DB9 to power the second chauvet.

No trial and error, I opened up the chauvet and test using a multitester continuity test to figure out the DB9 pin connections. You should do the same.

https://github.com/d0ughb0y/Chauvet1...er/Outlets.ino
lines 178-207

actually, first 8 uses PORTA and next 8 uses PORTC, so in your case, you would use the same code as PORTC on PORTA.
like this

Code:
void _outletOn(uint8_t p){
  if (p<8) {
    if (!(PORTA & _BV(p))) {//is off
      PORTA |= _BV(p);  
      _outlogentry(p,true);
    }
  } else if (p==Feeder) {
    feed();
  } else {
    if (!(PORTC & _BV(p-8))) {
      PORTC |= _BV(p-8);
      _outlogentry(p,true);
    }
  }
}
make sure to do the corresponding change in _outletOff



Last edited by d0ughb0y; 09/20/2013 at 12:06 PM.
d0ughb0y is offline   Reply With Quote