Big Easy X40

womai

Senior Member
It has 1 output only ports (8 pins total), and 1 I/O port (portc) which can be made outputs (another 8 pins total). So you have a grand total of 16 outputs maximum. Output 17 is the serial download transmit pin, which you can use for serial communication (sertxd), or - with some tricks (poke) - as a regular output.

Wolfgang
 

alband

Senior Member
Thanks.:)
I haven't got X40 as an option in Programming Editor.
Do I need to update or have they not got that yet.
Also: Say I have two PICAXE's talking to each other, serially. They would need three wire minimum: common ground, Serial one way and serial the other.
Or would they?
Could the two serial lines share one wire if the pins have diodes correctly placed?
 

Jeremy Leach

Senior Member
There is mention of the 40 series in Options in the latest editor. Just upgrade ;)

There's been a lot of talk about picaxe to picaxe comms in many threads. I've got my own ideas, and know you can do bi-directional comms just with common ground and one other wire - if the pins on both picaxes are in/out, and for safety you put a 100R resistor in the line between the picaxe pins (so that if you accidenly set both pins to outputs you won't get smoke !).
 

Dave-nz2

New Member
Thanks.:)
I haven't got X40 as an option in Programming Editor.
Do I need to update or have they not got that yet.
In the Picaxe Programming Editor select View -> Options -> Mode tab and you should see some text saying:
For PICAXE-40X use mode 28X
For PICAXE-40X1 use mode 28X1
...

Also: Say I have two PICAXE's talking to each other, serially. They would need three wire minimum: common ground, Serial one way and serial the other.
Or would they?
Could the two serial lines share one wire if the pins have diodes correctly placed?
Sure, for half-duplex comms.
Check towards the bottom of Hippy's Picaxe Setrial Interfacing page at http://www.hippy.freeserve.co.uk/picaxeio.htm for correct diode placement (Serial Links Between PICAXE's section).
 

alband

Senior Member
How do you get a pin to be In & Out in the same program. I'm only familiar with setting a pin as an In or out before programming.
 

Jeremy Leach

Senior Member
depends on the picaxe type - you need to check the diagrams in the manual which shows which pins of the picaxe can be used both for input or output. Then you can use the 'output' or 'input' command, to specify the direction of the specified picaxe pin.

3 wire solution might be easier as a start.
 

Dave-nz2

New Member
For 40X Input / Output see read Picaxe Manual 1 - Getting Started.
Scroll down to Appendix F - Configuring PICAXE 40X/40X1 Input-Output Pins.

You can use Port C as Input or Output by just reading from or writing to a pin, which automatically (re)sets the direction of that pin when the command is used.
 

alband

Senior Member
Yep, found the 40X 28X bit, thanks.

I've just looked at Hippy's page (I've use that site and this for a while but only now has it clicked that our Hippy is that Hippy; duh:rolleyes:) and the "half duplexing" as Dave called it looks simple enough. I'll give that a go.
Thanks as usual.
 

westaust55

Moderator
40X1 portC use

Keep in mind that for the PortC pins,
there are a limited number of "simple" commands that will function being:
DIRSC, PINSC, HIGH PORTC, LOW PORTC

In addition, the HSEROUT & HSERIN commands (which are fixed to the portC pins C6 and C7),
and the i2c and spi functions, PWM1/2 with dedicated port C pin allocations.

SHIFTIN, SHIFTOUT, PULSIN, PULSOUT, etc will also not operate on Port C.

EDIT:
bwt, the "standard" outputs are on PortB. Its just that you do not use portB as a reference in the same way as for PortA and portC
 
Last edited:

alband

Senior Member
I've just tried that one on Hippy's site and it doesn't work. The diodes are fine - I've tryed them with two wire transfer but as soon as I wire it up with one communication wire, it doesn't work.:confused:
 

hippy

Technical Support
Staff member
Regarding your other thread; the diode mixing is for idle low / active high if pointy-ends of diodes away from the PICAXE serial out. Using Nxxxx baud should sort that out.
 

alband

Senior Member
No worrys, got it working.:)
There was a problem with the diodes. Odd though that they worked in series during normal data sending but not in "Half Duplexing". Anyway, swapped them for some better signal diodes and its all working great.
Thanks. as usual.
David
 

alband

Senior Member
I've just checked the pinouts on hippy's site and I might not need an X40 after all (its a kick-ass chip with an ass-kicking price). The 28X has 16 outputs?
I need two chips:
one with 15 digital inputs and 1 output.
one with 16 digital outputs and 4 inputs (this could be 2 inputs if I have another chip compacting 3 buttons' states into one serial line - easier with 4 inputs).

For the first, I have no choice but a 40X but for the second could I use a 28X? I'd have 16 outputs (pins 11-18 & 21-28) and then could I use the analogue pins as digital inputs?

Also, how do you use the C ports in code.
 
Last edited:

eclectic

Moderator
alband.

Try searching Manual 1 and 2 with the search term

portC

Then, there are also lots of references to more subtle aspects,
which a Forum search will provide.

e
 
Top