Has anyone figured out how to conduct a simple parity check with the 18M2 part. Easy with X2 parts becuase they have the NOB - Number Of Bits command.
I have my MSF receiver getting and displaying time, but I'm trying to stop it updating a DS1307 RTC when there are reception errors. If the on-board RTC time is different from received time, I want to update the on-board RTC (e.g. clock drift). To do that, I've applied basic checks and the only thing left to do is use the received parity bit, broadcast a number of seconds later with parity as ODD. e.g. Mins = $07 then parity bit = 0 if Mins = $06 then parity bit = 1
The task is to check received 'Mins' formated as BCD (XX,40,20,10,8,4,2,1) against a received parity bit, then if correct (parity = ODD) update the on-board RTC.
If the picaxe basic allowed access to an overflow bit after a shift << or >> it would make it easier. Attempts so-far have used a loop (8 times for each bit) and AND each bit, counting the result but it's cumbersome.
Any ideas?
I have my MSF receiver getting and displaying time, but I'm trying to stop it updating a DS1307 RTC when there are reception errors. If the on-board RTC time is different from received time, I want to update the on-board RTC (e.g. clock drift). To do that, I've applied basic checks and the only thing left to do is use the received parity bit, broadcast a number of seconds later with parity as ODD. e.g. Mins = $07 then parity bit = 0 if Mins = $06 then parity bit = 1
The task is to check received 'Mins' formated as BCD (XX,40,20,10,8,4,2,1) against a received parity bit, then if correct (parity = ODD) update the on-board RTC.
If the picaxe basic allowed access to an overflow bit after a shift << or >> it would make it easier. Attempts so-far have used a loop (8 times for each bit) and AND each bit, counting the result but it's cumbersome.
Any ideas?