SerOut - M2 Parts

CDRIVE

Senior Member
The pdfs for the 08M2 & 14M2 parts indicate only one valid pin for SerOut. The 08M2 shows C.0 and the 14M2 indicates B.0. Yet the editor doesn't throw an error and the sims run normally if I choose other pins. What gives?


Thanks
 

nick12ab

Senior Member
The pdfs for the 08M2 & 14M2 parts indicate only one valid pin for SerOut. The 08M2 shows C.0 and the 14M2 indicates B.0. Yet the editor doesn't throw an error and the sims run normally if I choose other pins. What gives?


Thanks
Which PDFs? Are you sure you're not mixing up serout and sertxd?
 

westaust55

Moderator
The SerialOut pin is the pin used for the SERTXD coimmand and when downloading a program.

When using the SEROUT command then any pin capable of being an oputput can be used

SEROUT Syntax:
SEROUT pin, baudmode, ({#}data, {#}data...)
- Pin is a variable/constant which specifies the i/o pin to use.

The pin can be any pin shown on the PICAXE manual 1 as "Out"
For example:
C.1 (In/Out/ADC/Touch/hserin/SRI/hi2c scl)
 

MPep

Senior Member
An interesting point CDRIVE makes here. The pin is called SerialOut, but the SEROUT command is not used with it. SERTXD is. I can see how this may be considered ambiguous.
 

nick12ab

Senior Member
An interesting point CDRIVE makes here. The pin is called SerialOut, but the SEROUT command is not used with it. SERTXD is. I can see how this may be considered ambiguous.
But all the current parts share normal pins with the Serial Out pin (08M2, 14M2, 18M2, 20X2, 28X2, 40X2) except for the 20M2 so you can use the serout command on those pins too.
 

Dippy

Moderator
If that's the case, Nick, why does the Manual say:
"The serout command is used to transmit serial data from an output pin of the
microcontroller. It cannot be used with the serial download output pin - use the
sertxd command in this case."

Reading further, the Manual is confusing.
For Sertxd "Function" it says:
"Serial output via the serout programming pin"
It should say "serial output programming pin". (Hey, we're using "pin" and not AXEWORLD "leg" - amazing).

I fully realise that this is cleared up under "Information", but some will see "serout" and tie it directly with the Serout command.
Needs a little disambiguification.
 

nick12ab

Senior Member
If that's the case, Nick, why does the Manual say:
"The serout command is used to transmit serial data from an output pin of the
microcontroller. It cannot be used with the serial download output pin - use the
sertxd command in this case."
All these pass syntax checking:
Code:
#picaxe 28x2
serout A.4,N2400,("UUUU")
Code:
#picaxe 08m2
serout C.0,N2400,("UUUU")
Code:
#picaxe 20x2
serout A.0,N2400,("UUUU")
Code:
#picaxe 18m2
serout C.3,N2400,("UUUU")
Code:
#picaxe 14m2
serout B.0,N2400,("UUUU")
 

hippy

Technical Support
Staff member
The SEROUT command can send on any output pin and I could find nothing that would suggest it was limited to just one pin but we do investigate how and why misunderstandings arise.

In Manual 1 the pinout diagrams specifically label the download connections as "Serial In" and "Serial Out", which are not the same as 'serin' or 'serout'.

It seems in this case there was simply a misunderstanding or presumption that only "Serial Out" was available for use with the SEROUT command when that is not so.

I could not find any places in Manual 1 where there was any potential confusion but if there are we would be grateful to have them indicated.

In Manual 2 it is incorrect that SEROUT "cannot be used with the serial download output pin". It may have once been the case but is no longer true and probably the case that we missed that one line when updating the manuals as we added to the PICAXE range.

That SERTXD provides "Serial output via the serout programming pin" should be more correctly stated as "Serial output via the serial out programming pin". I would guess that was an unintended typo no one had spotted.

The online command references have been updated appropriately and the PDF versions should follow suit in due course.
 

CDRIVE

Senior Member
If that's the case, Nick, why does the Manual say:
"The serout command is used to transmit serial data from an output pin of the
microcontroller. It cannot be used with the serial download output pin - use the
sertxd command in this case."

Reading further, the Manual is confusing.
For Sertxd "Function" it says:
"Serial output via the serout programming pin"
It should say "serial output programming pin". (Hey, we're using "pin" and not AXEWORLD "leg" - amazing).

I fully realise that this is cleared up under "Information", but some will see "serout" and tie it directly with the Serout command.
Needs a little disambiguification.
The way the manual presents it is more contradictory than ambiguous, though I simply love "disambiguification"!;)
 
Top