PDA

View Full Version : Anyone know about this PIC?



karenhornby
- 20th May 2008, 18:58
18LF452-I/P is what's written on it.
I've searched online and all I can find out is that the LF is low power version

mackrackit
- 20th May 2008, 19:03
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010296
This is the basic data sheet link and part summery.

tenaja
- 20th May 2008, 22:43
The "LF" parts can run on slightly lower voltage. Some of the register settings may vary, such as the a/d TAD and Tosc settings. I know of at least one chip that these settings differ from the regular "F" parts. Read your ds if in doubt.

karenhornby
- 21st May 2008, 10:39
Thanls guys :)
I was just curious as I found 3 samples of these that I had been sent a couple of years ago that I had forgotten I had and wanted to know how useable they are!
So far I'm only used to using a 16f877a

skimask
- 21st May 2008, 15:24
So far I'm only used to using a 16f877a
18F452 is almost a direct drop-in replacement for the '877. A few register changes here and there and you're set. It's all in the sheets...
My sequence on the 40 pin DIPs has been 16F877A (8K) -> 18F452 (16K) -> 18F4620 (32K) -> 18F4685 (48K) as my code space requirements have increased. Same circuit, slightly different register configurations, and very small changes in PBP code.

mackrackit
- 21st May 2008, 16:07
If you had very small changes in the PBP code, what caused you code space requirements to increase? :rolleyes:

skimask
- 21st May 2008, 16:22
If you had very small changes in the PBP code, what caused you code space requirements to increase? :rolleyes:
What I meant was, in addition to adding a bunch of new functions, the old functions needed very few code changes to accomodate the new functionality of each new PIC.

mackrackit
- 21st May 2008, 16:27
I thought so...I was just being a wise _ _ _ .

skimask
- 21st May 2008, 16:32
I thought so...I was just being a wise _ _ _ .
I knew that...but I figured I might want to clarify just a bit for the O/P...
(Wellton, Az.? I was in the area last week... Relatives in Safford, doing 2M-CCR recertification at DMAFB.)

karenhornby
- 21st May 2008, 16:34
A few register changes here and there and you're set.
Out of curiousity and to save me a lot of time if I use them, Any idea what register settings to change?

skimask
- 21st May 2008, 16:47
Out of curiousity and to save me a lot of time if I use them, Any idea what register settings to change?
Not off the top of my head. ADC module changed, SSP module changed, UART changed a little bit. A few bit positions changed, a few names changed, and so on.
Nothing concrete. Just depends what you're going to do with.
If you don't do anything with the registers manually, then PBP will handle practically everything else for you and you won't see a difference.

Acetronics2
- 21st May 2008, 16:59
Hi, Karen

just some lines to see ... ( it's for a 18F452 ! )




'************************************************* ****************************
'************************************************* ****************************
'Config processeur
'************************************************* ****************************
'

'@ __CONFIG _CONFIG1L, _WDT_OFF_1L & _WDTPS_128_1L
@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
@ __CONFIG _CONFIG2L, _BOR_OFF_2L & _BORV_27_2L & _PWRT_ON_2L
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
'@ __CONFIG _CONFIG3L, _WDT_OFF_3L & _WDTPS_128_3L
@ __CONFIG _CONFIG3H, _CCP2MX_OFF_3H
@ __CONFIG _CONFIG4L, _STVR_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
'@ __CONFIG _CONFIG4H, _WDT_ON_4H & _WDTPS_128_4H
@ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
@ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
@ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
@ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
@ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
@ __CONFIG _CONFIG7H, _EBTRB_OFF_7H

'************************************************* ****************************
'Config TIMERs

T0CON = %00000010 ' 16Bits 1/8 prescaler, Horloge Système, OFF

T1CON = %00001010 '1/1 prescaler, Quartz 32,768

T3CON = %01110001 ' ccp SUR TMR3,1/8 prescaler,Horloge système,ON

'************************************************* ****************************
'Config CCP1 arret CCP2

CCP1CON = %00000101 ' Capture sur front montant

CCP2CON = %00000000 'inhibition module CCP2

'************************************************* ****************************
'Inhibition SSP

SSPCON1.5 = 0

'************************************************* ****************************
'Config Interruptions

INTCON = %10000000
INTCON2 = %11110000
INTCON3 = %00000000

PIE1 = %00000100
PIE2 = %00000000

IPR1 = %00000001
IPR2 = %00000000

RCON = %10000000

'************************************************* ****************************
'Config ADC
'************************************************* ****************************

ADCON0 = %11000000
ADCON1 = %10000011

'************************************************* ****************************
'************************************************* ****************************
'Config et Prepositionnement E/S
'************************************************* ****************************

PORTA = %00000000
PORTB = %00000100
PORTC = 0
PORTD = 0
PORTE = 0

TRISA = %00111111
TRISB = %11100110
TRISC = %00000111
TRISD = %00000000
TRISE = %00000000
'


It's for a gadget that measures Hours of work ( total and split ), batt voltage, RPM, water and oil temp, and oil pressure.
Also logs the maxima, alerts if thresolds reached, and shows programmed maintenance needed ...

...

Alain

karenhornby
- 21st May 2008, 18:04
Your a star :) Thats almost exactly what I was after as i wont be using anything on the pic other than straight digital inputs and outputs, not using any of the "fancy function"
Its basically going to be 3 inputs that go high a number of outputs that go high or low depending on the inputs, an lcd display connected to it, and a DS18B20 temp sensor.
Oh quick question I'm pretty sure the answer is yes but can you directly substitute a DS18B20 - PAR (parasitic takes it's power from DQ pin) the with a 18B20 just by leaving the other pin unconnected?

mackrackit
- 21st May 2008, 21:47
I knew that...but I figured I might want to clarify just a bit for the O/P...
(Wellton, Az.? I was in the area last week... Relatives in Safford, doing 2M-CCR recertification at DMAFB.)
Yep, the Wellton in Arizona. Surprised you have heard of it. Next time you are down this way give me a yell.

skimask
- 22nd May 2008, 00:04
Yep, the Wellton in Arizona. Surprised you have heard of it. Next time you are down this way give me a yell.
Actually, never did hear of it. Just happened to notice your sig and remembered seeing it on the map.
Next time won't be until around ~Aug '09, only for a week though, going to do a swing around SW USA, might even get up DT's way.

SteveB
- 22nd May 2008, 05:26
... can you directly substitute a DS18B20 - PAR (parasitic takes it's power from DQ pin) the with a 18B20 just by leaving the other pin unconnected?
Not quite clear on which one you plan to substitude for which, so here is the answer either way:

Yes, you can use a DS18B20 to replace a DS18B20-PAR without problems, just connect Pin 3 (Vdd) to your power supply.

No, you can not use a DS18B20-PAR to replace a DS18B20 unless you modify the circuit. The reason is that the PAR version requires a "strong pullup" during temp conversion. Page 3 "Parasite Power", and figure 2, of the DS18B20-PAR data sheet has the details. If the number of PAR units is small, you can (I have) eliminate the MOSFET they suggest and just hook it directly to a pin to drive it, as the total current is well below the 25ma limit of a single PIC pin.

HTH,
SteveB