<PAGE>
                                  EXHIBIT 10.40

                           SECOND AMENDMENT AND WAIVER
                               TO CREDIT AGREEMENT

        THIS SECOND AMENDMENT AND WAIVER TO CREDIT AGREEMENT (this "Second
Amendment") dated as of November 14, 2001, is made and entered into by and
between DIODES INCORPORATED, a Delaware corporation ("Borrower"), and UNION BANK
OF CALIFORNIA, N.A., a national banking association ("Bank").

                                    RECITALS:

A. Borrower and Bank are parties to that certain Credit Agreement dated as of
December 1, 2000, as amended by that certain First Amendment and Waiver dated as
of August 10, 2001 (as so amended, the "Agreement"), pursuant to which Bank
agreed to extend certain credit facilities to Borrower in the amounts provided
for therein.

B. Pursuant to Section 6.7 of the Agreement, Borrower agreed, among other
things, to cause Borrower and its Subsidiaries (excluding SKE) to maintain a
Fixed Charge Coverage Ratio (as such term is defined in the Agreement) of not
less than 1.0 to 1.0 as of the last day of each fiscal quarter. Borrower failed
to cause Borrower and its Subsidiaries (excluding SKE) to maintain a Fixed
Charge Coverage Ratio of not less than 1.0 to 1.0 as of the last day of the
fiscal quarter ended September 30, 2001, which failure constitutes an Event of
Default under Section 8.1(c) of the Agreement.

C. Pursuant to Section 6.5 of the Agreement, Borrower agreed, among other
things, to cause Borrower and its Subsidiaries to maintain a Leverage Ratio of
1.75:1.00 as of the last day of each fiscal quarter after December 31, 2000.
Borrower failed to cause Borrower and its Subsidiaries to maintain a Leverage
Ratio of not greater than 1.75:1.00 as of the last day of the quarter ended
September 30, 2001.

D. Pursuant to Section 6.8 of the Agreement, Borrower agreed, among other
things, to cause Borrower and its Subsidiaries to maintain a Net Profit After
Taxes for each fiscal quarter of not less than Five Hundred Thousand Dollars
($500,000). Borrower failed to cause Borrower and its Subsidiaries to maintain a
Net Profit After Taxes of not less than Five Hundred Thousand Dollars ($500,000)
as of the last day of the fiscal quarter ended September 30, 2001.

E. Borrower has requested that Bank agree to waive the Events of Default
described in Recitals B, C and D hereinabove. Bank is willing to so waive such
Events of Default, subject, however, to the terms and conditions of this Second
Amendment.

F. Borrower has further requested that Bank permit Borrower to guarantee the
incurrence by its wholly-owned subsidiary, Diodes Taiwan Co., Ltd. ("DII") of
indebtedness in a principal amount not to exceed Five Million Dollars
($5,000,000) at any one time, which guarantee would otherwise be prohibited by
Section 7.4 of the Agreement. Bank is willing to permit Borrower to guarantee
such indebtedness, subject, however, to the terms and conditions of this Second
Amendment

                                   AGREEMENT:

        In consideration of the above recitals and of the mutual covenants and
conditions contained herein, Borrower and Bank agree as follows:

1. RECITALS INCORPORATED AND DEFINED TERMS. The Recitals set forth above are
incorporated by reference herein. Initially capitalized terms used herein which
are not otherwise defined shall have the meanings assigned thereto in the
Agreement.

2. AMENDMENTS TO THE AGREEMENT.

        (a) Section 1 of the Agreement is hereby amended by adding a definition
of "SECOND AMENDMENT" thereto in the appropriate alphabetical order, which shall
read in full as follows:

            "'SECOND AMENDMENT' shall mean that certain Second Amendment and
Waiver to this Agreement dated as of November 14, 2001, by and between Borrower
and Bank."

        (b) Section 2.7 of the Agreement is hereby amended by adding a new
subparagraph (c) thereto, which shall read in full as follows:

            "(c) Within fifteen (15) days after the date of the Second
Amendment, Borrower shall make one or more mandatory prepayments of principal on
the Term Loans in an aggregate amount of not less than Three Million Dollars
($3,000,000). In addition, Borrower shall make one or more mandatory prepayments
of principal on the Term Loans and the Acquisition Loan in an aggregate amount
of not less than One Million Dollars ($1,000,000) no later than December 31,
2001. Each such mandatory prepayment of principal shall be in addition to any
contractually scheduled principal payments due under any of the Term Loans or
the Acquisition Loan, as applicable."

        (c) Section 7.4 of the Agreement is hereby amended to add the following
sentence thereto, which shall read in full as follows:

            "Notwithstanding the foregoing sentence, Borrower may execute a
guaranty of the indebtedness of its wholly-owned subsidiary, Diodes Taiwan Co.
Ltd., in an amount not exceeding Five Million Dollars ($5,000,000); provided
that the proceeds of any such indebtedness shall be used to repay the Term Loans
and/or Acquisition Loans."

        (d) Section 7.10 of the Agreement is hereby amended by substituting the
words "Nine Million Five Hundred Thousand Dollars ($9,500,000) for the fiscal
year ending December 31, 2001 and an amount to be determined for any fiscal year
thereafter"


                                       61
<PAGE>
for the words "Eighteen Million Five Hundred Thousand Dollars ($18,500,000) for
any fiscal year thereafter" appearing in the fifth and sixth lines thereof.

3. WAIVERS.

        (a) Subject to the terms and conditions set forth in this Second
Amendment, Bank hereby waives the Events of Default that occurred under Section
8.1(c) of the Agreement as a result of Borrower's failure to comply with
Sections 6.5, 6.7 and 6.8 as of the last day of the fiscal quarter ended
September 30, 2001.

        (b) The waivers provided for in this Section 3 are limited precisely as
written and shall not be deemed to excuse Borrower's further performance of
Section 6.5, 6.7 or 6.8 of the Agreement, or of any other condition, covenant or
term contained in the Agreement or any other Loan Document. Any failure or delay
on the part of Bank in the exercise of any right, power or privilege under the
Agreement or any other Loan Document shall not operate as a waiver thereof.

4. EFFECTIVENESS OF THIS SECOND AMENDMENT. This Second Amendment shall become
effective as of the date hereof (the "Effective Date") when, and only when, Bank
shall have received all of the following, in form and substance satisfactory to
Bank:

        (a) A counterpart of this Second Amendment, duly executed by Borrower
and acknowledged by Guarantor where indicated hereinbelow; and

        (b) Such other documents, instruments or agreements as Bank may
reasonably deem necessary.

5. CONDITIONS SUBSEQUENT. The effectiveness of this Second Amendment is further
subject to the conditions subsequent that, in addition to the regularly
scheduled principal payments on the Term Loans and the Acquisition Loan,
Borrower shall (a) make one or more prepayments of principal in an aggregate
amount of not less than Three Million Dollars ($3,000,000) within fifteen (15)
days after the date of this Second Amendment, which prepayment(s) shall be
applied by Bank to the Term Loans, and (b) make one or more prepayments of
principal in an aggregate amount of not less than One Million Dollars
($1,000,000) no later than December 31, 2001, which prepayment(s) shall be
applied first to any remaining amounts outstanding under the Term Loans and
second to the Acquisition Loan. Borrower shall pay any prepayment fee payable to
Bank in connection with any such prepayments as provided for in the applicable
Note.

6. FEE. Borrower hereby acknowledges that an amendment, waiver and legal
documentation fee in the sum of Twenty-Seven Thousand Nine Hundred Thirty-Five
Dollars ($27,935) shall be charged to Borrower's demand deposit account number
3030152777 on January 7, 2002.

7. RATIFICATION.

        (a) Except as specifically amended hereinabove, the Agreement shall
remain in full force and effect and is hereby ratified and confirmed; and

        (b) Upon the effectiveness of this Second Amendment, each reference in
the Agreement to "this Agreement", "hereunder", "herein", "hereof" or words of
like import referring to the Agreement shall mean and be a reference to the
Agreement as amended by this Second Amendment.

8. REPRESENTATIONS AND WARRANTIES. Borrower represents and warrants as follows:

        (a) Each of the representations and warranties contained in Section 5 of
the Agreement, as amended hereby, is hereby reaffirmed as of the date hereof,
each as if set forth herein;

        (b) The execution, delivery and performance of this First Amendment are
within Borrower's corporate powers, have been duly authorized by all necessary
corporate action, have received all necessary approvals, if any, and do not
contravene any law or any contractual restriction binding on Borrower;

        (c) This Second Amendment is the legal, valid and binding obligation of
Borrower, enforceable against Borrower in accordance with its terms; and

        (d) No event has occurred and is continuing or would result from this
Second Amendment which constitutes an Event of Default under the Agreement, or
would constitute an Event of Default but for the requirement that notice be
given or time elapse or both.

9. GOVERNING LAW. This Second Amendment shall be deemed a contract under and
subject to, and shall be construed for all purposes and in accordance with, the
laws of the State of California.

10. COUNTERPARTS. This Second Amendment may be executed in two or more
counterparts, each of which shall be deemed an original and all of which
together shall constitute one and the same instrument.


                                       62
<PAGE>
WITNESS the due execution hereof as of the date first above written.

"Borrower"

DIODES INCORPORATED
By: /s/ Carl Wertz
Carl Wertz
Title: CFO


"Bank"

UNION BANK OF CALIFORNIA, N.A.

By: /s/ John Kase
John Kase
Title: VP


                           Acknowledgment of Guarantor

      The undersigned, as Guarantor pursuant to that certain Continuing Guaranty
dated as of December 1, 2000 (the "Guaranty"), hereby consents to the foregoing
Second Amendment and acknowledges and agrees, without in any manner limiting or
qualifying its obligations under the Guaranty, that payment of the Obligations
(as such term is defined in the Guaranty) and the punctual and faithful
performance, keeping, observance and fulfillment by Borrower of all of the
agreements, conditions, covenants and obligations of Borrower contained in the
Agreement are and continue to be unconditionally guaranteed by the undersigned
pursuant to the Guaranty.


FABTECH, INC.

By: /s/ Walter Buchanan
Walter Buchanan
Title: President


                                       63