The code is full functionaly ! The graphics it's disable... If try to improve the way that "look" the display, it is no more space in memory...I think the solution it's to 'up-grade' to another PIC, with bigger memory !
The code is full functionaly ! The graphics it's disable... If try to improve the way that "look" the display, it is no more space in memory...I think the solution it's to 'up-grade' to another PIC, with bigger memory !
I found out how to add variables to my macro, so now using the include file, you can print any variable to the lcd by using:
@ PrintVar x,y, _anyvariablehere
(instead of loading a specific variable , then using @ PrintVar that I had before). Small change, but I figured it might help someone.
Here is the segment of the macro that is part of the lcd_3310v31 include file (attached).
Code:'@ PrintVar macro function 'format should look like this: @ PrintVar x,y, _anyvariable ASM PrintVar macro x, y, Variable ;input values from: @PrintVar 0,1, _any_variable local OverVar goto OverVar OverVar MOVE?CB x, _PosX ;move x from above statement to PosX MOVE?CB y, _PosY ;move y from above statement to PosY MOVE?WW Variable, _VarData ;move variable in statement to VarData L?CALL _VariableOut ;call VariableOut function endm ENDASM VariableOut: @ bcf _digits for n = 4 to 0 step -1 'cycles through all possible digts of number Gosub Lcd_GotoXY 'place character at position PosX and PosY Lcd_Data = (VarData dig n) + 48 'digit number n to character str format if Lcd_data = 48 and digits = 0 then SkipChar 'skip if first char is 0 @ bsf _digits ;show that one character has been printed gosub Lcd_SendChar 'print char to screen PosX = PosX + 6 'next x position for character SkipChar: next n return
http://www.scalerobotics.com
Hi Sarma,
Certainly well written assembly code should use less space than assembly generated by a high level compiler, it all boils down to cost. If you live where the cost of living is very low and software engineers are paid little, assembly may be the correct path. If you live where everything costs way too much and software engineers start out at $50,000 and go way up from there, it becomes very difficult to recover that cost by saving $0.15 on the wholesale cost of the PIC. One other consideration in both instances, if the engineer uses the high level compiler, the time saved will be used to engineer more products. So IMHO, the way to achieve best overall results is High Level compiler WITH assembly assists, I E . . . Darrels Instant interrupts for example. As for your comments . . . Your comments are welcome here. We all benefit by sharing our Ideas and opinions, and we can keep them after sharing or adopt new ones, I believe it was Albert Einstein who said, " all knowledge is trial and error", which is to say the things you are taught are the result of somebody's mistakes.
Regards,
Joe S.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi to all !
Me again...with one new problem : I write the code attached, for 16F648A, because I want to display some graphics elements (see sus, rand 1, rand 2, rand 3, rand 4, jos) .But when I put the code in Microcode Studio I receive the message "Warn : Test_648.asm 790:[102] code crosses boundary @ 800h". I think the code it's too big; please give me some solution !!! I want that my display having one nice 'looking' and without the parts for graphics elements...What can I do ?
Thanks in advance !
That is just a warning that you are crossing a boundary. All is good. How many bytes does it say you are using the lower left of microcode studio?
http://www.scalerobotics.com
Your code compiles OK (2932 words used). I don't understand what can be wrong with your setup? If you close and restart the MicroCode Studio, would that help? At least sometime that has helped me.
To get rid of "code crosses boundary" goto tool bar:View -> Editor Options...In General sheet, select "Disable 'code crosses boundary' ASM warning.
BR,
-Gusse-
Last edited by Gusse; - 5th May 2009 at 14:59.
The first one is about your config fuse. intrc_osc should be replaced by
This one use the same config fuses as 16F628A & 16F627A. The complete list is in M16F62XA.inc file in pbp\inc folder.Code:INTRC_OSC_NOCLKOUT
The second one is just a warning,
http://picbasic.co.uk/forum/showthread.php?t=555&
Can be bypass within MicroCode Studio.
http://www.picbasic.co.uk/forum/show...66&postcount=2
EDIT: Gusse, that's what happen when few people think the same thing at the same time![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks