From 17f9c340cbec16ea2e262aee4a317828f3e1069f Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Thu, 1 Dec 2011 12:04:40 -0700 Subject: [PATCH] Fix comments about port assignments --- main.c | 10 +++++----- nbproject/private/private.xml | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index f062b41..5abba01 100644 --- a/main.c +++ b/main.c @@ -9,7 +9,7 @@ #include #define RUNAT32MHZ /* else 16 MHz */ -#define LEDBIT 0x01 /* PORTB.3 */ +#define LEDBIT 0x01 /* PORTB.0 */ #if defined(RUNAT32MHZ) __CONFIG(WDTE_OFF & FOSC_INTOSC); @@ -33,14 +33,14 @@ void pic_init() void pwm_init() { - /* Initialize PWM on PORTB.0 + /* Initialize PWM on PORTB.3 * - Fosc = 32MHz * - Prescale = 16 * - PRx value = 0xff * = f(pwm) = 1.95 kHz */ - /* Disable output on PORTB.0 */ + /* Disable output on PORTB.3 */ TRISB |= 0x08; /* Configure ECCP1 */ @@ -53,14 +53,14 @@ void pwm_init() PR2 = 0xff; T2CON = 0b00000111; - /* Enable PWM output, PORTB.0 */ + /* Enable PWM output, PORTB.3 */ while (!TMR2IF); /* wait until timer overflow */ TRISB &= ~0x08; } void led_init() { - PORTB &= ~LEDBIT; /* Led is PORTB.3 */ + PORTB &= ~LEDBIT; /* Led is PORTB.0 */ TRISB &= ~LEDBIT; } diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 8af8ccd..c1f155a 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -1,7 +1,4 @@ - - file:/home/smckown/workspace/picdimmy/main.c - -- 2.39.2