633 and 1-wire

vedula7

New member
Hello,

I am trying to read and write to a DS2423 RAM using the 633. Did anyone try it earlier? I am able to read and write the device information using command 18 but not able to read and write to the RAM. The DOW transaction number 20 gives me correct acknowledgement but not the result (data) I am looking for. Any help is appreciated.

Vedula
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
Did you follow the example in the appendix of the 633 data sheet?

That example shows writing andreading from a device (an ADC in that case).
 

vedula7

New member
Yes.. I looked at the example (A/D converter) in the datasheet. The example only reads data from the chip. I am actually able to read data from the chip in my case too. But when I write to the memory it is not getting through. So was wondering if someone used it earlier, or if someone could verify if the support for 1-wire has improved over the different versions.

Vedula
 

CF Tech

Administrator
The example shows writing to the ADC's control registers. Is writing to the memory somehow different?
 

CF Tech

Administrator
Can you show me your code? Are you using 633_WinTest, or did you write your own application?

I assume the CFA-633 detects it OK and returns it in its table of devices?
 

vedula7

New member
I wrote my own application (on linux).
I also tried it on Wintest but I get the same result. Asuming that you are aware of the DS2423 command set.. here is my code. It is commented too.

lcdpacket p; // this the standard lcd packet structrure
p.command = 20;
p.datalen = 16;
p.data[0] = '\000'; // device index 0
p.data[1] = '\000'; // 0 means write
p.data[2] = '\017'; // write scratchpad command 0x0F
p.data[3] = '\000'; // first byte of address 0x0000
p.data[4] = '\000'; // second byte of address 0x0000
// Now data begins
for(i=0;i<11;i++)
p.data[i+5] = 'A';
p.crc.crcvalue = get_crc((ubyte*)&p, p.datalen+2,0xFFFF);

ret = sendPacket(fileid, p);
sleep(1);
ret = readpacket(&p, fileid);
// Now send read scratchpad command

ret = readDOWregisters(fileid, &ta1,&ta2, &es);
printf("ta1 = %s , ta2 = %s , es = %s \n",ta1,ta2,es);

At this point I should get the addresses of the registers set during the write command. But I am getting 0xFF for all. The readDOWregisters function is correct because I checked it with 633_Wintest and get the same result.

Vedula
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

tinhead

New member
I belive I might have found an (not neccesary 'The') error:

'\017' should translate into 0x11 and not 0x0F

p.data[2] = '\017'; // write scratchpad command 0x0F


This is probably not the critical error, anyhow I hope you fix it! :)
 
Last edited:
Top