Shop OBEX P1 Docs P2 Docs Learn Events
Want to find a way to convert RX'd Bytes into a DATA statement so they can be R — Parallax Forums

Want to find a way to convert RX'd Bytes into a DATA statement so they can be R

T&E EngineerT&E Engineer Posts: 1,396
edited 2007-04-09 02:07 in General Discussion
I have been able to TX and RX Bytes between an SX28 and an SX52. Ultimately what I would like to do is TX DS1302 Byte data from a SX28 and RX it to a SX52 that drives a 16x16 LED matrix. I would do it all in 1 SX52 but I have there would not be enough Variable space no mater how hard I tried to cut back. I have been able to send (TX) and receive (RX) bytes and test it to verify that they are communicating together. So no problem with this aspect of TXing and RXing.

The SX28 controls a DS1302 Real Time Clock to an LCD and it works correctly (thanks to JDOhio). I want to TX (not to an LCD) but to a SX52 so that the bytes can be displayed on my 16x16 LED matrix. I have already worked out (with great help from JonnyMac) the display routines on the SX52. I can display scrolling messages on the 16x16 LED matrix with out much problem now. However, the scrolling routine used was taken from the RobOlympics code which uses a DATA statement to scroll messages (but NOT individual Bytes being RX'd in).

I want to know if there is a way to take the RX'd Bytes in and save them back into a DATA statement or something so that the routine can scroll the DATA statement messages (as the Data statement is being READ into a variable called "DataChr"). What also if the RX'd bytes could be appended together into "DataChr". Would this have the same effect as a DATA and READ statement?

I need to think about this some more but if anyone has any ideas, Please feel free to comment.

Thanks!

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-02 02:37
    Buffer (store)·your "DATA" into RAM (VARiables.)
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-02 03:04
    I'm not quite clear on what you are saying. Can you provide an example?

    Will storing the RX Bytes as variables allow them to be READ·from a DATA statement?
  • JonnyMacJonnyMac Posts: 8,941
    edited 2007-04-02 03:33
    There is no way to change DATA statements except by reprogramming the SX chip (DATA is in flash, not EEPROM like with the Basic Stamp, and the SX's flash is not writable during program execution). If DATA statements could be modified then SX/B would include a WRITE instruction.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-02 10:19
    OK. What about GET and PUT statements? I thought that DATA statement contents are stored so that they could be accessed by a GET statement perhaps. I don't know. I just wanted to know if there was an easy way to do this. If not, that's ok too. I will·have to find another way to do this. I thank you all.
  • JonnyMacJonnyMac Posts: 8,941
    edited 2007-04-02 14:14
    GET and PUT work with RAM (it says so in the help file) so they do not work with DATA statements which are store in flash (program memory space which is read only -- and stated in the help file). The only way to get values from a DATA statement is with READ. The Inkjet demo program is written in SX/B (original version by me) and uses a big character buffer that gets converted into bitmapped fonts that are stored in DATA statements -- you might consider studying it.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-02 14:17
    OK. I will do that. Thanks for the clarification.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-09 02:07
    This thread can now be closed too. I solved the issues and the end project is in the completed projects section.
Sign In or Register to comment.