This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Monday, January 28, 2008

Re: [oopic] Re: NC2004A LCD Screen with Modtronix LCD2S daughter board

DOH! I forgot about that one. Good catch.

DLC

jasuk1970 wrote:
> --- In oopic@yahoogroups.com, "jasuk1970" <mail@...> wrote:
>
>> --- In oopic@yahoogroups.com, "rtstofer" <rstofer@> wrote:
>>
>>> --- In oopic@yahoogroups.com, "jasuk1970" <mail@> wrote:
>>>
>>>> Thanks for pointing out the obvious :)
>>>>
>>>> I looked at the I2C write example and it said 0x28 switches
>>>>
>>> backlight
>>>
>>>> off (Figure 11), And it's actually 0x20!
>>>>
>>>> Wehoo it's working :)
>>>>
>>>> Well sort of, I think it's my programming skills lacking now :)
>>>>
>>>> Dim screen As oI2C
>>>> Dim text As New oBuffer(20)
>>>> Dim lp As Byte
>>>>
>>>> Sub Main()
>>>> screen.Node = 0x28 ' 0x50 divided by 2
>>>> screen.Mode = cv7Bit
>>>> screen = 0x20 ' Backlight On
>>>> Call CLS()
>>>> text.VString="Hello World! "
>>>> DisplayText()
>>>>
>>>> End Sub
>>>>
>>>> Sub DisplayText()
>>>> screen.Mode = cv7Bit
>>>> screen = 0x80 ' Send string
>>>> For lp = 0 To 19
>>>> text.Location = lp
>>>> screen = text.Value
>>>> Next lp
>>>> End Sub
>>>>
>>>> Sub CLS()
>>>> screen.Mode = cv7Bit
>>>> screen = 0x8c
>>>> End Sub
>>>>
>>>> Sub BackLightOff()
>>>> screen.Mode = cv7Bit
>>>> screen = 0x28
>>>> End Sub
>>>>
>>>> The screen clears but I cannot get any text to appear.
>>>>
>>>> I think it is I don't understand the IC2 stuff just yet.
>>>>
>>>> Thanks for any help.
>>>>
>>>> Cheers,
>>>>
>>>> Jas
>>>>
>>>>
>>> Setting the mode is only required once.
>>> Why not try simple text without parsing?
>>> Parsing is unlikely to work in any event because you are not
>>>
>> sending
>>
>>> a string. It will, at best, apply to the first character.
>>>
>>> I don't see a .string property for the oI2C object in the V6
>>> documentaton. It DID exist in V5.
>>>
>>> So, we could write things like:
>>> screen.string = "Hello World!"
>>>
>>> Unfortunately, V6 won't accept it!
>>>
>>> Richard
>>>
>>>
>> Thanks for the reply,
>>
>> I've tried without the 0x80 and the same thing happens, the screen
>> switches off. (No flash of the first character like it did with the
>> previous one)
>>
>> I've also tried using the .String = with OOPic 5, but this causes
>>
> the
>
>> back light brightness to flicker and then the screen switches off
>> again.
>>
>> Cheers,
>>
>> Jas
>>
>>
>
> Fixed :) It was simple really. I re-read the docs for oI2C and
> realised I need the screen.NoInc = cvTrue. The command was changing
> on each character. Time to start on a library of commands for the
> screen. Thanks to everyone who helped.
>
> Dim screen As oI2C
> Dim text As New oBuffer(20)
> Dim lp As Byte
>
> Sub Main()
> screen.Node = 0x28 ' 0x50 divided by 2
> screen.Mode = cv7Bit
> screen.NoInc = cvTrue
> screen = 0x20 ' Backlight On
> Call CLS()
> text.VString="Hello World! "
> DisplayText()
>
> Do
>
> Loop
>
> End Sub
>
> Sub DisplayText()
> screen.Mode = cv10Bit
> screen.Location = 0x80 ' Send string
> For lp = 0 To 19
> text.Location = lp
> screen = text.Value
> Next lp
> End Sub
>
> Sub CLS()
> screen.Mode = cv7Bit
> screen = 0x8c
> End Sub
>
> Sub BackLightOff()
> screen.Mode = cv7Bit
> screen = 0x28
> End Sub
>
> Cheers,
>
> Jas
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------


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:

http://docs.yahoo.com/info/terms/

No comments: