Pnut arrays GOT SERIAL TERMINAL DATA WORKING THANKS
pilot0315
Posts: 910
anybody
I have been working with gps asynchronous serial. Am able to get data but have difficulties with the arrays. Looked at several forum posts but cannot get a good handle on it.
Found this: https://forums.parallax.com/discussion/169784/pnut-arrays
and https://forums.parallax.com/discussion/167731/smart-pins-for-async-serial-for-p2-v27#latest
Used the tip from @Ariba
Can anyone please point me in a simple direction?
Thanks.
Martin
Attached are two of my crazy attempts.
I have been working with gps asynchronous serial. Am able to get data but have difficulties with the arrays. Looked at several forum posts but cannot get a good handle on it.
Found this: https://forums.parallax.com/discussion/169784/pnut-arrays
and https://forums.parallax.com/discussion/167731/smart-pins-for-async-serial-for-p2-v27#latest
Used the tip from @Ariba
Can anyone please point me in a simple direction?
Thanks.
Martin
Attached are two of my crazy attempts.
Comments
Any Ideas??
At this moment just trying to control the raw data and keep the screen from changing pages.
I will be shortly attempting to filter out two strings then work them into arrays for further processing. Looked all over the forums for examples of arrays in P2 asm and have not found any thing that just covers arrays.
O.K. I will look.
Thanks
Can you explain a bit more in plain english what is happening here please?
-- https://docs.google.com/document/d/1gn6oaT5Ib7CytvlZHacmrSbVBJsD9t_-kmvjd7nUR6o/edit# (P2 docs)
-- https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit#heading=h.tvlmfmnx47dd (Spin2 docs)
-- https://docs.google.com/spreadsheets/d/1_vJk-Ad569UMwgXTKTdfJkHYHpc1rZwxB-DcIiAZNdk/edit#gid=0 (P2 instructions)
The alts instruction alters the S (source -- were we want to read from) field of the next instruction. By adding an index value to the address of (#) the table, you know where you want to read from. The 0-0 in the mov instruction is what some programmers use to indicate that this is self-modifying code -- that's the field that the alts instruction is modifying.
The altd works in a similar manner, but modifies the D (destination -- were we want to write to) field.
The screen cap shows what you're looking for in the P2 docs. It seems pretty straightforward -- but I haven't tested it myself.
That is more clear. I have the docs but some of the explanations are very limited.
Been sifting through the forums to glean more info. @evanh and a few others have a great help.
Thanks for the help. I will work with this today and let you know. Your explanation was pretty good.
Looking for an example of the above code can't find in forums directly. Do you have an example??
I have also been pouring over the p1 versions that I can find and trying them. Too many to count.
Will be working on it today.
Thanks