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.

problem programing pic16f84A

Status
Not open for further replies.

swh

New Member
Hi every body.
I am samuel.
I have two codes writeen in asembly and c. The problem is how to transfer both of this codes together into the microcontroller.One more thing also, is there a problem if I replace the PIC16F84 by PIC16F84A.
thank you for you help.
 
Do these 2 programs have anything to do with each other? what is the relationship between the 2 ? ...

Strange id to put 2 seperate programs into one pic, more info would be nice.
 
problem programing pic16f84

The two codes written in assembly and in c are suppoed to work together the same job. First the assembly reads a frequency calculate the level changes from 5 to 0. After that the cod written in c compares this levels with the stored ones and drives leds acording to the value of the comparison.
 
hat is easier if you copy the asm code and paste to c code between

#asm

#endasm

compile the c code again and program for your pic.

if you want to use #include <file> you have to write the c code in form of .h file. That is no a file to run. I don't know how to explain in English. But well, you can try my solution upthere.
 
If i do so will the assembly language be executed first?
 
Jou place the #asm directives at the place where the asm should be executed.

For example, you make a function Call_Asm() and in that function you put your asm code using the directive, then the asm code will be called every time you call your Call_Asm() funtion
 
I get what you mean.But for me it would be easy if there is a way to call the c inside the assembly.
And by the way is there any proboblem if i replace pic16f84 with pic16f84A
the programs were written for pic16f84A.
 
swh said:
And by the way is there any proboblem if i replace pic16f84 with pic16f84A
the programs were written for pic16f84A.

It makes no difference, the A version of the 16F84 is simply a later silicon revision, and not a FLASH chip like many of the newer A varients.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top