mplab combined .asm with .c

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: mplab combined .asm with .c

Postby ABSF » Wed Jan 04, 2012 11:41 am

pingubrow2 WROTE:First of all thx for posting.
Secondly yes both of them the .asm and .c works together , I have done the lcd with assembly because I tried with the microchip xlcd.h libary and it didn't work or I was doing the program wrong but when I was doing the lcd with c language I had some problems such as some commands weren't working and so on. If it isn't possible to combined the assembly and c to have one file works can some one show me what I am doing wrong with the lcd using c.

Someone said how I did the lcd with assembly here I am posting my lcd using assembly.
On my next post I will posting the program with c and please some one tell me what I am doing wrong ty all.


Besides displaying the string "THE TEMPERATURE IS: C" on the LCD in 4 Bit mode, what else does it do?

I am sorry to say that your asm program is not very efficient. Luckily you are only displaying a short string. What happens if the string is 100 characters long? You didn't INCLUDE the file "P18F4455.INC" in your program and you also forgot to define the variables in the beginning of your program like TEMPRY, TIMER1, COUNT1 etc. Anyway did you get your program assembled successfully or you just purposely left out those?

Please show us your C version of the LCD program and let the C programmers to correct the mistakes for you.... :mrgreen:

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: mplab combined .asm with .c

Postby robosang » Wed Jan 04, 2012 5:09 pm

As stated by Brian and Allen, normally C project include assembly because of timing sensitive routines. But in your case, it is not at all.

Trying to figure out the method will bring you to Holland :mrgreen: , of course is good because you learn a lot, but it will take you much more time.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Previous

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 18 guests