pin numbers - confusing

olden

Member
i put my 08M proto board together and tried to make out the pins on the chip. Lucky I did because I thought that the numbering was straight forward i.e. the 08M I would count, from top left 1,2,3,4, then the other side from bottom to top 5,6,7,8. When I read the instructions I noticed that the connecting pins were not what I thought. It was printed to the out side of the chip starting top left and going anti-clockwise (pin) 1 - +V, (pin) 2 - Serial in, (pin) 3 - Pin4, (pin) 4 - Pin3, and the other side from bottom to top (pin) 5 - Pin2, (pin) 6 - Pin1, (pin) 7 - Pim0/Serial out, (pin) 8 - pin0V.
I nearly put the wire connections in the wrong place, I've got it sorted - I thought. On looking through 'picaxe' book and any other areas that showed the pins (like the picaxe 08) 1 to 4 one side and 5 to 8 on the other. I thought myself 'is this wrong', most likely its not so it brought back my confusion. Where do I find out a fool proof way of getting it right?
 

212

Senior Member
Man your eyes must be a lot better than mine, I can't read a thing on the chip...

Look in manual 1 page 19 :)
 

moxhamj

New Member
It is almost worth printing out that picture from the manual 1, page 19, cutting it out and sticking it on your protoboard or the front of the PC. Pic chips don't follow usual pin conventions - usually if you held a digital chip horizontally with the notch to the left, the ground would be on the bottom right and the power supply on the top left.

The picaxe naming conventions seem arbitrary at first. One good reason for the system is that you can compile a program for an 08, 08M or a 14M and download it to any of these chips and if you have a a 14pin socket you can put any of the chips in the socket and it will still work. This means that generic boards can be designed and the actual choice of the chip left till later. Am hoping that the 20M follows the same convention...
 

Dippy

Moderator
Olden: "Where do I find out a fool proof way of getting it right?"
- read the Data Sheet associated with the chip. Or have I been going wrong all these years??
 

hippy

Ex-Staff (retired)
The simple rule for all DIL ( Dual In-Line ) chips is that leg numbers run anti-clockwise, with the notch at top or dimple at top left, the top left leg is leg 1 running down that side, then across and up the other side.

The PICAXE ( and other microcontrollers ) add to the complexity because they refer to "pins" which do not always follow any logical sequence. These "pins" are software controlled entitites which are different to "legs".

Unfortunately the hardware industry calls "legs" of chips "pins" so there's a degree of confusion as to what people may be talking about and it all depends on context.

The recommendation here is to refer to the physical legs as "legs", the software controlled pins as "pins", and, a reminder to others, a PICAXE is a "PICAXE", not a "PIC".

As Dippy says, the only way to work out which "pin" is on which "leg" is to read the documentation or datasheet.
 

manuka

Senior Member
Olden - largely as a result of just this confusion,I've long insisted all intro. PICAXE projects under my wing MUST also be clearly labelled before they pass muster. I hence STRONGLY recommend you do the same, either with my labels (or similar) => www.picaxe.orcon.net.nz or Rev.Ed's stickies. Quite aside from pin numbering issues,I've even had raw students confuse 555s,741s & logic chips etc as PICAXEs, with resultant inefficiency & occasional destruction...

I don't care how many times I say this, but solderless approaches (as shown below) greatly ease almost all this initial PICAXE pain & confusion, & additionally they BOOST LEARNERS CONFIDENCE ENORMOUSLY while taking the load off the instructor. I've had pre & early teen kids, many of whom can hardly hold a screwdriver,whip up WORKING breadboarded PICAXE circuits in the lunch break while the teacher recovers his wits in the staffroom. Here in NZ anyway,soldered approaches would mean TOTAL supervision was needed under stringent Health & Safety regulations. I've been in places where kids of this age are prohibited from using ANY tools, even pliers etc, unless a supervisor is present. Even kicking a ball around outside practically needs a risk management SWOT assessment.

Stan
 

Attachments

Last edited:

westaust55

Moderator
As one who has been using IC's for 40 years (but new to PICAXE), I agree with Hippy:
the hardware industry calls "legs" of chips "pins" so there's a degree of confusion as to what people may be talking about and it all depends on context.​

Looking at PICAXE manuals and the microchip datasheets, they all user the industry convention with pin 1 to left of the indent or notch and all pins counted anticlockwise.
As Hippy says, the confusion, if any, may come from PICAXE's reference to pins which are single bits of an I/O port.
For example, people must recognise that OUT4 is not in general going to be pin 4. We must look at the pinout details in the manuals/datasheets and work from those as Dippy indicates.

There are in prior posts to this thread with references to reading the Manual 1 page 19.
For the current manual as downloadable from the PICAXE website, this should read Manual 1 page 6 (covers all PICAXE models) and pages 22 to 29 depending on which chip is being used.

Datasheets for a couple of the microchip PIC devices are:
8 pin PIC http://ww1.microchip.com/downloads/en/DeviceDoc/41211D_.pdf
40pin PIC http://ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf

Note that PICAXE as a company pre-programs these PIC's with an interpreter program to read out BASIC programs and assigns specific functions to specific pins on each chip. The pre-programmed PIC become the PICAXE chips we use (08, 08M, 28X, 40X1 etc) that are referred to on this forum.
 

Dippy

Moderator
Quite right WA, hippy and me.

However, without wishing to sound too fussy, I would suggest that total Newbies to PICAXE do NOT start looking at PIC datasheets regarding pin descriptions. Or else we'll get "But the Microchip Data Sheet says Pin so-and-so is an I/O and my PICAXE is different..."

For all other electrical spec I'd say PLEASE read the DAta Sheet!

I would also suggest that anyone using CAD that they generate specific component schematic devices/blocks just for PICAXE devices, labelling the pins as per the Rev-Ed pinout descriptions from the Rev-Ed Data Sheets i.e. think of them as completely different devices to bare PICs.

And, please, for ics keep to the 'pin' convention.
Pin-out and Leg-over.

Bottom line: Get your PICAXE in front of you and printout the PINOUT from the Rev-Ed Data sheet.

:) Congrats to Stan for getting breadboard images (must stop calling them pics) in the thread. I agree with him 99%. My only issue is the number of times I've seen beadboard related queries where Newbies can't wire up the 2 component download circuit. So breadboard plus breadboard download adaptor is where I would go with that one, or buy the cheapest Rev-Ed project board (to get the download ball rolling) and ribbon out to breadboard.
 

olden

Member
Olden: "Where do I find out a fool proof way of getting it right?"
- read the Data Sheet associated with the chip. Or have I been going wrong all these years??
Sorry Dippy I sometimes I find it hard committing on paper exactly what I mean. I read the information sheet that came with the chip and that pointed out to me an earlier mistake. This I was pleased with as it was part of learning and my confusion removed. It only came back when browsing other chips and noticed the difference in there layout. At least I find that my learning curve has brought me to the level of being confused about the same things as the experts are. Comforting in a strange sort of way. http://www.picaxeforum.co.uk/images/smilies/smile.gif
:)
 

olden

Member
Thanks everybody, I'm glad to be confused with good company. Hard to learn these days, but I'm a masochist and I will go on learninghttp://www.picaxeforum.co.uk/images/icons/icon14.gif
Thumbs up
 

olden

Member
Olden - largely as a result of just this confusion,I've long insisted all intro. PICAXE projects under my wing MUST also be clearly labelled before they pass muster. I hence STRONGLY recommend you do the same, either with my labels (or similar) => www.picaxe.orcon.net.nz or Rev.Ed's stickies. Quite aside from pin numbering issues,I've even had raw students confuse 555s,741s & logic chips etc as PICAXEs, with resultant inefficiency & occasional destruction...

I don't care how many times I say this, but solderless approaches (as shown below) greatly ease almost all this initial PICAXE pain & confusion, & additionally they BOOST LEARNERS CONFIDENCE ENORMOUSLY while taking the load off the instructor. I've had pre & early teen kids, many of whom can hardly hold a screwdriver,whip up WORKING breadboarded PICAXE circuits in the lunch break while the teacher recovers his wits in the staffroom. Here in NZ anyway,soldered approaches would mean TOTAL supervision was needed under stringent Health & Safety regulations. I've been in places where kids of this age are prohibited from using ANY tools, even pliers etc, unless a supervisor is present. Even kicking a ball around outside practically needs a risk management SWOT assessment.

Stan
Well Stan, I agree with you with health & safety its idea was good when it came but has completely gone the other way but I tend to put that down to the lawyers.
I have my 'Protobloc' board which is very handy to try before final soldering. As only being able to use one hand I have a soldering paste which I have to keep in the fridge. When I do use it I have to wait an hour for it to reach room temperature before I can solder. I'm converted.;)
 
Top