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.

need help with code ,mplab giving errors

Status
Not open for further replies.

prosound90

New Member
hi

can someone tell me please this code is for what assambler
microchip assambler giving a lot of errors and i noticed some instructions

are not listed in the PIC instructions. like

movlf 00000000b, porta



thank you
 

Attachments

  • picclock.txt
    13.9 KB · Views: 204
Change all line's 00000000b to b'00000000' this format.
b'xxxxxxxx'

I hope you'll get it !

movlf is a MACRO like many other in this CODE.

by typing movlf .100, portb MPLAB translate it to this
Code:
MOVLF	macro	LITERAL, FILE
	movlw	LITERAL
	movwf	FILE
	ENDM


Have fun.

STEVE
 
thanks for replaying

so if the mplab rcognize MACRO why it dose'nt want to assamble this code,by other words why i have to change lines,

Q: is this code written for a diffrent assambler ???

thank you
 
Ok
I have not tryed before, yes it hase 257 error, uless you dissable the case sensivity !!
In one of the line hase a typo ! "incf waitcounterincf" change to "incf waitcounter"
Change "INCLUDE c:\progra~1\mplab\p16F628.inc" line to what ever is need to be !
End missing from the end !

All work good if you fixit up !

extract this to any folder and open it w/MPLAB IDE

Thermometer.mcw

Good Luck

STEVE
 
thanks steve

i did all that before i see your replay,the file assambled fine and ,

i thank you for your help.

i just can't understand why the binary were backward or you think the guy who wrote the code wanted it this way or the file got missed up some how.


iam not planing on using the whol program i want to convert the display to 4 led displys and have the display ulternate between time and tempreture every 3 sec, and iam using 16F877.



thanks one more time
 
My atachment did not go thru :cry:

Any way 8)

I like to have all the diferent type of nunbers, instructions, comment's higligted with diferent colour !
MPLAB did assemblle the code on both way "0000000b", "b'0000000'
but only highlited in "b'0000000' mode, I gues you can use it on both way.

STEVE
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top