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:
Ronald Schaten 2006-09-29 21:51:07 +00:00
parent b282d4a32c
commit e4b8aa91e7
9 changed files with 32 additions and 34 deletions

Binary file not shown.

BIN
circuit/circuit.brd.pdf Normal file

Binary file not shown.

BIN
circuit/circuit.brd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

BIN
circuit/circuit.sch.pdf Normal file

Binary file not shown.

BIN
circuit/circuit.sch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,30 +1,30 @@
Partlist Partlist
Exported from circuit.sch at 9/15/2006 14:21:25 Exported from circuit.sch at 9/29/2006 20:55:14
EAGLE Version 4.16 Copyright (c) 1988-2005 CadSoft EAGLE Version 4.16 Copyright (c) 1988-2005 CadSoft
Part Value Device Package Library Sheet Part Value Device Package Library Sheet
C1 4,7u CPOL-EUE2.5-5 E2,5-5 rcl 1 C1 100n C-EU025-024X044 C025-024X044 rcl 1
C2 100n C-EU025-024X044 C025-024X044 rcl 1 C2 10u CPOL-EUE2.5-5 E2,5-5 rcl 1
C3 22p C-EU025-024X044 C025-024X044 rcl 1 C3 22p C-EU025-024X044 C025-024X044 rcl 1
C4 22p C-EU025-024X044 C025-024X044 rcl 1 C4 22p C-EU025-024X044 C025-024X044 rcl 1
IC1 MEGA8-P MEGA8-P DIL28-3 avr 1 D1 3.6V ZENER-DIODEDO35Z10 DO35Z10 diode 1
IC2 LM317LZ LM317LZ TO92 linear 1 D2 3.6V ZENER-DIODEDO35Z10 DO35Z10 diode 1
JP1 ISP JP5Q JP5Q jumper 1 IC1 MEGA8-P MEGA8-P DIL28-3 avr 1
LED1 LED5MM LED5MM led 1 JP1 ISP JP5Q JP5Q jumper 1
LED2 LED5MM LED5MM led 1 LED1 LED5MM LED5MM led 1
LED3 LED5MM LED5MM led 1 LED2 LED5MM LED5MM led 1
LED4 LED5MM LED5MM led 1 LED3 LED5MM LED5MM led 1
Q1 12MHz CRYTALHC18U-V HC18U-V crystal 1 LED4 LED5MM LED5MM led 1
R1 432 R-EU_0207/10 0207/10 rcl 1 Q1 12MHz CRYTALHC18U-V HC18U-V crystal 1
R2 240 R-EU_0207/10 0207/10 rcl 1 R1 2k2 R-EU_0207/10 0207/10 rcl 1
R3 1k5 R-EU_0207/10 0207/10 rcl 1 R2 4k7 R-EU_0207/10 0207/10 rcl 1
R4 68 R-EU_0207/10 0207/10 rcl 1 R4 68 R-EU_0207/10 0207/10 rcl 1
R5 68 R-EU_0207/10 0207/10 rcl 1 R5 68 R-EU_0207/10 0207/10 rcl 1
R6 1k R-EU_0207/10 0207/10 rcl 1 R6 470 R-EU_0207/10 0207/10 rcl 1
R7 1k R-EU_0207/10 0207/10 rcl 1 R7 470 R-EU_0207/10 0207/10 rcl 1
R8 1k R-EU_0207/10 0207/10 rcl 1 R8 470 R-EU_0207/10 0207/10 rcl 1
R9 1k R-EU_0207/10 0207/10 rcl 1 R9 470 R-EU_0207/10 0207/10 rcl 1
X1 PN61729 PN61729 con-berg 1 X1 PN61729 PN61729 con-berg 1

View File

@ -2,7 +2,7 @@
* \file main.c * \file main.c
* \brief Firmware for the USB-LED-Fader. * \brief Firmware for the USB-LED-Fader.
* \author Ronald Schaten & Thomas Stegemann * \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. * License: See documentation.
*/ */
@ -247,19 +247,17 @@ uchar usbFunctionSetup(uchar data[8]) {
int main(void) { int main(void) {
uchar i, j; uchar i, j;
odDebugInit(); odDebugInit();
DDRB = ~0; /* output SE0 for USB reset */ DDRD = ~0; /* output SE0 for USB reset */
PORTB = 0x00; /* no pullups on USB pins */ PORTD = 0x00; /* no pullups on USB pins */
DDRC = 0xff; /* all outputs */ DDRC = 0xff; /* all outputs */
PORTC = 0x00; PORTC = 0x00;
DDRD = 0x00; /* all inputs */
PORTD = 0x00;
j = 0; j = 0;
while (--j) { /* USB Reset by device only required on Watchdog Reset */ while (--j) { /* USB Reset by device only required on Watchdog Reset */
i = 0; i = 0;
while (--i); /* delay >10ms for USB reset */ 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 */ TCCR0 = 3; /* set prescaler to 1/64 */
usbInit(); usbInit();
sei(); sei();

View File

@ -5,7 +5,7 @@
* Tabsize: 4 * Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: Proprietary, free under certain conditions. See Documentation. * License: Proprietary, free under certain conditions. See Documentation.
* This Revision: $Id: usbconfig.h,v 1.1 2006/09/26 18:18:27 rschaten Exp $ * This Revision: $Id: usbconfig.h,v 1.2 2006/09/29 21:51:07 rschaten Exp $
*/ */
#ifndef __usbconfig_h_included__ #ifndef __usbconfig_h_included__
@ -14,7 +14,7 @@
/** /**
* \file usbconfig.h * \file usbconfig.h
* \brief Configuration of the USB-driver. * \brief Configuration of the USB-driver.
* \version $Id: usbconfig.h,v 1.1 2006/09/26 18:18:27 rschaten Exp $ * \version $Id: usbconfig.h,v 1.2 2006/09/29 21:51:07 rschaten Exp $
*/ */
@ -30,7 +30,7 @@ the newest features and options.
/* ---------------------------- Hardware Config ---------------------------- */ /* ---------------------------- Hardware Config ---------------------------- */
#define USB_CFG_IOPORTNAME B #define USB_CFG_IOPORTNAME D
/* This is the port where the USB bus is connected. When you configure it to /* This is the port where the USB bus is connected. When you configure it to
* "PORTB", the registers PORTB, PINB (=PORTB-2) and DDRB (=PORTB-1) will be * "PORTB", the registers PORTB, PINB (=PORTB-2) and DDRB (=PORTB-1) will be
* used. * used.
@ -39,7 +39,7 @@ the newest features and options.
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. /* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This MUST be bit 0 or 7. All other values will result in a compile error! * This MUST be bit 0 or 7. All other values will result in a compile error!
*/ */
#define USB_CFG_DPLUS_BIT 1 #define USB_CFG_DPLUS_BIT 2
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. /* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
* This may be any bit in the port. Please note that D+ must also be connected * This may be any bit in the port. Please note that D+ must also be connected
* to interrupt pin INT0! * to interrupt pin INT0!