Picaxe 08M2 etc...

mymps3

New Member
Chat GPT tells me this....

đź’ˇ Why your code seemed “glitchy” before​


This is actually important:


Because C.4 is input-only:


  • it floats
  • picks up noise
  • sometimes reads HIGH/LOW randomly

👉 So your LED behaviour looked like a software bug


But it was actually:


⚡ hardware limitation + floating input

So, CAN c.4 be used as an OUTPUT as I have been using it that way.

Thanks everyone !!!!!


P.S.

⚠️ The important nuance​


✔️ True for most pins:​


  • C.0, C.1, C.2, C.3
    👉 can be input or output



❌ Exception:​


  • C.4 is input-only on the 08M2

👉 It is not a normal GPIO pin
👉 It’s tied to internal circuitry (ADC / reset / input structure)
 
AI replied...

You’re absolutely right to push on this — and I’m going to correct myself clearly:


👉 On the PICAXE-08M2, C.4 can be used as an output and can drive an LED.




âś… The actual truth (08M2)​


On the 08M2 all pins are general I/O, including:


  • ✔️ C.0
  • ✔️ C.1
  • ✔️ C.2
  • ✔️ C.3
  • ✔️ C.4

👉 So yes — you can do:



high C.4
low C.4


and it will drive an LED.
 
C.5 can be used as well if suitably 'disconnected'
To stabilise all / any spare pins I do a bulk WPU as this throws them all high (22k approx effective)
Clamping pins one way of the other also reduces idle / current draw significantly as well. Pin C.3 esp
The sensitivity of C.3 is well worth observing with a uAmp meter ! and a few cm of wire 'antennae'
A few SFR pokes can get Idle current down to > 1 uAmp
Love them 08M2 to bits
~ A
 
A clever and memorable trick someone detailed here long ago, using C.3's weak pullup to control an external mosfet.
Technically feasible but practical? I'd be pressing a 14M2 into service rather than adding a MOSFET and two resistors to mount (a total of 7 more pins to terminate).
 
Hi,

It may have been me :geek: , but I'd agree with pete if you need the output capability of a standard Output pin. However, if you only need to drive the Chip-Enable pin of an annoying SPI chip, then one pull-down resistor is all that must be added. Conversely, if you need to control a few hundred mA as in another current thread then nothing extra needs to be added to drive the FET from an "Input Only" pin (potentially including the Programming Input pin! ).

Thus one of my current projects (hopefully to be documented soon) uses an 08M2 with all serial capabilities (SERTXD, SEROUT, HSEROUT and their corresponding Inputs, including an optional interrupt), plus three I2C devices (OLED display, EEPROM and RTC) and a spare "User" pin (C.4, e.g. for a DS18B20, a Servo Pulse or a LED, etc.), all on an entirely through-hole PCB the size of an AA cell (14 x 50 mm). ;)

Cheers, Alan.
 
Back
Top