
Originally Posted by
Alexey
SERIN PORTB.3,T2400,4000,CLR,[85],VAR,VAR,VAR,VAR,VAR,VAR,VAR,VAR,VAR,VAR
Skipping 9 bytes cost me 45 words of memory which is near 9% of what I have totally
Hi Alexey,
This program compiles to 124 words with a 16HV540.
Code:
INCLUDE "modedefs.bas"
RX VAR PORTB.3
B0 VAR BYTE
SERIN RX, T2400,[85]
This one is 154 words.
Code:
INCLUDE "modedefs.bas"
RX VAR PORTB.3
B0 VAR BYTE
SERIN RX, T2400,[85],B0,B0,B0,B0,B0,B0,B0,B0,B0,B0
But this one using DEBUGIN is only 75 words.
Code:
DEFINE DEBUGIN_REG PORTB ' Debugin pin port
DEFINE DEBUGIN_BIT 3 ' Debugin pin bit
DEFINE DEBUGIN_MODE 0 ' Debugin mode: 0 = True, 1 = Inverted
DEFINE DEBUG_BAUD 2400 ' Debug baud rate
B0 VAR BYTE
MyData VAR BYTE
DEBUGIN [WAIT(85)] ' wait for 85
FOR B0 = 1 TO 9
DEBUGIN [MyDATA] ' skip 9 bytes
NEXT B0
DEBUGIN [MyDATA] ' get the desired byte
IF only I had a 16HV540 to test it on.
Bookmarks