Received: from PCH.mit.edu (18.7.21.50) by mail.efplus.com (192.168.0.8) with Microsoft SMTP Server (TLS) id 8.3.485.1; Mon, 20 Jul 2020 04:44:45 -0700 Received: from PCH.MIT.EDU (localhost.localdomain [127.0.0.1]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 06KBZZER012949; Mon, 20 Jul 2020 07:36:29 -0400 Received: from outgoing-exchange-3.mit.edu (OUTGOING-EXCHANGE-3.MIT.EDU [18.9.28.13]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 06KBZXRt012943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 20 Jul 2020 07:35:34 -0400 Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id 06KBbRx8002324 for ; Mon, 20 Jul 2020 07:37:29 -0400 Received: from w92expo26.exchange.mit.edu (18.7.74.32) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 20 Jul 2020 07:35:21 -0400 Received: from oc11exhyb8.exchange.mit.edu (18.9.1.113) by w92expo26.exchange.mit.edu (18.7.74.32) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Mon, 20 Jul 2020 07:35:31 -0400 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.52) by oc11exhyb8.exchange.mit.edu (18.9.1.113) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 20 Jul 2020 07:35:31 -0400 Received: from MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) by MWHPR01MB2784.prod.exchangelabs.com (2603:10b6:300:f3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.24; Mon, 20 Jul 2020 11:35:28 +0000 Received: from CO1NAM03FT030.eop-NAM03.prod.protection.outlook.com (2603:10b6:300:4b:cafe::2a) by MWHPR02CA0016.outlook.office365.com (2603:10b6:300:4b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.19 via Frontend Transport; Mon, 20 Jul 2020 11:35:28 +0000 Received: from mail-pf1-f180.google.com (209.85.210.180) by CO1NAM03FT030.mail.protection.outlook.com (10.152.80.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Mon, 20 Jul 2020 11:35:28 +0000 Received: by mail-pf1-f180.google.com with SMTP id 207so8924307pfu.3 for ; Mon, 20 Jul 2020 04:35:28 -0700 (PDT) From: James Burkart To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Mon, 20 Jul 2020 04:35:15 -0700 Subject: Re: [PIC] MPLAB-X won't set PWM frequency above 25Hz Thread-Topic: [PIC] MPLAB-X won't set PWM frequency above 25Hz Thread-Index: AdZeiyqXcnrw0l/FTUa5ty1nkDRz9Q== Message-ID: References: List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: TS500.efplus4.local X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-SenderIdResult: Pass X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: None (protection.outlook.com: burkartstudios.com does not designate permitted sender hosts) dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burkartstudios-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XvNpi395EEicZSiZAb50SayCkO7REAURuPOn0ahpVeg=; b=MxTTc3UvYvBcL5rSfZ3Rt19kr+ASewxWHJDkGO6nGdAVkX8jUPY8gQeb6sH06Tycw+ r9A81v9urQzj+YBCfwhXS8KAEXZHOnpBF+GVtXTxnC3qDNZz/scPONp9MZNtBfnzSwW/ KfrsgHy1M50Ixnxq6/KbCWL4PQp2EMyK2bldsc1NO0hFCxVsLya7b/ta8keDKqruVRhb 9qFXE5oIeSBGTB+Y8YsDZvwCAMamZVlPp2bht3g8XGXyGF3ZJXnI+mgfynoWrHTYS3nr bUWztsFxWIchN+nRPM/Ifw1JKb1uPzKSmKsmAJU2wwg0nLgXWG2InNSpoaGn2BgXucYt wwLw== authentication-results: spf=none (sender IP is 209.85.210.180) smtp.mailfrom=burkartstudios.com; mit.edu; dkim=pass (signature was verified) header.d=burkartstudios-com.20150623.gappssmtp.com; mit.edu; dmarc=none action=none header.from=burkartstudios.com; errors-to: piclist-bounces@mit.edu list-id: "Microcontroller discussion list - Public." list-post: x-beenthere: piclist@mit.edu x-mailman-version: 2.1.6 x-received: by 2002:a63:457:: with SMTP id 84mr18648612pge.219.1595244927180; Mon, 20 Jul 2020 04:35:27 -0700 (PDT) x-topics: [PIC] x-content-filtered-by: Mailman/MimeDel 2.1.6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sorry, yes, MCC. I'm pretty sure I have a DIP package 16F1503 somewhere, so hopefully this afternoon I can dig it out and see what I can find out. But I've never experienced this before in MCC. -- James B On Mon, Jul 20, 2020, 3:40 AM Forrest Christian (List Account) < lists@packetflux.com> wrote: > I'm curious where you're seeing these values, Is this in MCC or something > like that? > > So, here are random thoughts: > > Is the processor really running at 16Mhz? Blinking a led with a delay > loop is a good way to verify this. > > If you're running at 16Mhz, it seems like if you set the timer prescale t= o > 1, and then set a PR2 value of 0xff you'd get where you want to be. > > That is 16Mhz/4 =3D 4Mhz(Fosc/4) / 1 =3D 4Mhz / 256=3D 15.625kHz > > On Sun, Jul 19, 2020 at 10:06 PM James Burkart > wrote: > > > I'm using MPLAB-X v5.35, and XC-8 v2.20. > > > > Using PIC16F1503. Brand new stand alone project. Set internal frequency > to > > 16MHz. TMR2 period set to 250ns. PWM frequency shows 25Hz. Nothing I do > is > > setting the PWM frequency correctly. What am I missing here? I'll have = to > > dig out my stuff to breadboard it and see what the actual PWM frequency > is, > > but this is frustrating. > > > > I'd like to set the timer period to 64 us and get a PWM frequency of > 15.625 > > kHz. > > -- > > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > -- > - Forrest > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .