PIC16F628 to PIC16F84

Status
Not open for further replies.

kasamiko

Member
Hi,
Is it possible to use the program intended for PIC16F628 to PIC16F84? If not what should I change?

If this is the code for PIC16F628:
DEVICE 16F628 ' We are using a PIC16F628 (18PIN SMD)
DECLARE XTAL = 20 ' And a 20MHz crystal
CONFIG HS_OSC , WDT_OFF , PWRTE_ON , BODEN_OFF , LVP_OFF , CP_OFF , MCLRE_OFF

is this correct for 16F84?
DEVICE 16F84A ' We are using a PIC16F84 (18PIN)
DECLARE XTAL = 4 ' And a 4MHz crystal
CONFIG XT_OSC , WDT_OFF , PWRTE_ON , CP_OFF , MCLRE_OFF

How about this:

How should I do it on 16F84A?

Thanks
 
kasamiko said:
DEVICE 16F84A ' We are using a PIC16F84 (18PIN)
DECLARE XTAL = 4 ' And a 4MHz crystal
CONFIG XT_OSC , WDT_OFF , PWRTE_ON , CP_OFF , MCLRE_OFF
16F84 can't turn MCLR OFF !!! Maybe you will have a problem if your design is using RA,5 (which 16F84 doesn't have)

This is what I use:
Code:
	list	p=16F84A
	#include	<p16F84A.inc>
	__CONFIG	_CP_OFF & _WDT_OFF & _PWRTE_ON &_XT_OSC
 
The 16F84 is a far inferior chip (and costs a lot more!), unless the 628 program is only using the chip as an 84 you won't be able to replace it with an 84.

In particular the 628 has three more I/O pins, an internal oscillator, internal comparators, a USART, twice the program memory, more GPR's.

As long as none of those are used it willbe simple to replace with an 84.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…