mailto: blog -at- heyrick -dot- eu

Serial data rate

Given the recent discussion on the Linky's TIC and its serial speed, or lack of, I thought it might be useful to give a quick overview of serial speeds and how to make these numbers mean something useful.

In order to do this, you will need to know two things:

The first is the baud rate, which is expressed in bauds or bits per second (bps). This tells us how fast the data is being transferred.
Technically, "baud" refers to symbol rate while "bits per second" (bps) refers to the number of bits transmitted per second. On simple serial links like a UART (as this is) they are effectively the same thing, so the terms are often used interchangeably.

As an aside, note that in the days of analogue modems (whether old style squeaks and beeps or ISDN/ADSL), there can often be a huge difference between bauds and bps. For example, the maximum baud rate you could expect on a generic phone line is 2400 baud, though a good phone line could go up to around 3400 baud. So how did 14k4, 28k8 and so on work? Very complicated maths, but it basically boils down to splitting the 3000Hz available bandwidth into bands and encoding the data on multiple bands at the same time.

The second thing you will need to know is the serial format. This allows us to calculate the overhead. Typical values are 8N1 and 7E1.
What this means is how many Data bits are sent (from 5 to 9, but usually 7 or 8), whether or not a Parity bit is added (None, Even, Odd, Mark, or Space), and how many Stop bits there are (usually 1, can be 1½, or 2).

There is also a Start bit, but this is always used so it isn't mentioned.

If we take a look at 8N1, this means:

[start][d0][d1][d2][d3][d4][d5][d6][d7][stop]

And for 7E1, this means:

[start][d0][d1][d2][d3][d4][d5][d6][parity][stop]

As you can see, 8N1 sends ten bits for every eight useful bits (20% overhead), while 7E1 sends ten bits for every seven useful bits (30% overhead).

 

Speed into bit time

There are a million microseconds in a second. To work out how long each bit takes, simply divide a million by the baud rate:
For 1200bps/baud: 1,000,000 ÷ 1200 = 833.33µs
For 9600: 1,000,000 ÷ 9600 = 104.16µs
For 115200: 1,000,000 ÷ 115200 = 8.68µs

 

Bit time into frame time

Now we simply multiply the time that we determined by the total number of bits of a serial byte transmission.
For 8N1, this is a start bit, eight data bits, and a stop bit. Or 10 bits.
For 7E1, it's a start bit, seven data bits, a parity bit, and a stop bit. Or 10 bits.

Therefore:
For 1200: 833.33 × 10 = 8333.3µs
For 9600: 104.16 × 10 = 1041.6µs
For 115200: 8.68 × 10 = 86.8µs

 

Frame time into bytes per second

Now, to work out how many bytes per second, we divide one million microseconds by the length of a frame.
We don't need to convert for the overheads (start, stop, parity) because we have already taken care of this.

Therefore:
For 1200: 1,000,000 ÷ 8333.3 = 120 bytes per second.
For 9600: 1,000,000 ÷ 1041.6 = 960 bytes per second.
For 115200: 1,000,000 ÷ 86.8 = 11,520 bytes per second (11¼KiB/sec).

Yes, as a rule of thumb for 8N1, you can just divide the baud rate by ten. It's not so simple for weirder formats like 6O1.5, but you're unlikely to encounter weirdness like that unless you're dealing with ancient mainframes and teletypes.

 

So how long does something take to send?

Since we know the byte time, we can also work out how long something will take. For example, the traditional style Linky data packet for a single phase meter looks like this:
!>ADCO 123456789012 X
>OPTARIF BASE X
>ISOUSC 30 X
>BASE 123456789 X
>PTEC TH.. X
>IINST 123 X
>IMAX 123 X
>PAPP 12345 X
>HHPHC A X
>MOTDETAT 000000 X
!
Where the '!' represents the packet start and end markers, and '>' is a linefeed character that each line begins with.
This is 164 bytes.

For a three-phase meter, it is slightly longer:

!>ADCO 123456789012 X
>OPTARIF BASE X
>ISOUSC 12 X
>BASE 123456789 X
>PTEC TH.. X
>IINST1 123 X
>IINST2 123 X
>IINST3 123 X
>IMAX1 123 X
>IMAX2 123 X
>IMAX3 123 X
>PAPP 12345 X
>HHPHC A X
>MOTDETAT 000000 X
>PPOT 07 X
!
This is 234 bytes.

We know that traditional style runs at 1200bps (baud!) so this means 8333.3µs per byte.

Therefore, the single phase information is 164 × 8333.3 = 1,366,661.2µs.
The three phase information is 234 × 8333.3 = 1,949,992.2µs.

Divide by a million to convert to seconds. 1.37s and 1.95s respectively. Or just over a second and a third and just under two seconds respectively.

 

Lyrics to "The Beetle Song"

Somebody asked. Actually, lyrics are embedded into the MP3 but maybe their player doesn't support that? Anyway...

In case you don't have a copy, grab it from here:

What_Happened_Last_Night.mp3
Runtime 6:26; 8.6MiB.

Lyrics by me, music/performance by Suno.

[verse 1]
I was coding in the moonlight
But the damned thing kept on crashing
So I thought I'd write a dumb song
But I'm not sure that I can sing
So I decided to go for a walk instead

[verse 2]
I was walking in the moonlight
It was oh so very quiet
When suddenly in the dark field
Was what sounded like a riot
Such bright lights, metal screams, and a deep roaring sound

[verse 3]
Looking over to my left side
Was a god-damned flying space ship
This place is the back of beyond
Were they lost out on their field trip?
Short legs descended from below to touch the ground

[verse 4]
If this is to be first contact
Why in god's name did they come here?
There is nothing but fields and cows
Pigeons, rabbits, and a few deer
Unless it's me they're after in which case "oh crap".

[verse 5]
The lights calmed down and got dimmer
And then a doorway slid open
Standing at the top in bright light
Were two figures that looked broken
Honestly I do not know why I didn't just run...

[verse 6]
Standing up there in the doorway
Is what looked like a pair of beetles
Wearing ceremonial robes
Why do I recall such details?
It's two beetles the size of humans, what? What? What? WHAT?

[interlude, spoken]
Nobody's going to believe this, are they?
Extra-terrestrials are supposed to be tall and grey
The utter absurdity of this I must portray
As I'm looking at two massive beetles in the doorway

[verse 7]
A small stairway did unfold and
They started to amble down it
Looking closely at everything
My mind was throwing a fit
Run you dumbarse, just turn around and run away

[verse 8]
They approached me, I think I peed
They looked at me as if baffled
I guess I must be strange to them
After all the space they've travelled
This is the planet of naked apes so... hello?

[verse 9]
"We come in peace, play again Sam"
"I will have what she is having"
"These go to eleven" also
"Elementary my dear Watson"
Are they talking to me by using movie quotes?

[verse 10]
And then we stood there in silence
We did not understand each other
Oh and low-key I was freaked out
That they spoke like a southerner
Let's not forget in my language as well no less

[verse 11]
I looked at six legs, antennae
And that big black moist carapace
Sharp mandibles and scutellum
Honestly I was quite aghast
I wondered to myself if bug spray would work here

[verse 12]
Suddenly a bright flash and then
That is all that I remember
When I woke up it was daytime
What happened? I can't remember!
A quick check, no I don't think I had anal probe

But...

[verse 13]
Everything's so ordinary
Birds and bees and pretty flowers
I'm upset 'cos I met aliens
And I didn't get superpowers
I can't see through that cute girl's dress or walk up walls

[verse 14]
So I'm sitting in the wheat field
There's no trace of anything there
There's nobody that'll believe me
And my evidence has flown elsewhere
People will say I've lost my marbles and...

[outro, spoken]
...maybe they're right.

As I said back when I released it, there are a number of things I'd like to change (tidy up some of the wording, "carapace" being pronounced differently to how I would have, etc) but the first version came out so good that I'm just going to leave it with the quirks and flaws intact.

 

Getting work done?

Well, the guy for the trees hasn't gotten back in touch. Somebody who thinks he's worth €42/hour (I think that's more than my mechanic makes for normal tasks!) isn't serious enough to either keep me up to date, or inform me that he's not interested/has a better job to do/etc.
I think I'll leave that until the autumn when the leaves fall off and contact the person who did the trees for the fibre installation. I was planning on calling that person, but thought it might be nice to push some work in the direction of the son of somebody I used to work for.
Oh well, lesson learned.

As for getting the wells/water seen to, I sent the photos on Friday to the local company that I contacted. I sent a follow-up email yesterday and was told that it had all been forwarded to the sales person and that they would contact me.
In the absence of any contact thus far, I have sent the enquiry to a not-so-local company (based near Laval, I think?) that covers this area. Let's see if somebody replies.

I guess these companies make money on pumping out septic tanks and flooded basements and they deal with the other stuff as a side hustle because they have a big truck that sucks and blows. But, if you ask me, the only thing that sucks and blows is the customer service for enquiries that aren't the usual.

Really, it's like trying to find a doctor or dentist around here. I can sort of understand why Brits tend to hire other Brits and pay them away from the eyes of the tax man, if this is what it is like trying to get a professional out to do something.
It's probably not helped by France having a social classification distinction between "ouvriers" and "encadrement". That's the same as the blue collar/white collar divide. Which means everybody wants to get a job in management where they hope to get paid well but not put in much physical effort. Which means fewer and fewer people learning a trade. Because while there will always be a need for mechanics and plumbers, it's work in sometimes unfavourable conditions using tools and lugging stuff around. Requires effort.
Funny thing is, I can't help but think that a good tradie may make as much as - if not more - than a middle manager.

 

Tidying up the Abyss

It's the part by the second well. It doesn't really have a name, I just decided to call it "the abyss". Anyway, back in 1996(ish) it was open and sunny and we'd lose the well in the tall grass.
As it was sunny, mom thought it would be a good place to plant veg and to keep the bunnies out we got some mesh and fitted it in a square about 4 metres by 3 metres with an opening door.

A picture from 2002.
As it was in 2002: Digitised (on RISC OS?) from an analogue video recording.

The problem was the holes in the mesh were too big to keep much out, and I don't think bunnies were the problem. Everything else was.

So that idea was abandoned and so was that patch of land, upon which trees took root. As for the mesh square? Still there, but was always a rather effective climbing frame for brambles and ivy. It is something I wanted to deal with for a long time but was lacking motivation.

Here's what it looked like. This photo is taken from a different angle to the 2002 one, looking from right of that.

How it looked before.
So. Much. Green.

And after a lot of back-breaking work, as the poles were buried half a metre into the ground and the mesh was buried and tucked outwards to dissuade animals that might try digging, both were not easy to remove.
But, eventually I got it free (with only a few bramble bites) so I could pass over with the little mower to smash up what remained.

How it looked afterwards.
A little less green.

 

Back in February 2023 I got myself a chainsaw and used it to bring down that big old willow (that is, annoyingly, still not giving up). The fourth picture down said "this will be fun to tidy up". Well, you see those big pieces at the back? I didn't. Too large, too heavy.

Three years later the smaller pieces were taken to the place where I dump tree bits, and the larger pieces (that I'd do myself an injury trying to lift) were rolled over to the pine logs for my friends up in town. If they're interested, they can take it.

 

I wanted to do this because there's a "feel" in the air. A change. A... I think the warm sunny days are coming to an end. I may go to Big Town tomorrow, or the day after. But I can do that in the rain.

 

One Piece

I won't give spoilers, I'll just say that I feel as if the first four episodes were a rip-roaring adventure, but the final four...really slowed things down. It's as if they were very well aware of the three episode rule so put all the epic stuff into the first three episodes.

That's not to say it was bad, it's a great programme, but... the pacing was all off. Still, I'd definitely be watching the third season (which is currently in production) to see what happens in Alabasta.
Better yet, I'm not familiar with the manga or the animated version other than knowing it exists and it goes on forever (I'm not a fan of the exaggerated art style), so it'll be a new story for me.

 

Well, it's 8pm as I type this. Almost time for the eternal "what should I eat for dinner?" struggle. I'm trying to decide if a movie this evening, or just turn the lights off and listen to some music.

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺
As of February 2025, commenting is no longer available to UK residents, following the implementation of the vague and overly broad Online Safety Act. You must tick the box below to verify that you are not a UK resident, and you expressly agree if you are in fact a UK resident that you will indemnify me (Richard Murray), as well as the person maintaining my site (Rob O'Donnell), the hosting providers, and so on. It's a shitty law, complain to your MP.
It's not that I don't want to hear from my British friends, it's because your country makes stupid laws.

 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

jgh, 25th March 2026, 02:58
Serial data speed.... 120 (or 960, 11520, etc) bytes per second is the theortical maximum. The time stated is the time to push one frame out across the serial link. There will be the additional time between each frame, between the end bit and the next start bit. That can theoretically be zero, but will often be longer even if the transmitter is in a tight loop BIT txRDY:BPL wait:STA txDATA as there is that slight gap between the testing of the status and feeding it a byte, and then there's the additional time of going and fetching the next byte from memory or where-ever to send. 
 
And even that tight loop can't practically be that tight as you also have to check the (checks schematics...) CTS line for if the other end says WOAH, NEDDY! when it can't swallow your data as fast as you're sending it. 
 
Ah, the joys of serial comms, and the crappy broken hardware (cough! 6551! cough!) you have to work around. 
C Ferris, 26th March 2026, 12:20
Surprised Rick hasn't taken apart a USB to RS232 dongle :-)

Add a comment (v0.12) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 86808 backwards.
UK resident
Your comment
French flagSpanish flagJapanese flag
Calendar
«   March 2026   »
MonTueWedThuFriSatSun
      
247
910111314
17
2325
     

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery
 
Alphabetical:

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 02:11 on 2026/04/11.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2026 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2026/03/26
Return to top of page