16F887 on 3.3v

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

Re: 16F887 on 3.3v

Postby AussieSusan » Fri Sep 18, 2015 4:11 am

(My post seen\ms to have disappeared - apologies if this is duplicated.)
Can you single-step with PicBasic? If you can then that will tell you 1) that you code is actually running at the lower voltage and 2) that you can sstop just before and just after you toggle the pin so that you can (with a scope or multimeter) see if the pin changes state and to what voltage levels.
Susan
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby Roche » Fri Sep 18, 2015 11:22 am

As a bit of advanced procrastination I lashed up an 886 with an LED on port C4, and it ran down to 3.0V.
I just used the standard template file and its config bits:

__CONFIG _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
__CONFIG _CONFIG2, _WRT_OFF & _BOR21V
Roche
 
Posts: 72
Joined: Fri Jul 11, 2014 12:35 pm
PIC experience: Professional 5+ years with MCHP products

Re: 16F887 on 3.3v

Postby drh » Fri Sep 18, 2015 3:07 pm

ASCDON wrote:Yes, I tried that too, did not work. I also tried programming the MCU with 5v and then running on 3.3v, did not work.
I have read and tried every google thread on this subject, but most of them deal with different issues. I tried to post on MicroChip's forum but the admin had some issue with my e-mail address or something. I have studied the data sheet for this MCU and they say nothing about any problems with 3.3v, other than high frequency limitations, and temperature ratings(I/P vs E/P). To my knowledge there is no other version of this MCU that you would have to use for 3.3v. I have been at this for several days and I am trying to let the fine people on this forum know everything I've tried, but even I have lost track.


Did the LED blink at 5V?
What is the value of your LED current limiting resistor?
User avatar
drh
Verified identity
 
Posts: 61
Joined: Tue May 27, 2014 3:31 pm
Location: Hemet, Calif.
PIC experience: Professional 5+ years with MCHP products

Re: 16F887 on 3.3v

Postby ASCDON » Fri Sep 18, 2015 3:31 pm

The LED is off and does not blink. The LED goes from PORTD.1 to GND (VSS).I have checked the output voltage on the LED where it meets the PORTD.1 and it is less than 400mv. The MCU PORTD.1 is configured as an output and is not floating. As far as if the clock is running, I think that is the whole issue. I am moving the project (physically) to a location where I have an oscilloscope to look at the clock pins. By the By, funny thing happened this morning when I turned the power on to the project, IT WORKED!! The LED blinked just like as if had 5v, but it only had 3.3v. After I turned the power off and back on it did not work :( I tried cycling power again several times but it never worked again. Something must be on the hairy edge with the oscillator starting up.
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby ASCDON » Fri Sep 18, 2015 3:47 pm

I sent my last post, and then the new replies showed up. Thanks to all for your help.
AussieSusan, not sure about the single step, will research this.
Roche, some of these configs I have never seen before, but will implement what you did. This will possibly be the issue.
drh, Yes the LED blinks fine at 5v and I have a 220 ohm limiting resistor. I put the LED across 3.3v, turns on.

To all, see my above post, Thanks
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby drh » Fri Sep 18, 2015 11:33 pm

Intermittent turn on, running can be caused by:
LVP being ON when you don't have RB3 pulled down.
MCLR floating, not pulled up.
Incorrect xtal/capacitors an/or settings (XT vs HS).
Configured for RC osc. when you don't have the external resistor/capacitor connected.
WDT enabled when your code doesn't "service" the WDT.
Unstable power supply.
Very slow PS turn on. Use the power-up timer PWRT.

Brownout reset voltage set too high relative to Vdd can keep the PIC reset.
User avatar
drh
Verified identity
 
Posts: 61
Joined: Tue May 27, 2014 3:31 pm
Location: Hemet, Calif.
PIC experience: Professional 5+ years with MCHP products

Re: 16F887 on 3.3v

Postby ASCDON » Sat Sep 19, 2015 1:43 am

Have tried turning LVP on/off.
I do have a 1k resistor to VSS on RB3.
MCLR (pin 1) is pulled up by a 10k resistor.
Have tried with/without 22pf loading caps on the crystal.
Have tried WDT enabled/disabled.
Have a very stable LM 2937ET(3.3v) regulator just feeding the MCU with decoupling caps (both VDD pins).
Have tried using the PWRT on/off.
Have disabled BOREN and set BORV to 2.1v.
After JW's post I connected an oscilloscope to the OSC pins and found that the oscillator totally stops working at <4.02v. As far as any other assembly code, this is all there is that I know of. The LED is off and stays off.
Have tried every setting for the OSC internal osc and external crystal. I am beginning to think that the 16F887 just will not work below 4v. I am going to try the external RC, but not sure of the values to use. I may have to order a 16F884 to test but not sure if it has everything the 16F887 has. I may have to replace the16F887 with another 40 pin MCU (if there is one).
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby drh » Sat Sep 19, 2015 3:01 pm

If the osc. stops at 4.02V, sounds like the BOR is enabled and set for 4V.
I'm not familiar with the compiler you are using, but maybe it has
a problem with the config settings?
User avatar
drh
Verified identity
 
Posts: 61
Joined: Tue May 27, 2014 3:31 pm
Location: Hemet, Calif.
PIC experience: Professional 5+ years with MCHP products

Re: 16F887 on 3.3v

Postby ASCDON » Sat Sep 19, 2015 5:14 pm

drh, I think you are exactly right.
I don't think anything in my config statements are working. I set the OSC mode to XT and disabled auto switch over to the chips internal OSC and the program still runs (on 5v)without anything connected to OSC1(pin 13) and OSC2 (pin 14). I think the BOR is still enabled and the BORV is still 4v, even though I have disabled the BOR and set the BORv to BOR21V. I tried to set the OSC mode to external clock source and I injected 4mhz into pin 13(OSC1) from another pic 16F887. looked at the clock pulses with an oscilloscope going into OSC1 and they of course remained good, but when I lowered the VDD to less than 4v the LED quit blinking. The config example I used was from the PICBASIC PRO Compiler REFERENCE MANUAL section 2.1 Program Organization (Example) intended for a PIC16F887, so I think this is the correct config syntax .
#CONFIG
__CONFIG _CONFIG1, _HS_OSC & _LVP_OFF & _CP_OFF
#ENDCONFIG
This syntax does not give any errors, and seems to program. The only thing different is when I type #ENDCONFIG it automatically switches the #ENDCONFIG to lower case (#endconfig) Not sure if this matters or not. Do you think I have to do anything before or after the config to make it work in the PIC?
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby drh » Sat Sep 19, 2015 10:12 pm

I don't know anything about what that compiler expects for the CONFIG.
If you are running this compiler within MPLAB8, click on the Configure at the top. Then click on Configuration Bits. If you are not running within MPLAB8, you should be able to Import the hex file and check the configuration bits.
User avatar
drh
Verified identity
 
Posts: 61
Joined: Tue May 27, 2014 3:31 pm
Location: Hemet, Calif.
PIC experience: Professional 5+ years with MCHP products

PreviousNext

Return to 14-Bit Core

Who is online

Users browsing this forum: No registered users and 5 guests

cron