D
Don Taylor
Guest
I've successfully used 16F627's in the past and was doing a similar
project with a 16F877, a couple of switches and a bank of leds.
I'm using an external RC oscillator 50 or 100 pf, 5 or 10 kohms.
Scope shows a very pretty RC sawtooth running on the clock input,
very nice squarewave running on the /4 clock output, frequencies
are within the ballpark for the 4Mhz part and change as expected
when I switch values for R and/or C.
I've got a nice RC pair on the MCLR/ and it is sitting high.
Configuration word is 0x3F73 which means
11 disable flash memory code protection
1 disable in-circuit-debug, use RB6,RB7 for i/o instead
1 unimplemented
1 disable flash memory write protect
1 disable eeprom protect
0 disable in-circuit low voltage programming, use RB3 for i/o
1 enable brown-out reset of the processor
11 disable flash memory code protection
0 enable 72ms power up delay timer to stabilize before starting up
0 disable watchdog timer
11 resistor-capacitor oscillator
11111101110011=0x3F73
I've reduced the code down to the point now where I do nothing
but set TRISB, TRISC, TRISD all zero to make them outputs
and set PORTB=0x55, PORTC=0x55, PORTD=0x55 just to see 1's and 0's
on the outputs and go into an infinite loop.
The MPLAB simulates all this and shows the output ports set.
The PG2B programmer happily reads the hex file, sees the part,
programs it, confirms the programming... and there is no joy.
All the pins on the part sit there sulking at logic zero.
I'd almost think that the code isn't even starting to run.
Can anyone see something really silly that is staring at me
and that I just haven't recognized?
Many thanks
project with a 16F877, a couple of switches and a bank of leds.
I'm using an external RC oscillator 50 or 100 pf, 5 or 10 kohms.
Scope shows a very pretty RC sawtooth running on the clock input,
very nice squarewave running on the /4 clock output, frequencies
are within the ballpark for the 4Mhz part and change as expected
when I switch values for R and/or C.
I've got a nice RC pair on the MCLR/ and it is sitting high.
Configuration word is 0x3F73 which means
11 disable flash memory code protection
1 disable in-circuit-debug, use RB6,RB7 for i/o instead
1 unimplemented
1 disable flash memory write protect
1 disable eeprom protect
0 disable in-circuit low voltage programming, use RB3 for i/o
1 enable brown-out reset of the processor
11 disable flash memory code protection
0 enable 72ms power up delay timer to stabilize before starting up
0 disable watchdog timer
11 resistor-capacitor oscillator
11111101110011=0x3F73
I've reduced the code down to the point now where I do nothing
but set TRISB, TRISC, TRISD all zero to make them outputs
and set PORTB=0x55, PORTC=0x55, PORTD=0x55 just to see 1's and 0's
on the outputs and go into an infinite loop.
The MPLAB simulates all this and shows the output ports set.
The PG2B programmer happily reads the hex file, sees the part,
programs it, confirms the programming... and there is no joy.
All the pins on the part sit there sulking at logic zero.
I'd almost think that the code isn't even starting to run.
Can anyone see something really silly that is staring at me
and that I just haven't recognized?
Many thanks