Shop OBEX P1 Docs P2 Docs Learn Events
Writing into specific memory addresses? — Parallax Forums

Writing into specific memory addresses?

shiznitzzlershiznitzzler Posts: 1
edited 2008-03-24 13:10 in General Discussion
I have just joined this forum and I've searched the internet a bit in trying to answer the question to my problem, but perhaps the best·place to ask is here. I will be as direct in my explanation as possible. If anyone reading this wishes me to disclose more details, let me know and I will.

I am currently taking a class that requires myself and my classmates to interface Visual Basic and Javelin Stamp. In this interface, data will be sent back and forth serially.

What I want to know is, when I'm sending information from·a PC running Visual Basic,·if there is a way for me to write specific data fields into specific memory addresses on the Javelin Stamp (and, although unrelated, also if there is a way to write specific data into specific memory addresses on a PC using Visual Basic when going from the Javelin Stamp to the PC).

I appreciate any attempt to answer my question.

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-03-24 13:10
    You need to specify a protocol that allows you to do that.
    For example:
    From pc to javelin: startmarker,commandbyte,addressbytes,valuebytes,endmarker
    You need to write javelin code that decodes the received bytes according to
    your protocol and then write the values. There is a CPU.writeSRAM() method
    but you better not use that as it probably destroys the internal javelin
    datastructures. Better to declare a char array of N bytes, so you can write
    to addresses 0 to N-1.
    There is also EEPROM.write() that allows you to write to the unused area of
    the javelin eeprom.
    For javelin to pc you can specify an identical protocol.

    regards peter
Sign In or Register to comment.