Discussion:
custom character API
dean blackketter
2002-01-15 01:47:02 UTC
Permalink
Good. Let's see how it works.
We can't send the bitmaps with every display update because it's a total
of 8 * (2 * 16 + 8 * 16) = 1280 bytes. That's almost the maximum packet
length, so it won't leave engough room for two full lines of text
afterward. However, a gratuitous update of just the bitmaps every couple
of seconds wouldn't be a bad idea.
Hm? Wouldn't it be 64 bytes of data (8 per character * 8 characters)?
I kept flunking finger painting so I never got to take first grade math.
Change the sixteens to twos - I figured it in bits instead of bytes. Don't
forget the overhead for identifying each byte of data as commands/characters.
Since you wouldn't have to set the CG RAM address for each character, I
2 bytes set the CG RAM address to zero
2 set increment / no shift mode
16 * 8 sixteen bytes, eight characters
_______
132 bytes
So never mind, it's not that much data.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Do you need to encrypt all your online transactions? Find
the perfect solution in this FREE Guide from VeriSign.
http://us.click.yahoo.com/vCuuSA/UdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sean Adams
2002-01-15 01:13:50 UTC
Permalink
We can't send the bitmaps with every display update because it's a total
of 8 * (2 * 16 + 8 * 16) = 1280 bytes. That's almost the maximum packet
length, so it won't leave engough room for two full lines of text
afterward. However, a gratuitous update of just the bitmaps every couple
of seconds wouldn't be a bad idea.
Hm? Wouldn't it be 64 bytes of data (8 per character * 8 characters)?
I kept flunking finger painting so I never got to take first grade math.

Change the sixteens to twos - I figured it in bits instead of bytes. Don't
forget the overhead for identifying each byte of data as commands/characters.

Since you wouldn't have to set the CG RAM address for each character, I
think the right numbers are:

2 bytes set the CG RAM address to zero
2 set increment / no shift mode
16 * 8 sixteen bytes, eight characters
_______
132 bytes

So never mind, it's not that much data.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!
http://us.click.yahoo.com/WoOlbB/7.PDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2003-02-22 13:10:31 UTC
Permalink
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [slimp3-dev] custom character
API</title></head><body> <div>Good.&nbsp; Let's see how it works.</div> <div><br></div> <div><br></div> <blockquote type="cite" cite>&gt; Sean Adams wrote:<br>
&gt; &gt; We can't send the bitmaps with every display update because
it's a total<br>
&gt; &gt; of 8 * (2 * 16 + 8 * 16) = 1280 bytes. That's almost the
maximum packet<br>
&gt; &gt; length, so it won't leave engough room for two full lines of
text<br>
&gt; &gt; afterward. However, a gratuitous update of just the bitmaps
every couple<br>
&gt; &gt; of seconds wouldn't be a bad idea.<br>
&gt;<br>
&gt; Hm? Wouldn't it be 64 bytes of data (8 per character * 8
characters)?<br>
<br>
I kept flunking finger painting so I never got to take first grade
math.<br>
<br>
Change the sixteens to twos - I figured it in bits instead of bytes.
Don't<br>
forget the overhead for identifying each byte of data as
commands/characters.<br>
<br>
Since you wouldn't have to set the CG RAM address for each character,
I<br>
think the right numbers are:<br>
<br>
2&nbsp; bytes&nbsp;&nbsp; set the CG RAM address to zero<br>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set increment
/ no shift mode<br>
16 * 8&nbsp;&nbsp;&nbsp;&nbsp; sixteen bytes, eight characters<br>
_______<br>
132 bytes<br>
<br>
So never mind, it's not that much data.<br>
<br>
<br>
<br>
------------------------ Yahoo! Groups Sponsor
---------------------~--&gt;<br>
Tiny Wireless Camera under $80!<br>
Order Now! FREE VCR Commander!<br>
Click Here - Only 1 Day Left!<br>
http://us.click.yahoo.com/WoOlbB/7.PDAA/ySSFAA/rIp0lB/TM<br>
---------------------------------------------------------------------<span </span>~-&gt;<br>
<br>
To unsubscribe from this group, send an email to:<br>
slimp3-dev-unsubscribe-***@public.gmane.org<br>
<br>
&nbsp;<br>
<br>
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ </blockquote>
<div><br></div>
</body>
</html>
Jacob Potter
2002-01-15 00:53:41 UTC
Permalink
We can't send the bitmaps with every display update because it's a total
of 8 * (2 * 16 + 8 * 16) = 1280 bytes. That's almost the maximum packet
length, so it won't leave engough room for two full lines of text
afterward. However, a gratuitous update of just the bitmaps every couple
of seconds wouldn't be a bad idea.
Hm? Wouldn't it be 64 bytes of data (8 per character * 8 characters)?

- Jacob
--
"Terminak #3 has bad keyboard. Pkease fix."

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Secure all your Web servers now - with a proven 5-part
strategy. The FREE Server Security Guide shows you how.
http://us.click.yahoo.com/uCuuSA/VdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sean Adams
2002-01-15 00:50:35 UTC
Permalink
SliMP3::VFD::setCustomChar($client, $CUSTOMCHAR2, $BOLDEXCLAMATION);
$line1 = "hi mom" . $CUSTOMCHAR2;
SliMP3::Animation::showBriefly($client, $line1, $line2);
How's that sound?
Okay, how about a slight tweak:

$customCharRef_N = SliMP3::VFD::setCustomChar($client, $BOLDEXCLAMATION);
$line1 = "hi mom" . $customCharRef_N;
SliMP3::Animation::showBriefly($client, $line1, $line2);

This encapsulates the business of keeping track of which custom characters
are being used by whom. The values returned by setCustomChar are opaque
tokens which are good for the lifetime of the process. This way, the VFD
module can ensure that characters which are not currently being used can
be replaced, then restored later when/if they're needed again.

We can't send the bitmaps with every display update because it's a total
of 8 * (2 * 16 + 8 * 16) = 1280 bytes. That's almost the maximum packet
length, so it won't leave engough room for two full lines of text
afterward. However, a gratuitous update of just the bitmaps every couple
of seconds wouldn't be a bad idea.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Secure all your Web servers now - with a proven 5-part
strategy. The FREE Server Security Guide shows you how.
http://us.click.yahoo.com/uCuuSA/VdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2002-01-15 00:04:36 UTC
Permalink
This is great.

I'd prefer to reset the custom characters with every display update,
if at all possible, just to make sure it works across power cycles.
Of course, we can optimize this if there's a performance hit. How
many bytes does it take to update the custom characters?

An API that makes sense for me would be used like this:

SliMP3::VFD::setCustomChar($client, $CUSTOMCHAR2, $BOLDEXCLAMATION);

$line1 = "hi mom" . $CUSTOMCHAR2;

SliMP3::Animation::showBriefly($client, $line1, $line2);

Then at the VDF level the substitution would happen.

How's that sound?

-dean
I cobbled together a little routine to test the character generator - it
works fine, but I want to come up with a clean API. I can think of two
possibilities.
One approach is to let the user explicitly set any of the eight custom
characters, and then use them just like any other character. The interface
# Set the character ar $charIndex (0 to 7) to $bitmap
# On the next vfdSend(), any newly defined custom characters will be sent
# to the display.
#
setCustomChar ($charIndex, $bitmap);
A better way, I think, is for the VFD.pm module to keep track of all the
custom characters, and the user would just pass the entire character as a
bitmap to vfdSend(). If vfdSend determines that the requested character is
not currently loaded in the display, then it will replace the least
recently used character with the new bitmap. This way, the user doesn't
need to keep track of which characters have been loaded into the display,
and we'd make the most efficient use of the character RAM.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!
http://us.click.yahoo.com/WoOlbB/7.PDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sean Adams
2002-01-14 23:21:40 UTC
Permalink
I cobbled together a little routine to test the character generator - it
works fine, but I want to come up with a clean API. I can think of two
possibilities.

One approach is to let the user explicitly set any of the eight custom
characters, and then use them just like any other character. The interface
would be something like:

# Set the character ar $charIndex (0 to 7) to $bitmap
# On the next vfdSend(), any newly defined custom characters will be sent
# to the display.
#
setCustomChar ($charIndex, $bitmap);

A better way, I think, is for the VFD.pm module to keep track of all the
custom characters, and the user would just pass the entire character as a
bitmap to vfdSend(). If vfdSend determines that the requested character is
not currently loaded in the display, then it will replace the least
recently used character with the new bitmap. This way, the user doesn't
need to keep track of which characters have been loaded into the display,
and we'd make the most efficient use of the character RAM.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
When building an e-commerce site, you want to start with a
secure foundation. Learn how with VeriSign's FREE Guide.
http://us.click.yahoo.com/oCuuSA/XdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2003-02-22 13:10:41 UTC
Permalink
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [slimp3-dev] custom character
API</title></head><body>
<div>This is great.</div>
<div><br></div>
<div>I'd prefer to reset the custom characters with every display
update, if at all possible, just to make sure it works across power
cycles.&nbsp; Of course, we can optimize this if there's a performance
hit.&nbsp; How many bytes does it take to update the custom
characters?</div>
<div><br></div>
<div>An API that makes sense for me would be used like this:</div>
<div><br></div>
<div>SliMP3::VFD::setCustomChar($client, $CUSTOMCHAR2,
$BOLDEXCLAMATION);</div>
<div><br></div>
<div>$line1 = &quot;hi mom&quot; . $CUSTOMCHAR2;</div>
<div><br></div>
<div>SliMP3::Animation::showBriefly($client, $line1, $line2);</div>
<div><br></div>
<div>Then at the VDF level the substitution would happen.</div>
<div><br></div>
<div>How's that sound?</div>
<div><br></div>
<div>-dean</div>
<div><br></div>
<blockquote type="cite" cite>I cobbled together a little routine to
test the character generator - it<br>
works fine, but I want to come up with a clean API. I can think of
two<br>
possibilities.<br>
<br>
One approach is to let the user explicitly set any of the eight
custom<br>
characters, and then use them just like any other character. The
interface<br>
would be something like:<br>
<br>
# Set the character ar $charIndex (0 to 7) to $bitmap<br>
# On the next vfdSend(), any newly defined custom characters will be
sent<br>
# to the display.<br>
#<br>
setCustomChar ($charIndex, $bitmap);<br>
<br>
A better way, I think, is for the VFD.pm module to keep track of all
the<br>
custom characters, and the user would just pass the entire character
as a<br>
bitmap to vfdSend(). If vfdSend determines that the requested
character is<br>
not currently loaded in the display, then it will replace the
least<br>
recently used character with the new bitmap. This way, the user
doesn't<br>
need to keep track of which characters have been loaded into the
display,<br>
and we'd make the most efficient use of the character RAM.<br>
<br>
<br>
------------------------ Yahoo! Groups Sponsor
---------------------~--&gt;<br>
Sponsored by VeriSign - The Value of Trust<br>
When building an e-commerce site, you want to start with a<br>
secure foundation. Learn how with VeriSign's FREE Guide.<br>
http://us.click.yahoo.com/oCuuSA/XdiDAA/yigFAA/rIp0lB/TM<br>
---------------------------------------------------------------------<span </span>~-&gt;<br>
<br>
To unsubscribe from this group, send an email to:<br>
slimp3-dev-unsubscribe-***@public.gmane.org</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ </blockquote>
<div><br></div>
</body>
</html>

Continue reading on narkive:
Loading...