[SOLVED] Can u help me to convert my C programm to hex code for PIC microcontroler..?????

Status
Not open for further replies.
At least your recent steps remedied the two issues I pointed out.

Now there are new issues.

Please post the contents of MTXV4.INC?

The Assembly Code in written in a relocatable fashion, we'll need to a a linker script.

Find the file 16F628_g.lkr which is found in the LKR subdirectory in the MPASM Suite directory.

Example Location:
C:\Program Files\Microchip\MPASM Suite\LKR

Add it to the project by right click on the Project Window on the Linker Script directory icon and selecting "Add Files..."

Then rebuild the project.

BigDog
 
its the content of mtxv4.inc


- - - Updated - - -

added the 16f628_g.lkr.....but still its not working...got an error message like

- - - Updated - - -

its the print screen images.....

 

Looks like we maybe missing another file. Were there any other files besides the two you've added to the project?

It appears there is a library file missing, I'll need to review the code to determine the exact issue.

At least you are down to a single error:

Error - could not find definition of symbol 'mtx_buffer' in file './enc-044.o'.

BigDog
 
ya..there is one more file......


when i added this to the project..........SUCCEFUL....... we done



...thank u...thank u very much..im not sure abt wheather the code is working or not...but i got the hex file....
 


thank u sir....btw in our first program,thats the servo.c.....there is only two positions are available for the servo motor,but i need a center postion too,,..what change i want to make in that programm for that???
 

I'm not sure I understand your requirements. I've reviewed the code and it appears to be a light tracking routine based on the input of two LDRs to control a servo.

The servo position should be proportionally based on the difference of inputs from the two LDRs with a predefined minimum and maximum servo positions.


BigDog
 

ya,...u r right...i need something like a center position for the servo when the two LDRs are in equal postion....i mean when the resistance from the two LDRs are same....
 

A servo typically has what is referred to as an "Idle Position" which corresponds to a pulse width half way between the minimum and maximum pulse widths.

In your case the minimum is 1ms and the maximum 2ms pulse width with a 20ms cycle period, therefore the "Idle Position" should correspond to be 1.5ms.

BigDog
 

problem with ur mtxv4.inc file
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…