Extract data from DAT block for display and control
Hi
I am very new to Propeller and seek some help.
I am including a small portion of a program which is supposed to extract data from a Dat block and display it on a LCD.
Data gets displayed by not what is wanted.
I have included notes in my request for assistance but in short I aim to index the dat array and display that string of data.
I need some guidance on the extraction format and how to construct the output string.
Peter
{This is pastings from my main program which basically looks at a set of conditions configured from
input pins and routines, makes a selection based on those conditions , and from the two routines Upset and Dwnset
selects the correct data string from the DAT field for display and control of processes.
I am unsure of the correct method to extract the fields from DAT for display and control}
PUB DisplayWrite(itemno)
LCD.cleardisplay
waitcnt(clkfreq/100 + cnt)
LCD.outSTR(string("test this line")) ' This line displays ok
]LCD.outstr(???????????????????) ' what line of code is required in place of ?? to
'take a line of text from the data field indexed by (itemno) and displayed
'as the second line in a two line display.
Pub Upset ' up routine
If index => 1 and index < 8
index ++
else
index := 8
displaywrite(index)
Pub Dwnset 'down routine
If index =< 8 and index > 1
index --
else
index := 1
displaywrite(index)
Dat
textA byte "??????????" , ........"?????" ' this is display data
contdat byte (%10101010), .........(%01010101) 'this is control signal data
'I am unsure of the format in the area ??? to be able to
' index the strings out referenced by the index set in UPSET and Dwnset
I am very new to Propeller and seek some help.
I am including a small portion of a program which is supposed to extract data from a Dat block and display it on a LCD.
Data gets displayed by not what is wanted.
I have included notes in my request for assistance but in short I aim to index the dat array and display that string of data.
I need some guidance on the extraction format and how to construct the output string.
Peter
{This is pastings from my main program which basically looks at a set of conditions configured from
input pins and routines, makes a selection based on those conditions , and from the two routines Upset and Dwnset
selects the correct data string from the DAT field for display and control of processes.
I am unsure of the correct method to extract the fields from DAT for display and control}
PUB DisplayWrite(itemno)
LCD.cleardisplay
waitcnt(clkfreq/100 + cnt)
LCD.outSTR(string("test this line")) ' This line displays ok
]LCD.outstr(???????????????????) ' what line of code is required in place of ?? to
'take a line of text from the data field indexed by (itemno) and displayed
'as the second line in a two line display.
Pub Upset ' up routine
If index => 1 and index < 8
index ++
else
index := 8
displaywrite(index)
Pub Dwnset 'down routine
If index =< 8 and index > 1
index --
else
index := 1
displaywrite(index)
Dat
textA byte "??????????" , ........"?????" ' this is display data
contdat byte (%10101010), .........(%01010101) 'this is control signal data
'I am unsure of the format in the area ??? to be able to
' index the strings out referenced by the index set in UPSET and Dwnset

Comments
LCD.outSTR(string("test this line")) ' This line displays okTherefore...
It easier to help if you post all your code including the objects or at least the name of the object code. A bunch of ????? is confusing. Explain what you expect the code to do and the actual result.