View previous topic :: View next topic |
Author |
Message |
meereck
Joined: 09 Nov 2006 Posts: 173
|
18F and 18LF |
Posted: Fri Feb 29, 2008 5:21 am |
|
|
Hello, I would like to migrate from 5V to 3.3V. I use 18F1220 so 18LF1220 will be used instead.
Do I just change voltage supplied and thats it?
I assume that I can just flash the LF PIC with the hex for F series, right?
cheers meereck |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Fri Feb 29, 2008 8:10 am |
|
|
Check the allowable frequency chart usually near the bottom of the datasheets. The LF parts can't run at the full speed of the F parts. |
|
|
libor
Joined: 14 Dec 2004 Posts: 288 Location: Hungary
|
|
Posted: Fri Feb 29, 2008 12:58 pm |
|
|
The only difference (from software programming viewpoint) is two extra brownout-voltage setting levels added in the LF parts.
I had some issues not being able to flash the program at low voltages, so I usually add a 5V supply option (separated from the 3V part) for ICSP programming. |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Fri Feb 29, 2008 1:15 pm |
|
|
thanx,
i havent found information if the inputs of the PIC18LF are 5V tolerant.
have a nice weekend.
M. |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri Feb 29, 2008 2:55 pm |
|
|
You should be able to run the LF version at 5V with no problem. It just has the ability to run at the lower voltage levels as well.
I believe some of the inputs are rated as a percentage of the supply voltage, ie. a high would be at least 0.8 * VCC (on certain inputs). So, at 5V the input would need to be at least 4V to register as a high whereas at 3.3V it would need to be 2.64V. Double check the data sheet to verify which inputs need to be what. They are not all the same for each input. That one has bitten me a couple of times.
Ronald |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sat Mar 01, 2008 4:24 am |
|
|
I am sorry, I didnt put it in a correct way.
I want to connect a 3.3V device to a PIC and I would like to avoid using voltage levels converters (if possible?). Moreover, in the case the PIC will be running at 3.3V, what happens if I connect 5V to a PIC's input pin? I reckon it blows up, right?
From datasheets (running at 3.3V) :
PIC18LF1220:
Output low=0.6V
Output high=2.6V
Input low=0.495V TTL, 0.66V Schmitt
Input high=1.625V TTL, 2.64V Schmitt
my 3.3V device:
Output low=0.5V
Output high=2.7V
Input low=1.15V
Input high=2.31V
PIC outputs to devices input and vice versa =>
I think there is no problem with the device's inputs. Anyway, there might be the following issues with the PIC's inputs:
1) PIC TTL input low is a little bit lower than device output low - does it matter?
Am I correct?
thank you |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Sat Mar 01, 2008 12:04 pm |
|
|
For 5V signals --> 3V PIC, all you need is a series resistor. Ipic = (5V - 3V)/R, select Ipic to be small, about 1mA, then calculate the R you'll need.
For 3V signals from PIC --> 5V chips, it's safest to use a level converter chip such as the MAX3371. You can get away without one in some circumstances, such as the 3V pic driving TTL inputs, which only need 2.4V to count a signal as "H". For Schottky inputs, you can't directly drive them from a 3V source. You'll need a level converter. |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sun Mar 02, 2008 3:22 am |
|
|
thank you,
What did you mean by "Schottky inputs", does it stand for "Schmitt trigger" input?
I was rather wondering if I can connect the 3.3V device to 18LF PIC running at 3.3V. Whether all input and outpul levels match. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Sun Mar 02, 2008 12:52 pm |
|
|
meereck wrote: | What did you mean by "Schottky inputs", does it stand for "Schmitt trigger" input?
I was rather wondering if I can connect the 3.3V device to 18LF PIC running at 3.3V. Whether all input and outpul levels match. |
Whoops, I meant Schmitt trigger, not Schottky. My mistake.
Of course you can connect a 3.3V peripheral to your 3.3V PIC. Nothing special needs to be done if each chip is drawing power from the same source. |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sun Mar 02, 2008 3:53 pm |
|
|
Great, thanks for your time.
M. |
|
|
|