Hi all,
I now have a new class and we are using OneWireAPI.net and C sharp to program applications for reading and writing 1-wire devices.
But when I preparing for the classes I got a little problem.
How do I read or write to a device that has no prepared container? (hat I mean is OneWireContainer10 for temp)
This LCD driver has familycode FF and has no prepared container.
How can I send 08h to this device and turn the backlight on?
Has anyone an idea how to do this?
/Martin
Sending codes with OneWireAPI.net
Sending codes with OneWireAPI.net
If you read this: http://pdfserv.maxim-ic.com/en/an/AN155.pdf can you then copy and modify an existing container/class?
The code for gaining control of the bus, identifying and selecting your device will be the same and you can check the data-sheet for your device to see how to read/write to it.
I think http://www.owfs.net has something for Windows too.
Cheers, Steve
The code for gaining control of the bus, identifying and selecting your device will be the same and you can check the data-sheet for your device to see how to read/write to it.
I think http://www.owfs.net has something for Windows too.
Cheers, Steve
Sending codes with OneWireAPI.net
I have seen this but I have to get my students to be able to code their own in C sharp (C#) and to help them I really must be able to handle it myself
After reading the PDF I suppose I can do like this:
adapter.select(IDasLong); // where IDasLong is the ID for the LCD controller
Now should it be the selected device on the network.
But how can I send the hex code "08h" to it to turn the backlight on?
Proberbly to tired or to stupid right now but I can't get it to work
/Martin

After reading the PDF I suppose I can do like this:
adapter.select(IDasLong); // where IDasLong is the ID for the LCD controller
Now should it be the selected device on the network.
But how can I send the hex code "08h" to it to turn the backlight on?
Proberbly to tired or to stupid right now but I can't get it to work
/Martin
Sending codes with OneWireAPI.net
This looks like the datasheet for the LCD... http://www.louisswart.co.za/1-wire_lcd_100.pdf
The code in AN155.pdf example 2 looks close, but if the adapter.select() has selected (MATCH ROM) the device then all you need to do is to get the bus master to transmit a 0x08. putByte() looks as though it will do that.
If you haven't selected the device first and it's the ONLY 1-wire device on the bus you don't need to enumerate all the devices and can send a 0xcc first to SKIP ROM matching.
Cheers, Steve
The code in AN155.pdf example 2 looks close, but if the adapter.select() has selected (MATCH ROM) the device then all you need to do is to get the bus master to transmit a 0x08. putByte() looks as though it will do that.
If you haven't selected the device first and it's the ONLY 1-wire device on the bus you don't need to enumerate all the devices and can send a 0xcc first to SKIP ROM matching.
Cheers, Steve
Sending codes with OneWireAPI.net
Thank you Steve,
that did the trick
all I do knoy is
adapter.select(IDasLong);
adapter.putByte(0x08);
to turn the backlight on
nce again thank you
/MArtin
that did the trick
all I do knoy is
adapter.select(IDasLong);
adapter.putByte(0x08);
to turn the backlight on
nce again thank you
/MArtin