16F887 on 3.3v

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

16F887 on 3.3v

Postby ASCDON » Wed Sep 16, 2015 3:19 pm

Hello guys & gals, my first time on your forum.
I have a (hopefully) simple question about a 16F887. I am trying to get this chip to run on 3.3v. I wrote a simple LED blink program that works fine on 5v, but will not work with 3.3v. I do have decoupling caps on both VDD pins, I have tried using external and internal OSC. at 4mhz and 10mhz, with and without loading caps 22pf, I tried turning off the BOR and lowered the BORV to 2.1v. The data sheet clearly specifies this chip will work between 2v-5v. PLEASE HELP, Thanks
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby AussieSusan » Thu Sep 17, 2015 3:32 am

Looking at the graphs in the data sheet (18-1 to 18-12) it would seem that there are several limits on your options for oscillator source and frequency when you are running at the lower end of the supply range.
I'm a bit confused as to the actual oscillator sources that you have tried.
EC mode (i.e. an external oscillator) is probably your mode flexible BUT it all depends on what your external oscillator requires with respect to the supply voltage. Also this does not require any loading capacitors (the external oscillator is a completely separate thing and all the MCU sees is the clock pulses on a single line).
The loading caps would only apply when you use a crystal (HS or XT mode) and the HS mode graph does not not go above 10MHz for 3.3v. XT mode does work at lower voltage but there is a limit of 4MHz for the crystal. (The EXTRC mode is very similar to the XT mode by the look of it.)
The internal oscillator (I assume you mean the HFINTOSC) will work but is limited to 8MHz.
Can you please clarify the oscillator configuration you are using?
Also it might help to see the code you have written in case there is something in there.
Finally "...but will not work..." is not that helpful. Does the oscillator fail, can you not single-step through the code with the debugger, or what?
Susan
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby Joseph Watson » Thu Sep 17, 2015 2:50 pm

This is probably not your problem but I thought I would just throw it out there anyway. Some LEDs have a higher forward voltage drop than others, particularly blue and white LEDs. That is, at 3.3V, you are getting close to the voltage where a LED might not light. A red LED has about the lowest forward voltage and might be a good one to try for your test. For more info, check out this page, especially the paragraph just after the heading "Using LEDs": http://www.gizmology.net/LEDs.htm

Also, this MAXIM graph shows what I am talking about: https://www.maximintegrated.com/en/imag ... 3Fig10.gif

(I would have attached the graph here to be seen directly but it is from a copyrighted page.)
NCR once refused to hire me because I was too short. I'm still waiting on my growth spurt.
User avatar
Joseph Watson
 
Posts: 49
Joined: Sat May 31, 2014 8:06 pm
Location: Ohio, USA
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby ASCDON » Thu Sep 17, 2015 4:00 pm

Thank you Aussiesusan and JW for the quick response.
I tried posting this already, but it did not show up, so if you see it twice, that's why.
What I meant to say was that I did try using the chips internal oscillator at all of the different ranges, as opposed to my normal external 4mhz crystal with loading caps. The frequency for this project really does not matter to me, since I am just trying to get the MCU to work on 3.3volts. Also, I forgot mention that I am using PBP (PICBASIC PRO) for the IDE and compiler, not sure if this matters. And yes JW, I did test LED on 3.3v, good catch but not the issue (if only it was that simple). I tried some configuration code (that I was not familiar with) to try to turn off the BrownOutReset and even set the BOR voltage to 2.1v instead of 4v. The code does not produce errors and seems to compile correctly, but the LED still does not blink. Below is my TEST code to just blink an LED and prove that the 16F887 will work on 3.3v.

Code: Select all
:Program = Test
clear
pause 1000
define LOADER_USED 1
define OSC 4

#CONFIG
    __CONFIG _CONFIG1, _BOREN_OFF
    __CONFIG _CONFIG2, _BOR21V
#endconfig

ANSEL = %00000000
ANSELH = %00000000
TRISD = %00000000   ; I also set TRISA - E for outputs

START:
PORTD.1 = 0
pause 500
PORTD.1 = 1
pause 500
goto START

end
Last edited by ric on Thu Sep 17, 2015 9:34 pm, edited 1 time in total.
Reason: Placed forum "code" tags around the code.
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby Roche » Thu Sep 17, 2015 5:30 pm

I notice that TRIS D is in bank 1 - does PBP automatically select the right bank?
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 ASCDON » Thu Sep 17, 2015 5:40 pm

I assume so. Again, this program works fine with 5v, but not 3.3v. Don't think it's a program problem. I'm thinking it's a config issue, but I'm open to any suggestions. Thanks
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby ric » Thu Sep 17, 2015 9:35 pm

Try also turning LVP off in the config word.
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

Re: 16F887 on 3.3v

Postby ASCDON » Fri Sep 18, 2015 12:43 am

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.
ASCDON
 
Posts: 10
Joined: Wed Sep 16, 2015 2:54 pm
PIC experience: Experienced Hobbyist

Re: 16F887 on 3.3v

Postby ric » Fri Sep 18, 2015 12:58 am

Most of us aren't familiar with PicBasic, so can't tell if there's anything else required there.
Can you post of schematic of your board, showing ALL the connections to the PIC?
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

Re: 16F887 on 3.3v

Postby Joseph Watson » Fri Sep 18, 2015 3:11 am

Given that the LED does not blink, since you never mentioned it, I am betting that the LED is Off, not On. Is that true? Does the LED and its associated current limiting resistor go from the output pin to VCC or to GND? Have you checked the voltage on the output pin to determine if it really is high or low? Also, have you determined whether it is floating as if it is an input or is it actually driven high or driven low? These answers could serve as some clues. Also, have you determined if the clock is running? Do you have a digital voltmeter? Do you have an oscilloscope?

One more thing... I know that PBP produces an assembly language source file when you compile your program. It might be helpful to post that code for us to look over.
NCR once refused to hire me because I was too short. I'm still waiting on my growth spurt.
User avatar
Joseph Watson
 
Posts: 49
Joined: Sat May 31, 2014 8:06 pm
Location: Ohio, USA
PIC experience: Experienced Hobbyist

Next

Return to 14-Bit Core

Who is online

Users browsing this forum: No registered users and 6 guests