CF and LF on the 14M...

Grogster

Senior Member
Hi.

Programming Editor ver 5.1.5, 14M firmware 9.B

How can you make CR and LF be sent on pin2 of the 14M?

The programming editor moans that you can't send variables on any other pin then pin0, which is odd, as you can send CR and LF on any other picaxe on any output pin that supports SEROUT. [F4] results in a correct syntax check, with no problems, yet when you try to program the chip with [F5], you get the following error: Firmware issue means serout of variables can only be used on output0. (Firmware v9.B)

Example:

SEROUT 2,T2400,("Hello.",CR,LF)

This works on the likes of 08, 08M, 18A, 18X etc, etc, but NOT on the 14M.

I made the assumption that it would, and have already produced the PCB(as the exact same syntax works on the other chips), however, only the prototype, so I can change the pattern if it must be done, but I am hoping there is a way around it...

I also tried adding another serout line below the one shown above:

SEROUT 2,T2400,(13,10)

...hoping that I could manually send the decimal CR and LF bytes, but this also produces the same error - most strange.

Any advise?
 

Mycroft2152

Senior Member
You are using a older version of the Programming Editor, try updating to the newer 5.20 version

SEROUT 2, T2400,, ("Hello", CR, LF)

Passes the syntax check in version 5.20

Myc
 

hippy

Technical Support
Staff member
Yes, you'd expect it to work, and yes it should work, and what the error message is saying is, "Sorry, we made a mistake". For PICAXE-14M Version 9.B trying to send anything other than a text string does not work unless Pin 0 is used for the SEROUT command.

I'm not sure if this is documented anywhere, but this should get round your current problem ...

Replace : SEROUT 2,T2400,("Hello.",CR,LF)

with : SEROUT 2,T2400,("Hello.\r\n")

That's not going to help though if you do need to send variables ( b0, #b1 etc ). You'll either need to find a 14M with later firmware, or re-arrange your hardware to use Pin 0 for output.
 

Grogster

Senior Member
You are using a older version of the Programming Editor, try updating to the newer 5.20 version

SEROUT 2, T2400,, ("Hello", CR, LF)

Passes the syntax check in version 5.20

Myc
Passes the syntax check in 5.1.5 too, but just won't program the chip...
 

Grogster

Senior Member
Yes, you'd expect it to work, and yes it should work, and what the error message is saying is, "Sorry, we made a mistake". For PICAXE-14M Version 9.B trying to send anything other than a text string does not work unless Pin 0 is used for the SEROUT command.

I'm not sure if this is documented anywhere, but this should get round your current problem ...

Replace : SEROUT 2,T2400,("Hello.",CR,LF)

with : SEROUT 2,T2400,("Hello.\r\n")

That's not going to help though if you do need to send variables ( b0, #b1 etc ). You'll either need to find a 14M with later firmware, or re-arrange your hardware to use Pin 0 for output.
All I want to do, is send CR and LF - I don't want to send variables, so I will try your suggestion and post back with results - thanks. :)

ADDITIONAL - Yep, the \r\n seems to work very well.
That's all I need.
Thanks again.
:)
 
Last edited:

Mycroft2152

Senior Member
Yes, you'd expect it to work, and yes it should work, and what the error message is saying is, "Sorry, we made a mistake". For PICAXE-14M Version 9.B trying to send anything other than a text string does not work unless Pin 0 is used for the SEROUT command.

I'm not sure if this is documented anywhere, but this should get round your current problem .
Missed that one, when did Revison C come out? It must have been prior to the release of the 5.20 revison of the Programming Editor as it it mentioned (off handedly) in the Firmware.txt file dated February 10, 2008.

** PICAXE-14M ***
The PICAXE-14M firmware is implemented on a PIC16F684.
BASE FIRMWARE CODE:9
VA FIRST PUBLIC RELEASE. ROHS COMPLIANT
VB CORRECTED ISSUE WITH READING OF BITX VARIABLES
CORRECTED ISSUE WITH SERIN (MULTIPLE VARIABLES)
ADDED 4800 BAUD RATE SUPPORT (SERIN AND SEROUT COMMANDS)
VC CORRECTED ISSUE WITH SEROUT (VARIABLES)

Myc
 
Top