Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:58 02 Aug 2025 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 : Max Baud of COM1/COM2?

Author Message
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:22am 13 Dec 2022
Copy link to clipboard 
Print this post

Is there a specific valid increment because I get complaints >921_600.






Craig
Edited 2022-12-13 18:20 by Tinine
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 11:50am 13 Dec 2022
Copy link to clipboard 
Print this post

syntax errors or complaints from the rx/tx end, i.e. data drops?

generally UARTs tend to have set values e.g. you have to use 9600 and trying to set at 9500 will bring an error. I am guessing this is your problem. I have used the UART at 230400 which is a multiple of 115200, which is a multiple of 57600 etc...

if you try multiples from 460800, then 921600, doubling each time then I suspect you'll be OK (maybe?) Following this logic, your first >1e6 should be 1843200. There are exceptions... 38400 comes out of the blue (but is one of the multiple plus another one - 28.8k+9.6k)

give it a whirl doubling each time - 'swhat I would do
Edited 2022-12-13 22:06 by CaptainBoing
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:18pm 13 Dec 2022
Copy link to clipboard 
Print this post

Sorry, should've been more specific; it's MMBasic that complains:


 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 12:31pm 13 Dec 2022
Copy link to clipboard 
Print this post

I get an expected error message:





"1036800 is invalid (valid is 24)" - is definitely an odd error message, and I suspect it is a bug of some sort.

What are you using?

170 MM2 chip?
MM+ chip?
ARMmite?
PicoMite or PicoMite VGA?

My message came from a MM2 on a 170 chip, simply as I happened to be writing something at the time I checked the forums, and everything was all hooked up, so I was able to do a quick spontaneous test.

EDIT: Just tried this on a PicoMite, and I get the following error report:





So, it looks like you've maxed out the com port speed.  
Edited 2022-12-13 22:35 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:41pm 13 Dec 2022
Copy link to clipboard 
Print this post

Yeah, Picomite with MMC (MMEdit)

921_600 is pretty darned respectable actually. Just pushing my 4 X RP2040 + Prop2 to see if I can break it  

Craig
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 375
Posted: 12:44pm 13 Dec 2022
Copy link to clipboard 
Print this post


These are the standard speeds.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:52pm 13 Dec 2022
Copy link to clipboard 
Print this post

User manual: "Well over 1000000"  
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 12:56pm 13 Dec 2022
Copy link to clipboard 
Print this post

we'll consider it theoretical  

was a little bit surprised in Grogster's screen grab, minimum baud is 126... 110 was common on a lot of older stuff, and while I agree it isn't common now, I would have imagined compatibility just because...  Tinkerers beware!
Edited 2022-12-13 22:59 by CaptainBoing
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 03:07pm 13 Dec 2022
Copy link to clipboard 
Print this post

If you use picomite, it my even depend on the CPUSPEED option.
The minimum baudrate most likely is limitted by the divider and the clock.
110 baud is really old.... I am from the 300 baud area. And 75 baud for TELEX.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 03:44pm 13 Dec 2022
Copy link to clipboard 
Print this post

For dedicated UARTS, seems artificially slow. Not a problem for my application due to very short packets. I won't be running at this speed.


Craig
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 02:20am 14 Dec 2022
Copy link to clipboard 
Print this post

I've never needed anything faster then 115k2, but that is just me.
It is impressive that you can get upwards of 1Mb UARTS on an interpreted BASIC.
The "well over 1000000" thing is probably a hangover from the Micromite Plus range of devices based on the PIC32MX470 series chipset.  They have hardware UART's that were easily capable of that, but the lesser-spec chips I think could not go as fast with their UART's.  The 2040 chip used in the PicoMite I THINK has hardware UART's, but they obviously can't run QUITE as fast as the MM+ chip UART's.  In any event, 921k6 is all you're gonna get.
Smoke makes things work. When the smoke gets out, it stops!
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 06:17am 14 Dec 2022
Copy link to clipboard 
Print this post

It seems to me that the RP2040 is very conservative which is fine by me. There is a YT vid where they clocked it to either 420 or 460MHz and measured the internal temp and it hit 42(C). They eventually frosted it and went to 1GHz. It functioned but soon fried.

115k2 is comfortable for me; I can write 48 douts and read 48 dins from four RP2040s in well under 10ms which is pretty snappy for low priority I/O  


Craig
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 08:08am 14 Dec 2022
Copy link to clipboard 
Print this post

The PIO enables you to create custom serial interfaces which can reach *very* high bit rates. This has been done using multiple PicoMites to emulate transputers. A transputer has four serial ports so that worked out nicely using one PIO to do four TX lines and the other to do four RX lines.

Remember that a PIO can run its state machines at up to one instruction per CPU clock cycle, and multiple operations can take place on each instruction.

IIRC the RP2040 Data Sheet (all 600 and odd pages of it!) has an example of creating serial ports.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:42am 14 Dec 2022
Copy link to clipboard 
Print this post

The issue isn't uart speed, it is the lack of H/W buffering. Each character generates an interrupt so 1,000,000 baud would be 100,000 interrupts a second. You can get round this with DMA but this is pretty useless for random I/O as you don't know how many bytes to receive and can't do any processing until the transmission completes
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025