
Originally Posted by
paul borgmeier
Try this
Code:
define lcd_dreg portd
define lcd_dbit 4
define lcd_rsreg portd
define lcd_rsbit 2
define lcd_ereg portd
define lcd_ebit 3
define lcd_bits 4
define lcd_lines 2
main:
low portd.1
lcdout $fe,1, "EMBEDED SYSTEMS pro."
pause 500
if portb.0=0 then l2
pause 500
lcdout $fe,1, "project1"
while portb.0=1
toggle portb.1
pause 200
wend
goto main
l2:
pause 500
lcdout $fe,1, "project2"
while portb.0=1
Toggle portb.1
pause 600
wend
goto main
end
I didn't check the logic ... it should do the same thing you originally coded (except with a few errors fixed like changing your returns to gotos.
Compiled for a 16f877a the codes as listed: 320 words for Ibra's code 309 for Paul's.
Paul I think he is trying to compile using a demo version compiler and has too many lines of code for the demo version to handle.
I have not even looked at the code to attempt to see if it works. I only addressed his complaint of compiler error.
JS
Edit: Looks as if you addressed that problem too, you got it down to 29 lines so his compiler should do it
Good Job! I gotta pay closer attention!
Last edited by Archangel; - 29th April 2007 at 10:01.
Reason: add edit
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.
Bookmarks