Changed the circuit: zener-diodes instead of the LM317, so the uC runs at 5V

instead of 3.6V. Now, even the blue LED lights at full brightness.
And changed the interface to the controller to use only two wires on port D, so
the firmware needed an update, too.
This commit is contained in:
2006-09-29 21:51:07 +00:00
parent b282d4a32c
commit e4b8aa91e7
9 changed files with 32 additions and 34 deletions

View File

@ -2,7 +2,7 @@
* \file main.c
* \brief Firmware for the USB-LED-Fader.
* \author Ronald Schaten & Thomas Stegemann
* \version $Id: main.c,v 1.1 2006/09/26 18:18:27 rschaten Exp $
* \version $Id: main.c,v 1.2 2006/09/29 21:51:07 rschaten Exp $
*
* License: See documentation.
*/
@ -247,19 +247,17 @@ uchar usbFunctionSetup(uchar data[8]) {
int main(void) {
uchar i, j;
odDebugInit();
DDRB = ~0; /* output SE0 for USB reset */
PORTB = 0x00; /* no pullups on USB pins */
DDRD = ~0; /* output SE0 for USB reset */
PORTD = 0x00; /* no pullups on USB pins */
DDRC = 0xff; /* all outputs */
PORTC = 0x00;
DDRD = 0x00; /* all inputs */
PORTD = 0x00;
j = 0;
while (--j) { /* USB Reset by device only required on Watchdog Reset */
i = 0;
while (--i); /* delay >10ms for USB reset */
}
DDRB = ~USBMASK; /* all outputs except USB data */
DDRD = ~USBMASK; /* all outputs except USB data */
TCCR0 = 3; /* set prescaler to 1/64 */
usbInit();
sei();