All the code works and the test message is displayed on the LCD03.
I have tried to implement the sugguested code but it does not seem to
work. What comes up on LCD03 is not what I have transmitted but the
return value to the PC confirms that the char sent is correct. The
LCD03 shows a funny char that isnt even english.
The issue is that the LCD03 display is picking up data that is
transmitted over the I2C/Serial 5pin Programming thing on the ooPic-
r. For example if I have no program running and I transmit data to
the oopic, the LCD03 picks up stuff being transmitted and displays
char based on the ascii code.
Are there any notes that I can read about how the ooPic-r
transmits/receives data and how the buffer works.
It would also be useful to understand how to convert
decimal/hex/char/byte to string.
Thanks so much for your speedy reply.
I have really been suffering to this to work...
Regards,
Angelo
--- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> --- In oopic@yahoogroups.com, "Angelo" <mowens18@> wrote:
> >
> > Hi Richard,
> >
> > Thanks for your help!
> >
> > I have attempted to use your suggested method about send the data
> > directly to the LCD but this has not worked. The code I used is
as
> > follows:
> > If SP.Received Then
> > LCD03 = SP
> > End If
> >
> > I do not know enough about obuffer and how the serial port
receives
> > data to be able to get it work. I have tried some conbinations
but
> > nothing has worked. Could you assist with some sample code to
help me
> > on my way?
> >
> > Regards,
> > Angelo
>
> I'm lost... How much of the code you posted actually works? Does
the
> string "Test" actually wind up on the LCD?
>
> If you ONLY problem is getting chars from the SP then something
like:
>
> dim ch as byte
> dim i as byte
> dim b as oBuffer20
>
> i = 0 ' buffer index is zero based
> do
> if SP.Received then
> ch = SP.Value 'save the char, we can't come back to SP.Value
> SP.Value = ch 'send it back to the PC so it can be checked
> LCD03 = ch 'send it to the LCD
> b.location = i 'b.location can be automatic (not used)
> b.value = ch ' put in buffer
> i = i+1 ' update pointer
> end if
> loop
>
> I have taken the received char and sent back out the serial port,
sent
> it to the LCD and stuffed it in a buffer. You can choose any or all
> of these options and junk what is unnecessary.
>
> Clearly the buffer will overflow eventually, I don't know why you
> want to buffer the chars but you need to manage it somehow. You can
> use the .Width property to find the highest valid index and, rather
> than setting the pointer to i = i + 1, set it back to zero if it is
> already equal to the .Width value. If you want a circular buffer...
>
> The code above is 'pseudo' code in that it hasn't been checked. It
is
> just for reference.
>
> Richard
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment