-
16F1827 voltage issue
I have an 16F1827 not LF version, just the "F". When I run it at 3.3v my code runs perfectly all works well. When I run it at 5v it appears to reset over and over again. I have 4 led's drawing about 20mA each on the I/O ports. watch dog and brown out is disabled in the fuses. I tried them enabled/disabled and ended up with the same cyclical reset condition.
If it was an LF part I can understand the weirdness, but this part is a regular F part. Any ideas would be helpful. BTW....I loaded the code on another 16F1827 and it does the same thing and it didn't have LED's on the ports.
thanks,
Nick
-
Is that 20mA at 3.3 or 5 volts?
What do you have for a power supply?
-
I have two different boards. 1 board I had etched that has all my I/O on headers as a general development board. It has a selectable 3.3v / 5v LM317 voltage regulator. I simply switch in parallel resistors to set the 5v. 2nd board is also etched it does not have a voltage regulator and it is powered by a 3.7v LiPo battery.
The development board flashes when it tries to power the LED's at 5v in a cyclical reset. When in 3.3v it is stable and works. The same code was put into my second board with the LiPo since it is driving pager motors, it too shows the reset issues.
I am clueless why it is doing that.
Nick
-
If you are sourcing the LEDs and using the Extended version then you may be over amping it. 65mA is all the chip can handle at one time.
Section 29.0 of the data sheet has it broke down.
What happens if you decrease the LED amp draw?
-
Hi,
You do have current limiting resistors in series with the LED's don't you?
/Henrik.
-
According to my calc, to run LED's from 5V source you will need ~85 Ohm resisters in series for each led between the LED annode and the pic IO port to reduce the current down to 20mA each...
Thats assuming the LED's have a drive voltage of 3.3V
to work it out...
5 - 3.3 = 1.7V diference
now use V=IR re-aranged to R=V/I
Where,
V = voltage diference
I = Current in amps (mA is 1/1000A or 0.001A)
R = Resistance in ohms
-
I have 6 LEDs. The LEDS represent 2 H-bridges with 2 direction controls and 1 PWM per bridge. The resistors were 70 ohms, I changed all resistors to 220. It still did the same reset condition. I reprogrammed the board a few times changing nothing but fuse settings and It seems to work now. I have no idea why....I just flipped them one way and then the other and downloaded it.
Nick
-
An eye to the default value of the LVP bit ???
Alain