Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:35 28 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 : Serial Port 7 bits - Teleinfo EDF

Author Message
jpconil
Newbie

Joined: 24/01/2014
Location: France
Posts: 2
Posted: 07:26am 27 Jan 2014
Copy link to clipboard 
Print this post

Hello,

Sorry, but the time I got registered on that forum, I fixed my problem.

A Duinomite is receiving the data send by my energy meter. The serial port configuration is 1200 bps, 7 bits, even, 1 stop bit and can't be changed...

It is not possible to declare something like :
OPEN "COM3:1200E7" AS #1
which is done straightforwardly by terminal programs.

The port is open as 1200, 8 bits, no parity and 1 stop bit.
The trick is to get a character at a time and to remove the parity bit.


OPEN "COM3:1200" AS #1
...
Rcd:
A$ = INPUT$(1, #1)
IF A$="" THEN GOTO Rdc

A = (ASC(A$) AND &h7F)
A$ = CHR$(A)


I hope it will help someone!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 08:48pm 27 Jan 2014
Copy link to clipboard 
Print this post

Hello,

thanks a lot! I have often the same problem!

Frank
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 04:06pm 28 Jan 2014
Copy link to clipboard 
Print this post

Hi Jpconil,

That is a fantastic piece of thinking! Thanks!
 
Print this page


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

© JAQ Software 2024