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.

PIC16877 question about converting to Hex file

Status
Not open for further replies.

olympus123456

New Member
I am a beginner and I want to convert the following program to HEX file and then send it to PIC16F877 . Please can anyone guide and help.
 

Attachments

  • PIC Code.txt
    6.4 KB · Views: 456
Last edited:
Try to learn CCS C compiler or MPLab compiler...This can convert the source code to Hex code. It will give you the complete idea....
 

Attachments

  • my1.asm
    6.4 KB · Views: 209
Downloaded MPLAB

I have MPLAB IDE 8.30 and also i got the PICKIT2 . Could u please guide how to compile it in MPLAB, if you could give me the steps for proceeding further, that will be very much appreciated. Thank you for fixing my errors . Please help me further toooo.


hi,
The program listing is full of errors, lots of typo's.!

Ive tidied up the program, removed the errors and it now assembles

As suggested goto: Microchip Technology Inc. - a Leading Provider of Microcontroller and Analog Semiconductors and download the MPLAB IDE V8.0
 
I have used MPASMWIN , from the MPLAB software i downloaded to convert to HEX file. It is giving me errors :

Error in parameter "and" , "documents and settings"

basically its not reading the source file from my desktop. What should i do to fix it ?
 
I have used MPASMWIN , from the MPLAB software i downloaded to convert to HEX file. It is giving me errors :

Error in parameter "and" , "documents and settings"

basically its not reading the source file from my desktop. What should i do to fix it ?

hi,
I have noticed that MPLAB struggles with long file addresses.

Create a newfolder on the 'C' Hard Drive, call it say MyAsm1 and move the asm file from the desktop to that folder.

Also use the MPLAB Project/Project Wizard,, when doing that point the Wizard to MyAsm1 folder and you should be OK.:)
 
I did as u said eric , so it created three files one of 1Kb , other of 23 Kb and one has extension .mcs
The problem is there is no hex file found but i could see asm code when i open the 23 kb file as the source file

Also i right clicked the my1.asm file and assemble in the project , and it said "build succeeded " . And there are three new files in the folder that i created .err , .LST, and .o files

How do i proceed from here now.
 
Last edited:
I did as u said eric , so it created three files one of 1Kb , other of 23 Kb and one has extension .mcs
The problem is there is no hex file found but i could see asm code when i open the 23 kb file as the source file

Also i right clicked the my1.asm file and assemble in the project , and it said "build succeeded " . And there are three new files in the folder that i created .err , .LST, and .o files

How do i proceed from here now.

hi,
By using the 'Build ALL ' option and getting a build succeed you should have a *.hex file.?
To check use 'View'/ Program Memory the hex file should be displayed.
 
Yes, it is displaying when i went to program memory. Its a relieve though after sooo much of writing the code and you fixing it. Really , patience is the key.

Okay good news got ittttt. Hex file is there. Now, how do i send it to the PIC, I have bought PICKIT2.
 
Last edited:
Yes, it is displaying when i went to program memory. Its a relieve though after sooo much of writing the code and you fixing it. Really , patience is the key.

Okay good news got ittttt. Hex file is there. Now, how do i send it to the PIC, I have bought PICKIT2.

hi,
Select the PICKIT2 programmer from thr MPLAB Programmer/'select programmer'
also ensure that 'RELEASE' is displayed near the top menu not debug.

Now you are on your own, I dont use that version of programmer,, good luck.:)
 
Last edited:
It is a graduation project . It measures the temperature using NTC, ECG using op-amps , Heart beat rate sensor, Saline sensor, Card attendance system . All this in PIC and should be displayed in the computer using RS-232 cable and using front end Visual Basic Interface
(which i have no knowledge of) .
Basically its tooo much of hard work , i need to find photoelectric sensors, and learn VB too. and also serial cabling . yup i have no clue .
 
It is a graduation project . It measures the temperature using NTC, ECG using op-amps , Heart beat rate sensor, Saline sensor, Card attendance system . All this in PIC and should be displayed in the computer using RS-232 cable and using front end Visual Basic Interface
(which i have no knowledge of) .
Basically its tooo much of hard work , i need to find photoelectric sensors, and learn VB too. and also serial cabling . yup i have no clue .

Thanks,

A word of warning ref the program, the Oshonsoft simulator reported that the UART in the PIC had not been initialised.:rolleyes:

There are many freebie PC RS232 text display programs on the web.
 
ok, how come, i think i had initialized it. How do i fix it. I was told to use 9 pin female rs-232. Does this fix the problem

could u also tell me any names of such programs or links of them.
 
Last edited:
Last edited:
I really appreciate u man. i m sorry if i made u feel angry . i m sorry . but u can understand rite , if u work hard and it doesnt pay offf . it hurts a lot . sorry , yes i will add this part to my code , but shuld i add it the top or end.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top