Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Read binary file with mplab

Status
Not open for further replies.
Hi, I already start my project which is related to micro-controller and the first problem is how to read binary file with mplab building language (c language) I try this code but its not took effect plz help me

#include<p18f452.h>
#include<stdio.h>
FILE *e;
void main (void){
e=fopen("c:\nine.bin", "rb");
}
 
There is no file systems built in to the compiler.

"c:\nine.bin", "rb") refers to a file on your hard drive.... What exactly are you trying to do?

ie.. Have you a program file that you want to load onto the chip?
 
There is no file systems built in to the compiler.

"c:\nine.bin", "rb") refers to a file on your hard drive.... What exactly are you trying to do?

ie.. Have you a program file that you want to load onto the chip?

thanx Ian for reply, I try to read binary file as a first step then insert it to EEPROM memory to deal with its data but I think this is not proper way what's ur opinion?
 
If you want to place data "into" the small eeprom on a pic chip MPALB expects you to have a ".xch" file (basically a text file ).. when you open the "eeprom view" you can right click in the window on the first data location and import this file.... Other than that painstakingly write all you values in.
 
Status
Not open for further replies.

Latest threads

Back
Top