BS2p RAM with I2C messaging
Dinesh-
The BS2p also has 128 bytes of "scratch pad" ram which can be used
to store and retrieve data with GET and PUT statements. These bytes
can be used indirectly by the I2COUT statement by first moving them
into variables which can then be I2COUT arguments.
In addition, you can embed any constants directly in your I2COUT
statement without using any variable space. Depends on what you're
sending. An example of your output would help to give you a better
answer.
Regards,
Steve
On 23 Sep 02 at 18:12, dineshus2002 wrote:
> Hi,
>
> I understand that the BS2p Stamp has 32 bytes of RAM. I'm running a
> program on it wherein I send 38 I2COUT messages to a particular
> device. I would also like to incorporate more features into the
> stamp, but I'm afraid that I'll run out of RAM space...
The BS2p also has 128 bytes of "scratch pad" ram which can be used
to store and retrieve data with GET and PUT statements. These bytes
can be used indirectly by the I2COUT statement by first moving them
into variables which can then be I2COUT arguments.
In addition, you can embed any constants directly in your I2COUT
statement without using any variable space. Depends on what you're
sending. An example of your output would help to give you a better
answer.
Regards,
Steve
On 23 Sep 02 at 18:12, dineshus2002 wrote:
> Hi,
>
> I understand that the BS2p Stamp has 32 bytes of RAM. I'm running a
> program on it wherein I send 38 I2COUT messages to a particular
> device. I would also like to incorporate more features into the
> stamp, but I'm afraid that I'll run out of RAM space...
Comments
I understand that the BS2p Stamp has 32 bytes of RAM. I'm running a
program on it wherein I send 38 I2COUT messages to a particular
device. I would also like to incorporate more features into the
stamp, but I'm afraid that I'll run out of RAM space.
Could anyone tell me if how much RAM of the stamp I'm using by
sending out these 38 I2C messages?
Thanks
Dinesh
needed. A pointer variable and placeholder is all you'd need -- just a
couple of bytes and some code to pull things together. Pretty easy, really.
-- Jon Williams
-- Parallax
In a message dated 9/23/02 1:13:35 PM Central Daylight Time,
dineshus2002@y... writes:
> Hi,
>
> I understand that the BS2p Stamp has 32 bytes of RAM. I'm running a
> program on it wherein I send 38 I2COUT messages to a particular
> device. I would also like to incorporate more features into the
> stamp, but I'm afraid that I'll run out of RAM space.
>
> Could anyone tell me if how much RAM of the stamp I'm using by
> sending out these 38 I2C messages?
>
> Thanks
>
[noparse][[/noparse]Non-text portions of this message have been removed]
Thanks for your email. The data sheet of the BS2p says that there are
6 bytes for I/0 and 26 for variables.
What exactly is meant by 6 bytes for I/O?
Thanks
--- In basicstamps@y..., jonwms@a... wrote:
> You could store your "messages" in EEPROM DATA statements and send
them as
> needed. A pointer variable and placeholder is all you'd need --
just a
> couple of bytes and some code to pull things together. Pretty
easy, really.
>
> -- Jon Williams
> -- Parallax
>
> In a message dated 9/23/02 1:13:35 PM Central Daylight Time,
> dineshus2002@y... writes:
>
>
> > Hi,
> >
> > I understand that the BS2p Stamp has 32 bytes of RAM. I'm running
a
> > program on it wherein I send 38 I2COUT messages to a particular
> > device. I would also like to incorporate more features into the
> > stamp, but I'm afraid that I'll run out of RAM space.
> >
> > Could anyone tell me if how much RAM of the stamp I'm using by
> > sending out these 38 I2C messages?
> >
> > Thanks
> >
>
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
changing them easy. Since there are 16 pins (two bytes), those six bytes are
used like this:
* Data direction registers
-- Dirs (16 bits) == DirL/DirH (8 bits) == DirA/DirB/DirC/DirD (4 bits)
== Dir0 .. Dir15 (1 bit)
* Output registers
-- Outs (16 bits) == OutL/OutH (8 bits) == OutA/OutB/OutC/OutD (4 bits)
== Out0 .. Out15 (1 bit)
* Input registers
-- Ins (16 bits) == InL/InH (8 bits) == InA/InB/In/InD (4 bits) == In0 ..
In15 (1 bit)
The manual has a good explenation of variable allocation and usage.
-- Jon Williams
-- Parallax
In a message dated 9/23/02 1:51:59 PM Central Daylight Time,
dineshus2002@y... writes:
> Hi Jon,
>
> Thanks for your email. The data sheet of the BS2p says that there are
> 6 bytes for I/0 and 26 for variables.
>
> What exactly is meant by 6 bytes for I/O?
>
>
[noparse][[/noparse]Non-text portions of this message have been removed]