Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Migration from PIC16f84a to PIC16f648a

Status
Not open for further replies.

fuzzzy

Full Member level 3
Joined
Oct 2, 2004
Messages
156
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,298
Location
ITALY
Activity points
1,650
pic16f628 change pic16f648

Hi,

I've a circuit running with PIC16f84A. I found thata PIC 16f648 is pin to pin compatible with f84a. I'd like to know how should i do to change device.

My PIC has got an external RC oscillator. I'd like to use 16f648's intrnal oscillator.
and i use CCS PCWH compiler to compile program. How should I set FUSES for oscillator to use internal oscillator? now i use:#fuses RC,

are there any other changes to do?

Thanks
 

Turbokeu

Junior Member level 1
Joined
Apr 25, 2005
Messages
16
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,281
Activity points
1,426
bank memory 16f648

1. If using PORTA pins as interfacing I/O, you need to define/set the I/O function for PIC16f628:

CLRF PORTA
MOVLW 0x07 ; turn comparators off and
MOVWF CMCON ; enable pins for I/O functions

2. Always refer to data memory MAP (on Pic datasheet) to ensure that the general purpose register used not out of range when migrate one type of MCU to another type of MCU. As example, general purpose register for:

Pic16f84 : 0x0C to 0x4F (at bank 0).

Pic16f628: 0x20 to 0x7F (at bank 0),
0xA0 to 0xEF (at bank 1),
0x120 to 0x14F (at bank 2).

Pic16f648: 0x20 to 0x7F (at bank 0),
0xA0 to 0xEF (at bank 1),
0x120 to 0x16F (at bank 2).

CD :)
 

fuzzzy

Full Member level 3
Joined
Oct 2, 2004
Messages
156
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,298
Location
ITALY
Activity points
1,650
migration pic16f84 to pic16f628

Hi Turbokeu,

thanks for your advice.

I don't think i've care of memory map. I've got C code of firmware and I'll recompile it for new PIC. so i think my compiler will take care of changes in memory map.

i want to know if i ned to change something in C code or inpreprocessor statements.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top