EXHIBIT 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM We hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (Nos. 333-69594, 333-47606 and 033-43691) of Supertex, Inc. of our report dated June 16, 2004 relating to the consolidated financial statements and financial statement schedule, which appears in this Form 10-K. San Jose, California June 16, 2004