MEL PICBASIC Forum - Competition rules

• ### Recent Forum Posts

#### Re: Doing something at predefined amount of steps?

No, 200-300=65436.
65435 is -101 in two's complement because 65435+101 = 65536 which, when being truncated to 16 bits is 0.

If what you want is the difference between the two numbers while not...

HenrikOlsson Yesterday, 23:01

#### Re: Doing something at predefined amount of steps?

Thanks Henrik, so Say A=200 B=300, C in this case will be 65535-100=65435, right? So if I take 65535 and minus it result, I should receive correct difference between A and B, right?

CuriousOne Yesterday, 18:46

#### Re: Doing something at predefined amount of steps?

towlerg Yesterday, 18:13

#### Re: Doing something at predefined amount of steps?

It will wrap around, 0-1=65535 provided the variable where the result is stored is a WORD.

HenrikOlsson Yesterday, 17:23

#### Re: Doing something at predefined amount of steps?

Oh and by the way, currently I don't have access to machine with PBP, what will happen if C=A-B and B is > A ? all variables are word length. I need to determine difference between A and B, but...

CuriousOne Yesterday, 16:56

#### Re: Doing something at predefined amount of steps?

Yes, I meant exactly that one.

In my case, there will be 16F886 running at 8mhz and maximum frequency will be around 2khz, so I guess, modulo variant will also work. Will assemble test circuit...

CuriousOne Yesterday, 16:54

#### Re: Doing something at predefined amount of steps?

Wasn’t it just something like this?
not even timing of course because every fifth iteration takes slightly longer to execute, but could be balanced up if it mattered.

variable var word...

Art Yesterday, 15:30

#### Re: Doing something at predefined amount of steps?

I don't know for sure but since it involves division my guess is that this is slower. Speed isn't always everything though.

Tell you what, why don't you try both ways and measure the difference,...

HenrikOlsson Yesterday, 15:01

#### Re: Doing something at predefined amount of steps?

Thanks! this is way better and simpler. Speaking speed-wise, will this be faster in execution than my code with additional variable?

CuriousOne Yesterday, 14:42

#### Re: Newbie Manchester Coding question

Duh, yup, that was it [slapping forehead].

Cheers,

Troy

rocket_troy Yesterday, 14:22
• # General Competition rules

Competitions are subject to the privacy policy and website terms and conditions of picbasic.co.uk, owned and controlled by Crownhill Associates Limited (“Crownhill”).
The following rules shall apply, together with any instructions or rules specific to any current competition. By entering any of the community run competitions, you are deemed to have accepted the following:
• Competitions are open to all picbasic.co.uk website users, except for the associated Administrators, Moderators, Crownhill and associated company employees and their relatives, and anyone professionally connected with the prize offered in any competition. Crownhill reserves the right to verify the eligibility of all entrants.
• By taking part in the competition, you warrant that all information submitted is true, current and complete at the time of submission. It is your sole responsibility to ensure that your details and e-mail address are accurate, and that competition adjudicator is informed of any changes to these. No responsibility will be accepted for any changes which are not properly notified from the time of submission of your entry to the time of notification that the prize has been awarded.
• All entries must be free of copyright and patent restrictions. All entries must bear a declaration that they are subject to COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
• By entering the competition, you assign , to Crownhill, absolutely the right to publish and feature your entry on the picbasic.co.uk website, under the relevant community managed section
• The Moderators reserve the right to disqualify your entry if it is incomplete or if there are reasonable grounds to believe that you have breached any of these rules.
• Prizes are non-transferable and there are no cash alternatives.
• The moderators reserve the right to substitute prizes of equal or greater value at any time.
• All taxes, insurances, transfers and other expenses resulting from the prize are the sole responsibility of the winner unless otherwise stated.
• Failure to claim a prize within the time or in the manner specified may result in disqualification and the selection of an alternative winner.
• The moderators reserve the right to alter, amend or close the competition as necessary.
• In the case of any disputes regarding these rules, or the rules or instructions of a specific competition, the decision of the adjudicator will be final and binding, and no correspondence will be entered into
• Community competitions are not run by or controlled by Crownhill Associates Limited, its directors or employees.
• Neither Crownhill nor the Promoters or any of the Moderators or any of Crownhill's employees, directors, partners, members, trustees, beneficiaries, agents, consultants, sub-contractors, sponsors, affiliates, holding or subsidiary companies accept any liability, to the fullest extent allowed in law, whatsoever for:
• Any oversight, ambiguity, error or omission, whether negligent or otherwise, which may have been committed in the course of running the competition and the awarding of the prize(s).
• Circumstances beyond their control, such as disruptions in communication systems and internet connectivity or viruses or any other corruption of any delivery system. This list is not exhaustive and shall extend to any other condition or incident that may cause any potential entrant in the competition not being able to enter
• Lost, late, delayed, misdirected, unintelligible on incomplete entries
Full liability and risk passes to the winner of the competition on delivery or use of the prize, whichever date occurs first.

The competition and these rules are governed by English Law.