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.

Thursday, January 24, 2008

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

It's actually simpler than you are making this out to be. Set your I2C
address as they recommend, then divide this by 2 (bit shift right one
place) and this is the .node value. When you are sending data to the
device you would use cv10bit format and the .Location attribute is the
command, so you'd do this:
dev.Mode = cv10bit
dev.Node = <whatever address shifted right one bit>
dev.Location = <command>
dev = <data>

When you are sending a command you would use this:
dev.Mode = cv7bit
dev = <command>

That's it. If you are using an ooPIC R you don' t need to worry about
pull ups on the SCL line - Its already driven. The SDA line should
have a 4.7K pull up on it.

DLC

jasuk1970 wrote:
> --- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
>> --- In oopic@yahoogroups.com, "jasuk1970" <mail@> wrote:
>>
>>> Cheers,
>>>
>>> I am looking at this now. I am trying to work out what Mode it
>>>
>> should
>>
>>> be using.
>>>
>>> An example of the commands it is looking for to get the status is:
>>>
>>> SaaaaaaadAccccccccASaaaaaaadAbbbbbbbbP
>>>
>>> S= start
>>> a= address bit (7 bits + direction)
>>> d= read or write bit
>>> A= acknowledgement from slave
>>> c= command bit (8 bits)
>>> b= First byte of data (8 bits)
>>> P= stop
>>>
>>> If the address is 0x50 then it would look like:
>>>
>>> S01010000 A 11010000 A S01010001 A {Recieve first byte of data}
>>>
>>> I hope it makes sense, Looking at it I am assuming it is cv7Bit.
>>>
>>> Or would I need to do some custom controlling to get this working?
>>>
>>> Thanks for any help,
>>>
>>> Jas
>>>
>> I must be looking at the wrong datasheet because the one I am
>>
> looking
>
>> at doesn't require more than one start condition per transaction
>>
> and
>
>> the transaction can include any number of data bytes.
>>
>> The way I see it is .Mode=cv10bit and .Width=cv8bit. The .Node
>> property addresses the device and the .Location property is really
>> the command. I think...
>>
>> The datasheet is here:
>> http://www.modtronix.com/products/lcd2s/lcd2sr1_v120.pdf pages 11 &
>> 12.
>>
>> There is an LcdRanger.osc file in the Files section that uses at
>> Matrox Orbital display. It uses .Mode=cv7bit.
>>
>> Richard
>>
>>
>
>
> Thanks for that. I was looking at the diagram on page 12 to do with
> getting the status, (The second row of the split diagram showed
> Second Start.
>
> I can always try the different combinations to try and get it working
> correctly. From what i see the address is 7 bit with an 8th bit to
> say weather the command is being sent to the board or requesting
> information from the board. I wasn't really sure how that translated
> into mode etc.
>
> Unfortunatly, before I can test this out, I need to get a special 5
> pin connector for the OOBoard otherwise I will need to resort to
> soldering wires to the connector pins as they are too small for the
> jumper cables I already have.
>
> (I've also got a BasicX Developer station board which I can have a go
> on (Which is what I'm planning to put the screen on for the Alarm
> system I'm working on too).
>
> Thanks for the help.
>
> 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: