Searching \ for '16c66 not operating...' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: '16c66 not operating...'.

Truncated match.
PICList Thread
'16c66 not operating...'
2000\01\05@094346 by M. Adam Davis

Ok, I'm sure this is a trivial problem, and I'm just overlooking
something simple.

I have programmed a 16C66 with a simple program which turns PORTC bits 1
& 3 on (high) and bits 0 & 2 off (low).  I put the circuit together, and
all the port outputs are low input (though I've configured every port
pin except PORTC:0-3 as input).

I'm connecting it as a bare-bones circuit, 20MHz ceramic osc. connected
to pins 9 & 10
+5vdc to pin 20 (Vdd)
GND to pins 8 & 19 (Vss)
MCLR has been set to both high and low under different conditions
(Please remind me, MCLR must be pulled LOW to reset to processor?)

I have an LED coming from +5 through a resister which turns on when the
opposite lead goes low.  Every port pin I test with it turns the LED on
(ie, the pin is low).

The program was written in C, and compiled with CC5XFREE from I've compiled code for the 16f84 this way, and
everything has always turned out well.  The simulator in MPLAB is doing
exactly what I expect the program to do.  I am forcing MPLAB to turn
code protect/watchdog/power up timer/brownout off, and have the osc set
to HS.  I'm not familiar with the power up timer or brown-out detect,
assuming my power supply was connected via switch, would there be
problems with bouncing?

The code follows my signature.  Thanks for your help!


       processor  16C66
       radix  DEC

PORTA       EQU   0x05
TRISA       EQU   0x85
PORTB       EQU   0x06
TRISB       EQU   0x86
RP0         EQU   5
RP1         EQU   6
PORTC       EQU   0x07
TRISC       EQU   0x87

       GOTO main
                       ;#include "16c66.h"
                       ;void main(void)
                       ;       PORTA = 0b.0000.0000;
       BCF   0x03,RP0
       BCF   0x03,RP1
       CLRF  PORTA
                       ;       TRISA = 0b.1111.1111; /* All input (1) */
       MOVLW .255
       BSF   0x03,RP0
                       ;       PORTB = 0b.0000.0000;
       BCF   0x03,RP0
       CLRF  PORTB
                       ;       TRISB = 0b.1111.1111; /* All input (1) */
       MOVLW .255
       BSF   0x03,RP0
                       ;       PORTC = 0b.0000.0000;
       BCF   0x03,RP0
       CLRF  PORTC
                       ;       TRISC = 0b.0000.1111; /* 4 out, 4 in */
       MOVLW .15
       BSF   0x03,RP0
                       ;       PORTC = 0b.0101.0101;
       MOVLW .85
       BCF   0x03,RP0
m001    GOTO  m001      ;do{}while (1); /* Infinite Loop */

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...