Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 24th November 2004, 04:21 AM   (permalink)
Default need help with code ,mplab giving errors

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
Attached Files
File Type: txt picclock.txt (13.9 KB, 50 views)
prosound90 is offline  
Old 24th November 2004, 06:05 AM   (permalink)
Default

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
csaba911 is offline  
Old 24th November 2004, 11:09 AM   (permalink)
Default

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
prosound90 is offline  
Old 24th November 2004, 02:53 PM   (permalink)
Default

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
csaba911 is offline  
Old 24th November 2004, 11:05 PM   (permalink)
Default

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
prosound90 is offline  
Old 25th November 2004, 06:00 AM   (permalink)
Default

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
csaba911 is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:42 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker