Yeah, lots of repeating code there...
For starters, move the LCDOUT commands to a subroutine.
Unless you're running HSEROUT at 150baud or something you can most likely remove the PAUSE 5 after...
Are you repeating the same code 30 times since the messages differ? Then, possibly, you could be facing this issue as strings gobble up memory pretty fast.
topline: 'top line updater sub
ofs=pos*16 'modify position offset
for x=0 to 15
i2cread sda, scl, adr, x+ofs, [y] 'write from eeprom
tline[x]=y 'write into...
Published on - 31st May 2010 18:38
Number of Views: 12838
It's almost Olympics time... so here's a topical program using PBP exclusively (no embedded Assembler) to give you a Stop-Watch with 1/100th Second Timing (yes that's 0.01 of a Second) and gives you REAL-TIME display on your LCD. Now you can do your own timing and challenge the official time...
The program demonstrates using TMR1 in BACKGROUND (multi-tasking), uses PICBasic Interrupts, and accounts for the fact that PICBasic doesn't respond to those Interrupts immediately. There's also a set-Up CALIBRATION menu item, so you can adjust and calibrate your timer to an accuracy of 360mS per Hour.
How does it do all that? Better download the PDF and find out...
Melanie
PS. Questions and Comments post on this forum/thread. No off-list mail please.
Re: memory full
Yeah, lots of repeating code there...
HenrikOlsson Today, 07:21For starters, move the LCDOUT commands to a subroutine.
Unless you're running HSEROUT at 150baud or something you can most likely remove the PAUSE 5 after...