Hello. I'm trying to use and understand OWIN properly. I have a DS1922E which stores temperature readings to memory. With an appropriate OWOUT request, the DS1922 will respond with data from an address, then the next byte, then the next until it reaches EndOfPage or until reset. This would result in 32 bytes if a full page were requested. On the 28x1 I have variables b0-b27 "available" and only if I don't plan to use a variable anywhere else at the same time. My current method has been to grab half a page (16 bytes) to variables, then grab the other half to the same variables after I have displayed/stored them as so:
As the memory dump continues until reset (which occurs when the OWIN runs out of variables due to %0010 [Reset Pulse After Data]) I cannot interrupt the process to pass into memory, etc. (I think). Would it be possible to do the following:
If you notice, I have changed from %0010 to %0000 to avoid sending a reset. My concern is the program will not be ready in time and will miss the second byte. Would the incoming OW data be "cached" somewhere on the 28x1 allowing this approach to work correctly?
Another option I considered was to grab fewer bytes at a time to conserve on variable use, though I feel that will impact speed as I will be transmitting a LOT of repeat data to grab the smaller chunks.
Has anyone else dealt with a similar issue? Any suggestions on a variable-friendly way of doing this without killing speed?
Code:
owout 3,%0001,($CC,$69,$00,$10,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF) ' Request Memory starting at $1000
owin 3,%0010,(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15) ' Record result
Code:
for b0 = 1 to 32
owin 3,%0000,(b1) ' Record result
sertxd (b1)
next b0
Another option I considered was to grab fewer bytes at a time to conserve on variable use, though I feel that will impact speed as I will be transmitting a LOT of repeat data to grab the smaller chunks.
Has anyone else dealt with a similar issue? Any suggestions on a variable-friendly way of doing this without killing speed?