Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:46 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Sending to serial port without CR LF?

Author Message
mookster1
Regular Member

Joined: 10/06/2011
Location: New Zealand
Posts: 81
Posted: 11:58am 06 Dec 2012
Copy link to clipboard 
Print this post

Hi all

I'm currently trying to write a terminal program for my Maximite so that I can operate my screenless and keyboardless miniMaximite with its COM2 port in console mode, over a radio link, using the Maximite's serial port (which has a screen and keyboard plugged in.) Currently I have it so that it uses INKEY$ to store one byte from the keyboard in char$, then it uses PRINT #1, char$ to send it over COM2.

The issue I am currently having is that the PRINT #nbr command sends the character to the serial port, but it's also sending CR/LF to the serial port as well, so I can't actually type a command! Is there any command I can use to send a character directly to the serial port without this occurring?


Cheers!
Capacitance is futile - roll on 2012!
 
Greg Fordyce
Senior Member

Joined: 16/09/2011
Location: United Kingdom
Posts: 153
Posted: 12:25pm 06 Dec 2012
Copy link to clipboard 
Print this post

Use a semicolon at the end of the print statement. More info in the manual.

Greg
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 12:28pm 06 Dec 2012
Copy link to clipboard 
Print this post

PRINT #1, char$;

I have not tested this on a serial port, but I understand the semicolon suppresses the CR/LF on screen.

Edit: And Greg beat me...Edited by CircuitGizmos 2012-12-07
Micromites and Maximites! - Beginning Maximite
 
mookster1
Regular Member

Joined: 10/06/2011
Location: New Zealand
Posts: 81
Posted: 01:33pm 06 Dec 2012
Copy link to clipboard 
Print this post

Thanks for that, I can't believe I couldn't find this in the manual! It does indeed do the trick
Capacitance is futile - roll on 2012!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024