Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[PIC] Memory reservation in PIC16F877A Microcontroller

Status
Not open for further replies.

STSCBE

Member level 2
Member level 2
Joined
Jul 9, 2016
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
360
Hi,
Im using Pic16f877a microcontroller, im trying to upload my hex file via UART programming. The concept is, befr using the uart programming have to reserve some initial memory for BOOTSTRAP. Top 256 needed for that(0x1F00 to 0x1FFF out of 8KB). After that only user program will occupied.

In MPLAB v8.30, i dont know How to reserve the default program memory program memory?
where im going to allocate?
bootloader-for-16f87x-pic-microcontrollers.gif
 

Hi, this actually doesn't depend on what MPLAB version you are using. It depends on the compiler. Once I made a bootloader for PIC18F4520 in assembly language (MPASM compiler). To put code on specific memory locations in assembly language you need to use "ORG" directive. You should see which equivalent directive your compiler has.

One smart thing to do is when you be done with the bootloader, you can compile it as an object file and include in future projects, so there's no risk to change anything by accident.
 
  • Like
Reactions: STSCBE

    STSCBE

    Points: 2
    Helpful Answer Positive Rating
Microchip doesn't recommend 16F877A for newer designs. They have replaced the chip with 16F887 which is a better chip and I think microchip is going to stop the manufacturing of 16F877A in a few years. 16F877A is costlier compared to 16F887 and many other PIC18F devices. PIC18F devices are far more superior than PIC16Fs. I don't know why people use PIC16F devices when you can get a better 18F chip for the same cost.

Compare the cost and features of 16F877A with 16F46K22 or 18F87K22.
 
  • Like
Reactions: STSCBE

    STSCBE

    Points: 2
    Helpful Answer Positive Rating
In case of MPLAB XC8 compiler, the code relocation is specified by linker options. Review the user manual.
 
  • Like
Reactions: STSCBE

    STSCBE

    Points: 2
    Helpful Answer Positive Rating
Compare the cost and features of 16F877A with 16F46K22 or 18F87K22.

It should be 18F46K22.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top