sx28 code to sx48 code error
I needed more ram to try to add features to my project and tried programing my sx48 with my sx28 code. I get a code3 exceed avaliable ram. What am I doing wrong...
these are my variables ? works with my sx 28
frequency······· VAR WORD
freqWanted······ VAR WORD
period·········· VAR WORD
periodMSBPlus1·· VAR BYTE
periodCntFrac··· VAR BYTE
optReg·········· VAR BYTE
tempW··········· VAR WORD ' Used by SetFreq, LCDStr, LCDWord
temp············ VAR BYTE ' Used by SetFreq, LCDChar, LCDStr
tempW2·········· VAR WORD ' Used by SetFreq
encoder1········ VAR BYTE
encoder1Last···· VAR BYTE
encoder2········ VAR BYTE
encoder2Last···· VAR BYTE
these are my variables ? works with my sx 28
frequency······· VAR WORD
freqWanted······ VAR WORD
period·········· VAR WORD
periodMSBPlus1·· VAR BYTE
periodCntFrac··· VAR BYTE
optReg·········· VAR BYTE
tempW··········· VAR WORD ' Used by SetFreq, LCDStr, LCDWord
temp············ VAR BYTE ' Used by SetFreq, LCDChar, LCDStr
tempW2·········· VAR WORD ' Used by SetFreq
encoder1········ VAR BYTE
encoder1Last···· VAR BYTE
encoder2········ VAR BYTE
encoder2Last···· VAR BYTE
Comments
<---Bill
Try this, I'm not great at arrays, but I think it will work.
Bill
The extra two ports (RD & RE) are located in the global memory area. So the SX48 has two less bytes of global memory.
In many cases a byte variable can be replaced with BYTE(1) and be stored in the array memory area.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I know what I know, don't confuse me with the facts...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
·frequency······· VAR WORD
freqWanted······ VAR WORD
period·········· VAR WORD
periodMSBPlus1·· VAR BYTE
periodCntFrac··· VAR BYTE
optReg·········· VAR BYTE
tempW··········· VAR WORD ' Used by SetFreq, LCDStr, LCDWord
temp············ VAR BYTE ' Used by SetFreq, LCDChar, LCDStr
tempW2·········· VAR WORD ' Used by SetFreq
encoder········· var byte(4)
encoder1········ VAR ENCODER(0)
encoder1Last···· VAR ENCODER(1)
encoder2········ VAR ENCODER(2)
encoder2Last···· VAR ENCODER(3)
setrun·········· VAR BYTE
·