> see below
>
> 2010/3/27 Rob Conway <rjcon...@bigpond.com>
>
>>  Oops sorry, I read BNE as branch if negative however on review its Brand
>> Not Equal so sorry for my Q1 below. And I assume AIX was a typo for AIS
>> Could I replace the first couple of lines with CMP.L   RTC, L_USERN.
>>
> no, CMP require immediate operand2, you need to use the stack.
>
>
>
>>
> I would of liked to be able to still turn the output on even if I missed
>> the time when RTC=ON time.  I know this complicates matters however as my
>> light is on for 10-12 hours during the day if I reload the firmware or
>> restart the slave and miss the exact on time the output will not turn on for
>> another day.
>>
> if the chip is reset or powered cycled, RTC will restart to zero and will
> require master attention for RTC reinitialisation.
> You may during init, put an alarmed flag to allows master conditional
> search to know the the device require attention.
> On the master side, monitor alarmed directory to update chip if needed: RTC
> as well as force initial state.
> Alternatively, you may want to put some battery backup circuit.
>
> if you want to calculate an end time based on start time (long) + duration
> (word):
> PUSH.L L_USERN  //start time in the stack
> PUSH.W 0  //hi part of operand 2 is zero
> PUSH.W W_USERL // second part of operand 2
> ADD.L // pop both longs, add them and store resulting long in the stack
> then you may know if end time is reached or not:
> PUSH.L L_RTC
> SUB.L // calculate endduration-RTC
> AIS -4 // free stack
> B... skiplabel //conditional branch depending of last compare (SUB)
>
> hope this clarify...
>
-- 
Pascal
www.brain4home.eu
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to