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; Wed, 29 Jul 2020 07:13:08 -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 06TE407K015089; Wed, 29 Jul 2020 10:04:23 -0400 Received: from outgoing-exchange-1.mit.edu (OUTGOING-EXCHANGE-1.MIT.EDU [18.9.28.15]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 06TE3xjV015079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 29 Jul 2020 10:03:59 -0400 Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 06TE2PAf011192 for ; Wed, 29 Jul 2020 10:02:37 -0400 Received: from w92expo30.exchange.mit.edu (18.7.74.42) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 29 Jul 2020 10:03:03 -0400 Received: from oc11exhyb4.exchange.mit.edu (18.9.1.100) by w92expo30.exchange.mit.edu (18.7.74.42) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 29 Jul 2020 10:03:30 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by oc11exhyb4.exchange.mit.edu (18.9.1.100) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 29 Jul 2020 10:03:31 -0400 Received: from MWHPR20CA0032.namprd20.prod.outlook.com (2603:10b6:300:ed::18) by BL0PR01MB4161.prod.exchangelabs.com (2603:10b6:208:43::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.26; Wed, 29 Jul 2020 14:03:29 +0000 Received: from CO1NAM03FT013.eop-NAM03.prod.protection.outlook.com (2603:10b6:300:ed:cafe::f8) by MWHPR20CA0032.outlook.office365.com (2603:10b6:300:ed::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17 via Frontend Transport; Wed, 29 Jul 2020 14:03:29 +0000 Received: from 4.mo173.mail-out.ovh.net (46.105.34.219) by CO1NAM03FT013.mail.protection.outlook.com (10.152.80.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.10 via Frontend Transport; Wed, 29 Jul 2020 14:03:28 +0000 Received: from player157.ha.ovh.net (unknown [10.108.35.197]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 9DB5C148B6C for ; Wed, 29 Jul 2020 16:03:26 +0200 (CEST) Received: from nicolaperotto.it (212-40-65-70.pool.digikabel.hu [212.40.65.70]) (Authenticated sender: nicola@nicolaperotto.it) by player157.ha.ovh.net (Postfix) with ESMTPSA id 0A57214D0BF7D for ; Wed, 29 Jul 2020 14:03:25 +0000 (UTC) From: Nicola Perotto To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Wed, 29 Jul 2020 07:05:50 -0700 Subject: Re: [PIC] How to properly set PWM duty cycle Thread-Topic: [PIC] How to properly set PWM duty cycle Thread-Index: AdZlsmMaleoWZd1ZTtiznTVw7SUMog== Message-ID: References: List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US Content-Language: en-GB 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: Pass (protection.outlook.com: domain of nicolaperotto.it designates 46.105.34.219 as permitted sender) receiver=protection.outlook.com; client-ip=46.105.34.219; helo=4.mo173.mail-out.ovh.net; dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mitprod.onmicrosoft.com; s=selector2-mitprod-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HfrBOnY5NbUXA7bbusFe43jytC/qvghYSDWlrkqQ2W0=; b=QfSw47Yok4POnGJ0hlfqCHD3MH2oZ0k4W+OVkldtYAmVwmelWZelBeXnuTV9PeJNHRZNlMDQM7pVAJliiaL3P5le5y2OuTLk6EnufNsZFwN5TUozQLLmpO7+IjJ4mBMJTCSNXv4OxdbKwn+H6B6MVCU5gmNTN7sxN81aNeqlKIA= authentication-results: spf=pass (sender IP is 46.105.34.219) smtp.mailfrom=nicolaperotto.it; mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=bestguesspass action=none header.from=nicolaperotto.it; user-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 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-topics: [PIC] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 SGkgSmFtZXMsCgpPbiAyOS8wNy8yMDIwIDE0OjM1LCBKYW1lcyBCdXJrYXJ0IHdyb3RlOgo+ICJX aGF0IGFtIEkgbm90IGdldHRpbmc/IiBJcyB2ZXJ5IHVzZWZ1bC4gSXQgdGVsbHMgeW91IHRoYXQg SSBkb24ndAo+IHVuZGVyc3RhbmQsIHBvc3NpYmx5IG5vdCBldmVuIGVub3VnaCB0byBrbm93IHdo YXQgaW5mb3JtYXRpb24geW91IG5lZWQgdG8KPiBoZWxwIG1lLgpNeSBiYWQsIEkgbWlzdW5kZXJz dG9vZCB0aGUgc2VudGVuY2UsIEkgc3BlYWsgYmV0dGVyIEFzbSB0aGFuIEVuZ2xpc2ggOy0pCgo+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