Unstable PIC16F884

(instructions, reset, WDT, specifications...) PIC12F6xx, PIC16Fxxx, PIC16F6x, PIC16F7x

Unstable PIC16F884

Postby paullebow » Mon Jan 23, 2023 7:54 pm

Hello -

I've made a simple LED flasher breadboard circuit using a 18F45K42, crystal osc with no issues. Switch to a PC16F884 leads to problems:
1) Oscillator is unstable. Stops oscillating when lay board flat on surface. Stray capacitance issue with 16F vs 18F?? Have to tilt the board!
2) Switch to internal oscillator sent OSCCOM to 0b0111000 for highest 8MHz operation. Get inconsistent results. Flash durations not related to __delay_ms() settings or _XTAL_FREQ settings. Initially I set to 8000000 (8MHz) tried all different delays and __XTAL_FREQ values.

Don't know why the 16F should be so unstable with crystal while the 18F is so robust. I've swapped out replacement PIC16F884's and crystals. Same issues. Don't understand response to internal oscillator commands.

Using XC8 MPlab Pickit3

Thanks!
paullebow
 
Posts: 1
Joined: Mon Jan 23, 2023 7:38 pm

Re: Unstable PIC16F884

Postby ric » Tue Jan 24, 2023 1:44 am

What value load capacitors do you have on the crystal?
Don't forget that breadboard also adds several pF of its own capacitance.

Do you have an appropriate bypass capacitor mounted right next to EACH pair of Vss/Vdd pins?

2) Switch to internal oscillator sent OSCCOM to 0b0111000 for highest 8MHz operation. Get inconsistent results. Flash durations not related to __delay_ms() settings or _XTAL_FREQ settings. Initially I set to 8000000 (8MHz) tried all different delays and __XTAL_FREQ values.

Please post the actual code (with config settings) that you are testing with.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products


Return to 14-Bit Core

Who is online

Users browsing this forum: No registered users and 9 guests

cron