NOT Pins

PeteUK

New Member
Hi all,
This is my first post. I am retired and have just started loooking at Picaxe
with a view to reducing the chip count on my model railway signal system.
(many cmos & TTL chips) I don't have any picaxe chips but I am working with
the editor using a 20M. I found by accident that " b1 = NOT pins" works in
the editor as I had expected but I can't find it in the documentation.
Does anyone know if it works on the chip.

I have read a lot of old posts and they have helped me a lot.
Thanks to all of you.

Pete
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

Yes, "b1 = NOT pins", will work on a PICAXE and has slipped through being documented.

It is a bit-wise inversion equivalent in this case to "b1 = pins ^ $FFFF".

In general NOT will do as expected and required but care needs to be taken with things such as "w1 = NOT b0" where the internal 16 bit accumulator will be loaded with 8 bits of b0 as lsb's and the msb's cleared, the NOT will then invert all 16 bits, leaving the msb's set.

Likewise 'b0 = NOT pin0'; b0 will end up with a value $FF or $FE.
 
Last edited:

PeteUK

New Member
Thanks for the info.
This is useful as all my inputs are active low.
I will get some actual chips when I'm sure I have enough brain power left
to make it do what I want.

Pete
 
Top