Help with non-blocking delay

Thats the conclusion I have come to. I have tried every configuration I could think of too. It would make what I had in mind a bit easier.
 
Thanks
 
Absolutely no way you can have a different non-blocking delay for each bit.  The non-blocking delay applies to the entire value of the variable, not each individual bit.  You have to wait for the delay to expire on one bit before you can do a delay on a different bit.
 
Non-blocking delay only stores the old value of the entire variable, the time stamp of the change, and the new value.  It reverts to the old value after the time stamp plus delay time.
 
CAI is currently considering dropping the non-blocking delay on variables so they can double the number of variables.  The point to take home is that the non-blocking delay reserves a 32 bit memory location for the reverting value.  It doesn't store 32 1 bit numbers, it stores a single 32 bit number.
 
Lou Apo said:
CAI is currently considering dropping the non-blocking delay on variables so they can double the number of variables.
 
I think that would actually be very useful.
I'd also urge the CAI guys (again) to consider unions.
32-bit words are fine, but OFTEN times 16-bit or even 8-bit would be more than enough.
It'd be fantastic to be able to to address  32 * 8-bit var/ram or 16 * 16-bit variables, or a mix. (This is what they do with the PICAXE by the way. b0 and b1 occupy the same register space as w0, b2 and b3 the same space as w1, etc. It takes no more RAM to implement but gives us much easier ways to address and use our data.
 
NON-blocking delay is for each TTL input and each TTL output, as well as each VAR,
If we changed the code to have half TTL I/O and VAR to have non-blocking, and reset not support non-blocking, would that affect how you use WebControl? 
 
Lou Apo said:
Absolutely no way you can have a different non-blocking delay for each bit.  The non-blocking delay applies to the entire value of the variable, not each individual bit.  You have to wait for the delay to expire on one bit before you can do a delay on a different bit.
 
Non-blocking delay only stores the old value of the entire variable, the time stamp of the change, and the new value.  It reverts to the old value after the time stamp plus delay time.
Thanks Lou, you could have offered that little tidbit up in post 44, would have saved me about an hour.
 
CAI_Support said:
NON-blocking delay is for each TTL input and each TTL output, as well as each VAR,
If we changed the code to have half TTL I/O and VAR to have non-blocking, and reset not support non-blocking, would that affect how you use WebControl? 
 
Personally I have 3 boards programmed using non-blocking delays and am working on the 4 board program also using it, with a 5th to follow. I have been attempting to learn and understand bitwise operations but realistically will never grasp it the way you 4 do. So for me if/when I need to replace any existing boards or add more boards I will need the todays current firmware in order to not have to redo any existing programs. But thats just me, you have to do what appeals to the masses.
 
TJF1960 said:
Thanks Lou, you could have offered that little tidbit up in post 44, would have saved me about an hour.
 
I didn't understand that you wanted to have simultaneous non-blocking delay on different bits in the same variable.  You can have different bits running a non-blocking delay one at a time in the same variable.
 
CAI_Support said:
NON-blocking delay is for each TTL input and each TTL output, as well as each VAR,
If we changed the code to have half TTL I/O and VAR to have non-blocking, and reset not support non-blocking, would that affect how you use WebControl? 
 
 
My suggestion would be to use the fact that you now have the bootloader to allow people to download and install the firmware that best suits them.  
 
Options might be
 
1) as it is now, 8 var with non-blocking 
2) 16 var with no non-blocking delay
3) some mix of the two.  Like 2 with non-blocking delay and 12 without.
 
Yeah, I should have realized sooner than I did that the non-blocking delay function was checking the variable and not each bit. It was just hopeful thinking.
 
Thanks.
 
Lou Apo said:
Do you need 1000 possible values for each one (000 to 999)?  For example, if the temp is measuring something that at most goes up and down by 64 degrees, then you only need 6 bits allowing you to store all 8 values on 2 rams (using 24 bits of each).  That still leaves you 7 bits on each of those 2 rams for other uses.
 
Lou, I am interested in what you were suggesting here, I am just now getting around to asking. Where I live we can see temps from the high 20's to 115 or a little more. Currently I get the temp, the remainder is rounded up or down but the way it is now I do use 3 digits of the ram for each temp sensor because of the over 100 degree days. But of course the indoor temps shouldn't ever get past 100, just the outdoor ones.
.
Are you suggesting something like take the current temp excluding the remainder, subtract by say 20 then use the result to webset to the isy which then will add 25 to each to bring me back to the proper temp?
 
TJF1960 said:
Lou, I am interested in what you were suggesting here, I am just now getting around to asking. Where I live we can see temps from the high 20's to 115 or a little more. Currently I get the temp, the remainder is rounded up or down but the way it is now I do use 3 digits of the ram for each temp sensor because of the over 100 degree days. But of course the indoor temps shouldn't ever get past 100, just the outdoor ones.
.
Are you suggesting something like take the current temp excluding the remainder, subtract by say 20 then use the result to webset to the isy which then will add 25 to each to bring me back to the proper temp?
 
Pretty much.  You do this in decimal where you store each temp as 2 digits and shift by 15 or 20 degrees as you said.
 
Also, you could do it using bitwise using 7 bits to give you 128 possible values.  And if some of your temp probes are located where there is very little fluctuation, you could use maybe 4 or 5 bits for a 16 or 32 degree range.
 
Back
Top