PICAXE Input Pin Types

hippy

Technical Support
Staff member
TTL ( Vsupply > 4.5V )

Vih : >= 2.0V
Vil : <= 0.8V

TTL ( Vsupply <= 4.5V )

Vih : >= 0.25 * Vsupply + 0.8V
Vil : <= 0.15 * Vsupply

Schmitt Trigger (ST)

Vih : >= 0.8 * Vsupply ( >= 4V @ 5V )
Vil : <= 0.2 * Vsupply ( <= 1V @ 5V )

Note that the above are all levels at which the input pin will read low or high, not the switching point at which an input pin will switch from reading low to high or vice-versa.


PICAXE-08 ( 12F629 )

Serial In TTL

In 1 TTL
In 2 ST
In 3 TTL
In 4 TTL

Vsupply = 2.2V to 5.5V ( 4MHz )


PICAXE-08M ( 12F683 )

Serial In TTL

In 1 TTL
In 2 ST
In 3 TTL
In 4 TTL

Vsupply = 2.0V to 5.5V ( 4MHz, 8MHz )


PICAXE-08M2

Serial In TTL

C.1 TTL
C.2 ST
C.3 TTL
C.4 TTL
C.5 TTL

Vsupply = 2.3V to 5.5V ( 4MHz, 8MHz, 16MHz )
Vsupply = 2.5V to 5.5V ( 32MHz )


PICAXE-14M ( 16F684 )

Serial In TTL

In 0 TTL
In 1 TTL
In 2 TTL
In 3 TTL
In 4 TTL

Vsupply = 2.0V to 5.5V ( 4MHz, 8MHz )


PICAXE-14M2 ( Preliminary Information )

Serial In TTL

B.0 Output - C.0 TTL/ST - Configurable by 'inputtype'
B.1 TTL/ST - C.1 TTL/ST
B.2 TTL/ST - C.2 TTL/ST
B.3 TTL/ST - C.3 TTL/ST
B.4 TTL/ST - C.4 TTL/ST
B.5 TTL/ST

Vsupply = 1.8V to 5.5V ( 4MHz, 8MHz, 16MHz )
Vsupply = 2.5V to 5.5V ( 32MHz )


PICAXE-18 ( 16F627A )

Serial In ST

In 0 ST
In 1 ST
In 2 ST
In 6 ST
In 7 ST

Vsupply = 3.0V to 5.5V ( 4MHz )


PICAXE-18A / PICAXE-18M ( 16F819 )

Serial In ST

In 0 TTL
In 1 TTL
In 2 TTL
In 6 ST
In 7 ST

Vsupply = 4.0V to 5.5V ( 4MHz, 8MHz )


PICAXE-18M2 ( Preliminary Information )

Serial In TTL

B.0 TTL - C.0 TTL
B.1 TTL - C.1 TTL
B.2 TTL - C.2 TTL
B.3 TTL
B.4 TTL - C.4 TTL
B.5 TTL - C.5 TTL
B.6 TTL - C.6 TTL
B.7 TTL - C.7 TTL

Vsupply = 1.8V to 5.5V ( 4MHz, 8MHz, 16MHz )
Vsupply = 2.3V to 5.5V ( 32MHz )


PICAXE-18X ( 16F88 )

Serial In ST

In 0 TTL
In 1 TTL
In 2 TTL
In 6 ST
In 7 ST

Vsupply = 4.0V to 5.5V ( 4MHz, 8MHz )


PICAXE-20M ( 16F677 )

Serial In TTL

In 0 TTL
In 1 ST
In 2 ST
In 3 ST
In 4 ST
In 5 ST
In 6 TTL
In 7 TTL

Vsupply = 2.0V to 5.5V ( 4MHz, 8MHz )


PICAXE-20M2 ( Preliminary Information )

Serial In TTL

B.0 TTL/ST - C.0 TTL/ST - Configurable by 'inputtype'
B.1 TTL/ST - C.1 TTL/ST
B.2 TTL/ST - C.2 TTL/ST
B.3 TTL/ST - C.3 TTL/ST
B.4 TTL/ST - C.4 TTL/ST
B.5 TTL/ST - C.5 TTL/ST
B.6 TTL/ST - C.6 TTL/ST
B.7 TTL/ST - C.7 TTL/ST

Vsupply = 1.8V to 5.5V ( 4MHz, 8MHz, 16MHz )
Vsupply = 2.5V to 5.5V ( 32MHz )


PICAXE-20X2 ( 18F14K22 )

Serial In TTL

C.0 TTL - B.0 TTL - A.0 TTL
C.1 ST - B.1 TTL
C.2 ST - B.2 ST
C.3 ST - B.3 ST
C.4 ST - B.4 ST
C.5 ST - B.5 TTL
C.6 TTL - B.6 TTL
C.7 TTL - B.7 TTL

Vsupply = 1.8V to 3.6V ( DC to 20MHz )
Vsupply = 2.7V to 5.5V ( DC to 64MHz )


PICAXE-28 / PICAXE-28A ( 16F872 )

Serial In ST

In 0 ST
In 1 ST
In 2 ST
In 3 ST
In 4 ST
In 5 ST
In 6 ST
In 7 ST

Vsupply = 4.0V to 5.5V ( DC to 20MHz )


PICAXE-28X ( 16F873A )

Serial In ST

In 0 ST - PortA 0 TTL
In 1 ST - PortA 1 TTL
In 2 ST - PortA 2 TTL
In 3 ST - PortA 3 TTL
In 4 ST
In 5 ST
In 6 ST
In 7 ST

Vsupply = 4.0V to 5.5V ( DC to 20MHz )


PICAXE-28X1 ( 16F886 )

Serial In TTL

In 0 ST - PortA 0 TTL
In 1 ST - PortA 1 TTL
In 2 ST - PortA 2 TTL
In 3 ST - PortA 3 TTL
In 4 ST
In 5 ST
In 6 ST
In 7 ST

Vsupply = 2.0V to 5.5V ( DC to 8MHz, internal resonator )
Vsupply = 4.5V to 5.5V ( DC to 20MHz, external resonator )


PICAXE-28X2 ( 18F25K22, 18F2520, 18F25K20 )

18F25K22 = 28X2
18F2520 = 28X2-5V
18F25K20 = 28X2-3V

Serial In ST

C.0 ST - B.0 TTL - A.0 TTL
C.1 ST - B.1 TTL - A.1 TTL
C.2 ST - B.2 TTL - A.2 TTL
C.3 ST - B.3 TTL - A.3 TTL
C.4 ST - B.4 TTL
C.5 ST - B.5 TTL
C.6 ST - B.6 TTL
C.7 ST - B.7 TTL

Vsupply = 4.2V to 5.5V ( DC to 40MHz ) (5V voltage version)
Vsupply = 1.8V to 3.6V ( DC to 64MHz ) (3V voltage version)


PICAXE-40X ( 16F874A )

Serial In ST

In 0 TTL - PortC 0 ST - PortA 0 TTL
In 1 TTL - PortC 1 ST - PortA 1 TTL
In 2 TTL - PortC 2 ST - PortA 2 TTL
In 3 TTL - PortC 3 ST - PortA 3 TTL
In 4 TTL - PortC 4 ST
In 5 TTL - PortC 5 ST
In 6 TTL - PortC 6 ST
In 7 TTL - PortC 7 ST

Vsupply = 4.0V to 5.5V ( DC to 20MHz )


PICAXE-40X1 ( 16F887 )

Serial In TTL

In 0 TTL - PortC 0 ST - PortA 0 TTL
In 1 TTL - PortC 1 ST - PortA 1 TTL
In 2 TTL - PortC 2 ST - PortA 2 TTL
In 3 TTL - PortC 3 ST - PortA 3 TTL
In 4 TTL - PortC 4 ST
In 5 TTL - PortC 5 ST
In 6 TTL - PortC 6 ST
In 7 TTL - PortC 7 ST

Vsupply = 2.0V to 5.5V ( DC to 8MHz, internal resonator )
Vsupply = 4.5V to 5.5V ( DC to 20MHz, external resonator )


PICAXE-40X2 ( 18F45K22, 18F4520, 18F45K20 )

18F45K22 = 40X2
18F4520 = 40X2-5V
18F45K20 = 40X2-3V

Serial In ST

D.0 ST - C.0 ST - B.0 TTL - A.0 TTL
D.1 ST - C.1 ST - B.1 TTL - A.1 TTL
D.2 ST - C.2 ST - B.2 TTL - A.2 TTL
D.3 ST - C.3 ST - B.3 TTL - A.3 TTL
D.4 ST - C.4 ST - B.4 TTL
D.5 ST - C.5 ST - B.5 TTL - A.5 ST
D.6 ST - C.6 ST - B.6 TTL - A.6 ST
D.7 ST - C.7 ST - B.7 TTL - A.7 ST

Vsupply = 4.2V to 5.5V ( DC to 40MHz ) (5V voltage version)
Vsupply = 1.8V to 3.6V ( DC to 64MHz ) (3V voltage version)

Serial In Summary

TTL = 08, 08M, 08M2, 14M, 18M2, 20M, 20X2, 28X1, 40X1

ST = 18, 18A, 18M, 18X, 28, 28A, 28X, 40X, 28X2-3V/5V, 40X2-3V/5V


Vsupply Summary

4.5V to 5.5V = 28X1 (16/20MHz), 40X1 (16/20MHz)
4.2V to 5.5V = 28X2-5V, 40X2-5V
4.0V to 5.5V = 18A, 18M, 18X, 28, 28A, 28X, 40X
3.0V to 5.5V = 18
2.7V to 5.5V = 20X2 (32/64MHz)
2.5V to 5.5V = 08M2 (32MHz)
2.3V to 5.5V = 08M2 (4/8/16MHz), 18M2 (32MHz)
2.2V to 5.5V = 08
2.0V to 5.5V = 08M, 14M, 20M, 28X1 (4/8MHz), 40X1 (4/8MHz)
1.8V to 5.5V = 18M2 (4/8/16MHz)
1.8V to 3.6V = 20X2, 28X2-3V, 40X2-3V ( 4/8/16MHz )
 
Last edited:

inglewoodpete

Senior Member
hippy, can you add the 28X (16F873A) and 40X(16F874A)? Serial In and Port C inputs are all ST.

By coincidence, I found it out just this week. I am in the process of upgrading my current project from 28X (ST) to 40X1 (TTL) because I need the extra I/O and more programme space. I found my interrupts that worked on the 28X didn't interrupt on the 40X1. Luckily a small hardware mod overcame the problem.
 
Last edited:

elf1564

New Member
Excellent! Thanks for taking time to do this. I've copied and printed a hard copy for future reference.

Rusty Bates
 

hippy

Technical Support
Staff member
Added the missing 28, 28A, 28X, 40X, 28X2 and 40X2 parts, and also added information about Vsupply.
 
Last edited:

lbenson

Senior Member
Just to clarify, in the Vsupply Summary, are you saying that, for instance, the 28X1 running at 4/8MHz wants a minumum of 2.0V (and should be reliable at or above that), but at 16/20MHz wants 4.5V to 5.5V?

Does this further imply that for, say, the 08M, the chip should be reliable running with DISABLEBOD down to 2V--below the approximately 3V at which Brown-Out Detection will turn the chip off? (That would say nothing, of course, about the viability of the rest of the circuit at 2V, or the risk that draw from a turned-on part could cause a dip below 2V.)
 

Technical

Technical Support
Staff member
Just to clarify, in the Vsupply Summary, are you saying that, for instance, the 28X1 running at 4/8MHz wants a minumum of 2.0V (and should be reliable at or above that), but at 16/20MHz wants 4.5V to 5.5V?
Yes, that's what the official datasheets say. In practise you would probably get away with lower figures as the datasheet is quite conservative in it's figures.

Yes to second question too (28X1 also has internal BOD to watch out for). However it may 'operate' but not 'download' at lower voltages.
 

hippy

Technical Support
Staff member
Many thanks to Technical for the corrections and filling in the missing pieces ( especially all the additional port pins for the X1's / X2's ).

Also to confirm that PICAXE's will often run lower than the minimum the datasheets state; I've run 18X's (4.0V-5.5V) at 3V3 without noticing any problems, but that doesn't mean it's always guaranteed. Best to use lower (4MHz) speeds when possible.
 

BCJKiwi

Senior Member
Re voltages.
Found that a 28X1 will download at low voltages (that's because it switches to 4MHz for the download - doesn't it?).
With setfreq em16 and an external resonator, it often starts at 4MHz if the voltage is anything around 4.25 or less - but sometimes it does start at 16MHz.

If started at 16Mhz on say 4.5V, it seems to keep running down to 3.5V (there is not a lot of load on it) but will switch back to 4MHz if reset while on low power.
 
Last edited:

hippy

Technical Support
Staff member
No, all 14M inputs are TTL. That's due to the 16F684 silicon design which Rev-Ed have no control over.
 

hippy

Technical Support
Staff member
On the 28X2, all Port C pins ( same pins as the default input pins on 28X / 28X1 ) are Schmitt inputs.
 

westaust55

Moderator
hippy,

Thanks for updating and bringing this table (dare I use the word "table") forward. The old post was getting well and truly lost.

Pity that a section cannot be created within the forum to keep some of this type of reference material in so easy to find/reference for all.
 

BeanieBots

Moderator
How about adding the information to the existing FAQ section under "Electrical Characteristics" along with a lot of other FAQs such as voltage and current requirements.
 

westaust55

Moderator
How about adding the information to the existing FAQ section under "Electrical Characteristics" along with a lot of other FAQs such as voltage and current requirements.

when I have suggested previously about having some extra "Sticky" posts nothing occured and I think those suggestions were seen as a personal preferrence.

The consider how many posts of extended length do not use [noparse]
Code:
 and
[noparse] markers so those have clearly not read the READ ME FIRST Post and the top of this active section.

Nor I think do many read the FAQ section or search :(.
Its all to easy to ask the same question again,
even if the same topic has just been answered just a few threads earlier. :(

Another sign of not thinking is the number of posts with questions (as the starting point - not in response to someone uploading their finished project) in the Finished Projects area.
 

BeanieBots

Moderator
I fully agree with you Westaust.
However, having such data readily available in a known location such as FAQ, would allow those who know about it (and can remember where) to point the "didn't look first" posters to the right location rather than having to type it all out again.

Many of the download problems can be solved by following the advice given on the pop-up screen when it fails, yet still they post and still we give the same advice given on the pop-up!

I think the problem with FAQ sections is that they have a bad reputation which stems from the totally useless scenarios found in consumer product manuals such as TVs and VCRs.

No Picture -> Have you turned it on?
If NO, turn it on.
Still no picture, contact dealer.

Then there are those "Help Desk lines".
This is for real, it happened to me a few weeks ago with my ISP.

Hello, I have no internet access.
I'll send you an e-mail with things to check.
No point, I have no access.
It will tell you the things you need to check to get access.
But I won't be able to access it.
Give it a while, if you can't get it, call us back.
I know I can't get it, I have no internet access.
We have to go through the procedure....

So, it does cut both ways. Makes me think twice about bothering with FAQs or calling help lines.
 

Technical

Technical Support
Staff member
You are both correct, its a little confusing in the datasheet!

The 20X2 has an internal low dropout regulator that kicks in at around 3.3V, regulating the internal core silicon supply to 3V. So you can indeed use a 5V supply, but the internal core will still only receive 3V from the internal regulator, and hence the Microchip datasheet frequency response graph only lists the core voltage, which is a max of 3.6V.

So the answer is yes, you can use external 5V and the range will be at the core voltage of 3V (DC - 64MHz).
 

Technical

Technical Support
Staff member
5V still. The LDO regulator ony drives the internal silicon core, the i/o pin drivers etc still use the supply.
 

nbw

Senior Member
great work, thanks Hippy - also for the other posts on current capability etc. cheers
 

BCJKiwi

Senior Member
Ports mixed up, see next post!

@Hippy;
The Microchip Data sheet I have shows the PIC16F886 (28X1) Port B (RB0 thru 7) PICAXE in0 thru in7 as General I/O TTL inputs with some specialised uses as ST.
The input Pin types table posted on the forum indicates these are ST only.
Perhaps the table would better indicate them as TTL as that is the general use and the specialised use (i2c etc) would typically not require the port type to be known?

 
Last edited:

hippy

Technical Support
Staff member
@ BCJKiwi : The input pins on a 28X1 are the Port C pins ( legs 11-18, all ST ), Port B are the output pins ( legs 21-28 ).
 

tiscando

Senior Member
I'm using an 18M2 in a circuit that controls a 600W water pump (via a relay). For its inputs, float switches in a rainwater tank outside are connected to the 18M2 via long wires. The problem was, every time the pump turns on or off (even by an external switch downstream) it creates a lot of electrical noise that resets the 18M2. Disconnecting the float switches solved the problem (the PICAXE had caps on the power rails), so I reconnected them with the noise suppression circuit below:

Code:
                             +5V
                               |
                               \
                               / 10k
                               \
       /                       |
  .___/   _____________________|______/\/\/\____________. 18M2 input
 0V            long wire               10k       |
                                                 |
                                              ___|___
                                              _______ 22nF
                                                 |
                                                0V
This circuit is effective in preventing noise from resetting the PICAXE. It is an RC filter between the switch and the input pin, and it slows down the transitions in the switch's voltage level, which could damage the PICAXE's input circuitry if it is TTL type.

I read that schmitt trigger inputs on PIC microcontrollers work like the 74HC14 for example, in that they can tolerate slow signals better than TTL, but have a larger hysteresis (1 to 4V).

Does anyone think the above noise suppression circuit is safe for TTL inputs, or should it only be used on ST inputs? The circuit is powered 24/7 and needs to be reliable - it has been working fine for 7 days with this noise suppressor on each input so far.


Sorry, wrong part of the forum. Reposted http://www.picaxeforum.co.uk/showthread.php?26086-Slow-rising-falling-input-signals-and-TTL-inputs&p=266230#post266230
 
Last edited:
Top