Editor - Code Explorer - I/O Pin #'s

mlsparky

New Member
Good Morning

I am having trouble understanding the pin #'s on the 20x2 chip.

Attached is a screenprint of my compile, which "seems" to assign
my output variables to random pins.

Example: Why doesn't my output variable C.3 go to pin #7 ?

What am I doing wrong?

Thanks for any help, first compile and first picaxe project.

ML Sparky
 

Attachments

nick12ab

Senior Member
These are 'pin numbers', not 'leg numbers'. When using the PICAXE system, 'pin numbers' refer to the I/O pin (e.g. C.7) and 'leg numbers' are used to refer to the physical pins on the chip.

Also the Code Explorer only displays the raw values of constants so when a pin constant is specified in the code (e.g. C.7) the value (15) will be displayed instead.
 

westaust55

Moderator
@ Mlsparky,

Welcome to the PICAXE forum.


Have a loop at the PICAXE chip pin layouts in PICAXE manual 1 at page 11.
http://www.picaxe.com/docs/picaxe_manual1.pdf

You will see that logical pin C.7 is associated with physical leg 3.
This is the way the 8-bit ports are connected in the Microchip PIC chips used by Rev Ed for the PICAXE chips.

The logical pin designators such as B.0, B.1, etc are in reality pre-defined constants in the Programming Editor software where. For example B.0 = 0, B.2 = 1, … B.7 = 7, C.1 = 8 through C.7 = 15 and even higher values for larger chips with ports A, C and D available
 
Top